From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/6] runqemu: use modern, single-char name of test(1)
Date: Tue, 15 May 2012 21:59:15 +0200 [thread overview]
Message-ID: <20120515195914.GO29324@mx.loc> (raw)
In-Reply-To: <4FA859E5.4080609@linux.intel.com>
On Mon, May 07, 2012 at 04:25:25PM -0700, Joshua Lock wrote:
>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?
just a weak. That whole style is utterly broken.
case "$name" in
core-image-sato-sdk*|blah)
esac
Really that whole name hardcoding is plain stupid and over-engineered.
If the darn image exists then, heck, just use it.
But that's politics i fear -- not even sure if that intel-guy ment to
imply that, though. Somehow doubt it |-/
Any sane way out of that mess?
>
>Cheers,
>Joshua
>
>1. https://wiki.ubuntu.com/DashAsBinSh
next prev parent reply other threads:[~2012-05-15 20:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 17:12 [PATCH 1/6] runqemu: Use OE_TMPDIR Bernhard Reutner-Fischer
2012-05-03 17:12 ` [PATCH 2/6] runqemu: use modern, single-char name of test(1) Bernhard Reutner-Fischer
2012-05-07 23:25 ` Joshua Lock
2012-05-15 19:59 ` Bernhard Reutner-Fischer [this message]
2012-05-15 20:58 ` Khem Raj
2012-05-15 22:03 ` Peter Seebach
2012-05-03 17:12 ` [PATCH 3/6] runqemu: simplify process_filename() Bernhard Reutner-Fischer
2012-05-03 17:12 ` [PATCH 4/6] runqemu: add and use error() Bernhard Reutner-Fischer
2012-05-03 17:12 ` [PATCH 5/6] runqemu: minor tweaks Bernhard Reutner-Fischer
2012-05-03 17:12 ` [PATCH 6/6] runqemu: be sh neutral Bernhard Reutner-Fischer
2012-05-04 21:18 ` [PATCH 1/6] runqemu: Use OE_TMPDIR Scott Garman
2012-05-07 23:56 ` Scott Garman
2012-05-08 7:07 ` Peter Seebach
2012-05-14 22:34 ` Mark Hatle
2012-05-14 22:40 ` Khem Raj
2012-05-14 22:51 ` Marko Lindqvist
2012-05-14 23:15 ` Mark Hatle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120515195914.GO29324@mx.loc \
--to=rep.dot.nop@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox