Bug 2433 - runqemu scripts in master broken by recent changes
Summary: runqemu scripts in master broken by recent changes
Status: VERIFIED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.3
Assignee: Scott Garman
QA Contact:
URL:
Whiteboard: (No QA needed)
: 2449 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-07 23:23 UTC by Joshua Lock - Disabled
Modified: 2012-06-19 12:08 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Lock - Disabled 2012-05-07 23:23:37 UTC
Changeset e99f652ede4612eec7cef5fa16638b07519cba8e broke the runqemu scripts for me. Specifically the findimage function.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e99f652ede4612eec7cef5fa16638b07519cba8e

Before I could run:

$ runqemu qemuarm

and findimage would find an appropriate image to run. Now I see:

/srv/yocto/poky/scripts/runqemu: line 303: [: too many arguments

I'm using the base shell under Ubuntu 12.04 LTS. I am able to produce a similar error if I switch to dash.

The hunk which breaks things is:

- 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

Although at least [[ is a bashism so we can't really just revert.
Comment 1 Richard Purdie 2012-05-08 09:22:24 UTC
A case statement should be able to resolve this as mentioned on list...
Comment 2 Saul Wold 2012-05-14 06:28:34 UTC
*** Bug 2449 has been marked as a duplicate of this bug. ***
Comment 3 Scott Garman 2012-05-21 16:34:54 UTC
This was fixed by Peter Seebach with this commit:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=441623224b73c82b4140aa9015823eb91a417cdc
Comment 4 Laurentiu Serban 2012-06-19 12:08:16 UTC
verified