Skip to contentSkip to conversation

runqemu: don't complain about conflicting machines if they are equal

PATCH In review Pascal Bach 2 participants 2 messages Sep 24, 2015 – Sep 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 runqemu: don't complain about conflicting machines if they are equal

When the MACHINE variable was set as an environment variable, via "export MACHINE=qemuarm" and runqemu was executed as "runqemu qemuarm"

The confusing error message appears:
Error: conflicting MACHINE types [qemuarm] and [qemuarm]

This checks if the two values are equal, in that case there is no problem and execution can continue.

---
 scripts/runqemu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100755 => 100644 scripts/runqemu
scripts/runqemu +1 -1
old mode 100755
new mode 100644
index 23cf5be..5989507
@@ -111,7 +111,7 @@ while true; do
     case "$arg" in
         "qemux86" | "qemux86-64" | "qemuarm" | "qemuarm64" | "qemumips" | "qemumipsel" | \
         "qemumips64" | "qemush4"  | "qemuppc" | "qemumicroblaze" | "qemuzynq")
-            [ -z "$MACHINE" ] && MACHINE=$arg || \
+            [ -z "$MACHINE" -o "$MACHINE" = "$arg" ] && MACHINE=$arg || \
                 error "conflicting MACHINE types [$MACHINE] and [$arg]"
             ;;
         "ext2" | "ext3" | "ext4" | "jffs2" | "nfs" | "btrfs" | "hddimg" | "hdddirect" )
Signature · 1 line
2.1.4
#1 lore raw
Quoted 6 lines · Pascal Bach

When the MACHINE variable was set as an environment variable, via "export MACHINE=qemuarm" and runqemu was executed as "runqemu qemuarm"

The confusing error message appears:
Error: conflicting MACHINE types [qemuarm] and [qemuarm]

Quoted 8 lines

This checks if the two values are equal, in that case there is no problem and execution can continue.

---
 scripts/runqemu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100755 => 100644 scripts/runqemu

I appreciate the patch but we didn't spot the above mode change which just cost us a bit of time on the autobuilder :(.

I've removed it from the patch.

Cheers,

Richard