Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@opendreambox.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Cc: Paul Eggleton <paul.eggleton@linux.intel.com>
Subject: Re: [PATCH] scripts/bitbake: Allow to override path to pseudodone, make BUILDDIR optional
Date: Mon, 26 Mar 2012 16:38:06 +0200	[thread overview]
Message-ID: <4F707F4E.1060908@opendreambox.org> (raw)
In-Reply-To: <4F7044F5.30500@opendreambox.org>

On 26.03.2012 12:29, Andreas Oberritter wrote:
> On 26.03.2012 12:07, Paul Eggleton wrote:
>> On Friday 23 March 2012 21:20:28 Andreas Oberritter wrote:
>>> how do you propose to go on solving this problem?
>>
>> My original patch solved a problem for many newer users who forget to cd back 
>> to their build directories before running bitbake. At least now they get a 
>> reasonable error message they can understand. I'm not going to support 
>> reverting it unless we have a practical alternative and so far I don't see 
>> one.
>>
>> Your original reason for using the configuration you use was that pseudo was 
>> being rebuilt for every new configuration. I have a fix here locally which will 
>> skip doing this - it just needs to call bitbake -e in order to find out 
>> STAGING_BINDIR_NATIVE if pseudodone hasn't been created.
> 
> Yes, this was my original reason (or better: the first one I mentioned).
> 
> However, I still don't want to export BUILDDIR just to run bitbake. It's
> much more convenient to just have to call bitbake directly from every
> machine's build directory than having to set up the environment every
> single time the machine changes. How are me and my distro's users
> supposed to do this in the future?
> 
> Can't bitbake just print a useful error message on its own if it doesn't
> find a usable configuration?

OK, I managed to find a way that's ok for me. I added a wrapper script that
wraps the bitbake wrapper script and sets BUILDDIR automatically. This way
I can als get rid of oe-core/scripts from PATH.

Can you please ack this patch below, though? This keeps your change intact
and surely causes no trouble for you.

Regards,
Andreas

From 92fd89c65a52e68bb0014e3798dabeeedda52c1c Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <obi@opendreambox.org>
Date: Tue, 20 Mar 2012 14:28:41 +0100
Subject: [PATCH] scripts/bitbake: Allow to override path to pseudodone

* Allows to workaround breakage caused by commit
  b4df1c7c79b5c801658bcf890ba3a8eab3d83189.

* Related thread on OE-core mailing list:
  http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/019136.html

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 scripts/bitbake |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/scripts/bitbake b/scripts/bitbake
index 45c8697..ea24de7 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -52,9 +52,13 @@ if [ "`pwd`" != "$BUILDDIR" ] ; then
     exit 1
 fi
 
+if [ -z "$PSEUDODONE" ]; then
+    PSEUDODONE="$BUILDDIR/pseudodone"
+fi
+
 buildpseudo="1"
-if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then
-    PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
+if [ $needpseudo = "1" ] && [ -e "$PSEUDODONE" ]; then
+    PSEUDOBINDIR=`cat $PSEUDODONE`
     if [ -e "$PSEUDOBINDIR/pseudo" -a -e "$PSEUDOBINDIR/tar" -a "$needtar" = "1" ]; then
         buildpseudo="0"
     fi
@@ -96,7 +100,7 @@ if [ $buildpseudo = "1" ]; then
     if [ "$ret" != "0" ]; then
         exit 1
     fi
-    echo $PSEUDOBINDIR > $BUILDDIR/pseudodone
+    echo $PSEUDOBINDIR > $PSEUDODONE
     # This needs to exist in case pseudo has to log somewhere
     mkdir -p $PSEUDOBINDIR/../../var/pseudo
 fi
@@ -104,7 +108,7 @@ BITBAKE=`which bitbake`
 export PATH=$OLDPATH
 if [ $needpseudo = "1" ]; then
     export PSEUDO_BUILD=2
-    PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
+    PSEUDOBINDIR=`cat $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-26 14:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 13:37 [PATCH] scripts/bitbake: Allow to override path to pseudodone, make BUILDDIR optional Andreas Oberritter
2012-03-23 20:20 ` Andreas Oberritter
2012-03-26 10:07   ` Paul Eggleton
2012-03-26 10:29     ` Andreas Oberritter
2012-03-26 14:38       ` Andreas Oberritter [this message]
2012-03-26 14:48         ` Paul Eggleton
2012-03-26 14:57           ` Andreas Oberritter
2012-03-26 15:09             ` Paul Eggleton

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=4F707F4E.1060908@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox