Skip to contentSkip to conversation

cacao-initial-native: Fix sed matching

PATCH In review Erkka Kääriä 2 participants 2 messages Oct 15, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cacao-initial-native: Fix sed matching

The recipe uses sed to patch src/scripts/java.in so that it execs cacao-initial instead of cacao. However, if configure step is run again, -initial is appended again to the string, leading to 'exec cacao-initial-initial'. This causes the build to fail.

This is fixed by changing the sed command to consider larger portion of the source string. This ensures that the -initial is only appended once.

---
 recipes-core/cacao/cacao-initial-native_0.98.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-core/cacao/cacao-initial-native_0.98.bb +1 -1
index 72c6246..ec7fbdb 100644
@@ -35,7 +35,7 @@ export JAR="fastjar"
 
 do_configure_append() {
   # Fix the executable name in the wrapper script.
-  sed -i -e "s|exec cacao|exec cacao-initial|" src/scripts/java.in
+  sed -i -e "s|exec cacao \\$|exec cacao-initial \\$|" src/scripts/java.in
 }
 
 SRC_URI[md5sum] = "8b8907c8b925761c9410bcadb9705346"
Signature · 12 lines
2.1.4

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
#1 lore raw

Hi,

Quoted 28 lines · Erkka Kääriä

The recipe uses sed to patch src/scripts/java.in so that it execs cacao-initial instead of cacao. However, if configure step is run again, -initial is appended again to the string, leading to 'exec cacao-initial-initial'. This causes the build to fail.

This is fixed by changing the sed command to consider larger portion of the source string. This ensures that the -initial is only appended once.

---
 recipes-core/cacao/cacao-initial-native_0.98.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-core/cacao/cacao-initial-native_0.98.bb +1 -1
index 72c6246..ec7fbdb 100644
@@ -35,7 +35,7 @@ export JAR="fastjar"
 
 do_configure_append() {
   # Fix the executable name in the wrapper script.
-  sed -i -e "s|exec cacao|exec cacao-initial|" src/scripts/java.in
+  sed -i -e "s|exec cacao \\$|exec cacao-initial \\$|" src/scripts/java.in
 }
 
 SRC_URI[md5sum] = "8b8907c8b925761c9410bcadb9705346"
Signature · 1 line
2.1.4

Good catch. Pushed, Thanks!

Best Regards,
Maxin