[OE-core] [PATCH 1/6] scripts/bitbake: ensure user is in build directory
Andreas Oberritter
obi at opendreambox.org
Thu Mar 15 00:30:31 UTC 2012
Hello Paul,
On 14.03.2012 01:36, Paul Eggleton wrote:
> If the user is in any directory other than $BUILDDIR when the bitbake
> wrapper script is run, then show an error an exit.
this patch broke my setup.
My $BUILDDIR points to tmp, so that pseudo doesn't get rebuilt for every
machine. I have a shared tmp for many machines.
BUILDDIR doesn't seem to have any other use than pointing to the
'pseudodone' file. I don't understand why it's required to run bitbake
from there.
I'm using a tiny shell fragment to set up my build environment. This is
how it looks like:
export BUILDDIR=${PREFIX}/tmp
export
PATH=${PREFIX}/openembedded-core/scripts:${PREFIX}/bitbake/bin:${PATH}
local.conf and bblayers.conf for individual machines are stored in
${PREFIX}/build/${MACHINE}/conf.
Regards,
Andreas
> Fixes [YOCTO #2071].
>
> Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
> ---
> scripts/bitbake | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/bitbake b/scripts/bitbake
> index dda3b26..45c8697 100755
> --- a/scripts/bitbake
> +++ b/scripts/bitbake
> @@ -47,6 +47,11 @@ float_test() {
> # but earlier versions do not
> float_test "$TARVERSION > 1.23" && needtar="0"
>
> +if [ "`pwd`" != "$BUILDDIR" ] ; then
> + echo "BitBake must be run from your build directory: $BUILDDIR"
> + exit 1
> +fi
> +
> buildpseudo="1"
> if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then
> PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
More information about the Openembedded-core
mailing list