Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Joshua Lock <josh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/6] runqemu: use modern, single-char name of test(1)
Date: Mon, 07 May 2012 16:25:25 -0700	[thread overview]
Message-ID: <4FA859E5.4080609@linux.intel.com> (raw)
In-Reply-To: <1336065154-8513-2-git-send-email-rep.dot.nop@gmail.com>

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



  reply	other threads:[~2012-05-07 23:36 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 [this message]
2012-05-15 19:59     ` Bernhard Reutner-Fischer
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=4FA859E5.4080609@linux.intel.com \
    --to=josh@linux.intel.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