[OE-core] [PATCH 2/6] runqemu: use modern, single-char name of test(1)
Joshua Lock
josh at linux.intel.com
Mon May 7 23:25:25 UTC 2012
On 03/05/12 10:12, Bernhard Reutner-Fischer wrote:
> @@ -313,11 +313,11 @@ findimage() {
> # recently created one is the one we most likely want to boot.
> filenames=`ls -t $where/*-image*$machine.$extension 2>/dev/null | xargs`
> for name in $filenames; do
> - if [[ "$name" =~ core-image-sato-sdk ||
> - "$name" =~ core-image-sato ||
> - "$name" =~ core-image-lsb ||
> - "$name" =~ core-image-basic ||
> - "$name" =~ core-image-minimal ]]; then
> + if [ "$name" =~ core-image-sato-sdk -o \
> + "$name" =~ core-image-sato -o \
> + "$name" =~ core-image-lsb -o \
> + "$name" =~ core-image-basic -o \
> + "$name" =~ core-image-minimal ]; then
> ROOTFS=$name
> return
> fi
This change broke findimage() for me on both bash and dash. Reproducer
is 'runqemu qemux86'.
Under bash I get:
/srv/yocto/poky/scripts/runqemu: line 303: [: too many arguments
Undoing this change fixes things for me. Note: this change doesn't
revert cleanly.
I've filed this as Yocto #2433:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=2433
As an aside, when trying (unsuccessfully) to figure out a fix for this I
ran across Ubuntu's page on dash[1] which indicates changing || for -o
isn't right. Anyone have a strong opinion on that?
Cheers,
Joshua
1. https://wiki.ubuntu.com/DashAsBinSh
--
Joshua Lock
Yocto Project
Intel Open Source Technology Centre
More information about the Openembedded-core
mailing list