All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@opendreambox.org>
To: Paul Eggleton <paul.eggleton@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/3] scripts/bitbake: try harder to check if pseudo exists
Date: Tue, 27 Mar 2012 15:08:28 +0200	[thread overview]
Message-ID: <4F71BBCC.4030307@opendreambox.org> (raw)
In-Reply-To: <4a226262b48b8f0c56019183604b70c0f565d5f2.1332848153.git.paul.eggleton@linux.intel.com>

On 27.03.2012 13:50, Paul Eggleton wrote:
> If pseudodone doesn't exist, we can get STAGING_BINDIR_NATIVE by calling
> bitbake -e and use that as the path to check for pseudo before we give
> up and try to build it explicitly first.
> 
> This is useful for people who share TMPDIR between multiple build
> directories.
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>

This adds a 3s delay over the previous setup on my build system, which I 
deem acceptable. See one minor suggestion inline.

Acked-by: Andreas Oberritter <obi@opendreambox.org>

> ---
>  scripts/bitbake |   12 +++++++++---
>  1 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/bitbake b/scripts/bitbake
> index 45c8697..1ba1839 100755
> --- a/scripts/bitbake
> +++ b/scripts/bitbake
> @@ -53,14 +53,21 @@ if [ "`pwd`" != "$BUILDDIR" ] ; then
>  fi
>  
>  buildpseudo="1"
> -if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then
> -    PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
> +if [ $needpseudo = "1" ]; then
> +    if [ -e "$BUILDDIR/pseudodone" ]; then
> +        PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
> +    else
> +        PSEUDOBINDIR=`bitbake -e | grep STAGING_BINDIR_NATIVE=\" | cut -d '=' -f2 | cut -d '"' -f2`

I think using sed might improve readability:

bitbake -e | grep ^STAGING_BINDIR_NATIVE= | sed -e 's,^STAGING_BINDIR_NATIVE="\(.*\)"$,\1,'

This may be a subjective impression, though.

> +    fi
>      if [ -e "$PSEUDOBINDIR/pseudo" -a -e "$PSEUDOBINDIR/tar" -a "$needtar" = "1" ]; then
>          buildpseudo="0"
>      fi
>      if [ -e "$PSEUDOBINDIR/pseudo" -a $needtar = "0" ]; then
>          buildpseudo="0"
>      fi
> +    if [ $buildpseudo = "0" -a ! -e "$BUILDDIR/pseudodone" ] ; then
> +        echo $PSEUDOBINDIR > $BUILDDIR/pseudodone
> +    fi
>  fi
>  if [ $needpseudo = "0" ]; then
>      buildpseudo="0"
> @@ -104,7 +111,6 @@ BITBAKE=`which bitbake`
>  export PATH=$OLDPATH
>  if [ $needpseudo = "1" ]; then
>      export PSEUDO_BUILD=2
> -    PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
>      PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@
>  else
>      export PSEUDO_BUILD=0




  reply	other threads:[~2012-03-27 13:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-27 11:50 [PATCH 0/3] Fixes for bitbake wrapper script Paul Eggleton
2012-03-27 11:50 ` [PATCH 1/3] scripts/bitbake: try harder to check if pseudo exists Paul Eggleton
2012-03-27 13:08   ` Andreas Oberritter [this message]
2012-03-27 13:14     ` Paul Eggleton
2012-03-27 11:50 ` [PATCH 2/3] scripts/bitbake: allow switching between build directories Paul Eggleton
2012-03-27 13:09   ` Andreas Oberritter
2012-03-27 11:50 ` [PATCH 3/3] scripts/bitbake: add/fix some comments Paul Eggleton
2012-03-27 13:09   ` Andreas Oberritter
2012-03-31 15:45 ` [PATCH 0/3] Fixes for bitbake wrapper script Paul Eggleton
2012-04-03 23:33 ` Saul Wold

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=4F71BBCC.4030307@opendreambox.org \
    --to=obi@opendreambox.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul.eggleton@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.