Skip to contentSkip to conversation

fix '[[: not found' error message using dash

PATCH Vincent Génieux 3 participants 3 messages Jan 12, 2015 – Jan 14, 2015

lore
Share & tools
lore
#0 lore raw

This is a fix for https://bugzilla.yoctoproject.org/show_bug.cgi?id=7112
bash specific syntax '[[ test ]]' replaced with '[ test ]'.

---
 meta/classes/kernel.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
index 70ed95b..2a6ec34 100644
@@ -403,7 +403,7 @@ do_strip() {
 			  gawk '{print $1}'`
 
 		for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do {
-			if [[ "$headers" != *"$str"* ]]; then
+			if [ "$headers" != *"$str"* ]; then
 				bbwarn "Section not found: $str";
 			fi
 
Signature · 1 line
1.7.10.4
Acked-by
#1 lore raw

Hi Vincent,

Quoted 3 lines · Vincent Génieux

This is a fix for https://bugzilla.yoctoproject.org/show_bug.cgi?id=7112
bash specific syntax '[[ test ]]' replaced with '[ test ]'.

Please use the tag:

Fixes [YOCTO 7112]

In the message body, on it's own line.

Quoted 1 line

Here it is customary to list the people you have been working with:

Cc: Darren Hart <[email protected]>
Cc: Bruce Ashfield...
etc.

Also, ensure your mailer does actually Cc those people (git send-email can do this automatically).

Quoted 10 lines
---
 meta/classes/kernel.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +0 -0
index 70ed95b..2a6ec34 100644

meta/classes/kernel.bbclass do_strip() { · line 409

Quoted 8 lines
meta/classes/kernel.bbclass +1 -1
@@ -403,7 +403,7 @@ do_strip() {
 			  gawk '{print $1}'`
 
 		for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do {
-			if [[ "$headers" != *"$str"* ]]; then
+			if [ "$headers" != *"$str"* ]; then
 				bbwarn "Section not found: $str";
 			fi
 

Content is correct. I presume this passes your testing with the dash shell?

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center
#2 lore raw
Quoted 9 lines · On Wednesday 14 January 2015 09:01:15 Darren Hart wrote:
Quoted 2 lines · Vincent Génieux

This is a fix for https://bugzilla.yoctoproject.org/show_bug.cgi?id=7112
bash specific syntax '[[ test ]]' replaced with '[ test ]'.

Please use the tag:

Fixes [YOCTO 7112]

In the message body, on it's own line.

To be 100% correct, the syntax is

Fixes [YOCTO #7112]

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre