summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2008-11-06 14:39:12 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2008-11-06 14:40:30 +0000
commit9715260c3567510a97b8aaf6408a79e07930f21e (patch)
treefa2bb9ad4bd2acaacddbe1d328555ee4bf425305 /scripts
parent9e8d22ae3868b6ea6ebdd64be64b1202b90fe593 (diff)
downloadpoky-9715260c3567510a97b8aaf6408a79e07930f21e.tar.gz
scripts/poky-env-internal: Automatically add in additional meta- repositories if found
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/poky-env-internal64
1 files changed, 45 insertions, 19 deletions
diff --git a/scripts/poky-env-internal b/scripts/poky-env-internal
index 81b1425489..8655bb1f24 100755
--- a/scripts/poky-env-internal
+++ b/scripts/poky-env-internal
@@ -30,14 +30,47 @@ if [ "x$BDIR" = "x" ]; then
30 BDIR="$1" 30 BDIR="$1"
31 fi 31 fi
32fi 32fi
33
34BBDIR="$OEROOT/bitbake$BBEXTRA/"
35PKGDIR="$OEROOT/meta/"
36PKGDIR_MOBLIN="$OEROOT/meta-moblin/"
37BUILDDIR="$OEROOT/$BDIR/" 33BUILDDIR="$OEROOT/$BDIR/"
38MSG=''
39
40unset BDIR 34unset BDIR
35BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
36PKGDIR="$OEROOT/meta/"
37BBPATH="$BITBAKEDIR $PKGDIR"
38
39#
40# Add in any extra meta-* repositories to BBPATH
41#
42METAREPOS=`cd $OEROOT; find . -maxdepth 1 -name 'meta-*' -type d| sed -e 's#./##g'`
43for repo in $METAREPOS
44do
45 # meta-openmoko is disabled by default - see local.conf.sample to enable it
46 if [ $repo = "meta-openmoko" ]; then
47 continue
48 fi
49 # meta-extras is disabled by default - see local.conf.sample to enable it
50 if [ $repo = "meta-extras" ]; then
51 continue
52 fi
53 if [ -e $OEROOT/$repo/poky-extra-environment ]; then
54 . $OEROOT/$repo/poky-extra-environment
55 fi
56 BBPATH=" $BBPATH $OEROOT/$repo"
57done
58
59BBPATH="$BBPATH $HOME/.oe $HOME/.poky $BUILDDIR"
60
61#
62# Remove any symlinks from BBPATH
63#
64NEWPATH=""
65for p in $BBPATH
66do
67 p2=`readlink -f "$p"`
68 NEWPATH="$p2:$NEWPATH"
69done
70BBPATH="$NEWPATH"
71
72
73MSG=''
41 74
42BUILD_ARCH=`uname -m` 75BUILD_ARCH=`uname -m`
43BUILD_OS=`uname | tr '[A-Z]' '[a-z]'` 76BUILD_OS=`uname | tr '[A-Z]' '[a-z]'`
@@ -52,26 +85,19 @@ BBDIR=`readlink -f "$BBDIR"`
52PKGDIR=`readlink -f "$PKGDIR"` 85PKGDIR=`readlink -f "$PKGDIR"`
53BUILDDIR=`readlink -f "$BUILDDIR"` 86BUILDDIR=`readlink -f "$BUILDDIR"`
54 87
55if ! (test -d "$BBDIR" && test -d "$PKGDIR" && test -d "$BUILDDIR"); then 88if ! (test -d "$BITBAKEDIR" && test -d "$PKGDIR" && test -d "$BUILDDIR"); then
56 echo >&2 "Error: Not all directories exist! Did you run this script in poky directory?" 89 echo >&2 "Error: Not all directories exist! Did you run this script in poky directory?"
57 return 90 return
58fi 91fi
59 92
60if ! (test -r "$BUILDDIR/conf/local.conf"); then 93if [ "x" = "x$POKYLOCALCONF" ]; then
61 cp -f $BUILDDIR/conf/local.conf.sample $BUILDDIR/conf/local.conf 94 POKYLOCALCONF="$BUILDDIR/conf/local.conf.sample"
62fi 95fi
63 96
64BBPATH=$BBDIR 97if ! (test -r "$BUILDDIR/conf/local.conf"); then
65if test x"$BBDIR" != x"$PKGDIR_MOBLIN"; then 98 cp -f $POKYLOCALCONF $BUILDDIR/conf/local.conf
66 BBPATH=$PKGDIR_MOBLIN:$BBPATH
67fi
68if test x"$BBDIR" != x"$PKGDIR"; then
69 BBPATH=$PKGDIR:$BBPATH
70fi
71BBPATH="`readlink -f $HOME/.oe`:`readlink -f $HOME/.poky`:$BBPATH"
72if test x"$PKGDIR" != x"$BUILDDIR"; then
73 BBPATH=$BUILDDIR:$BBPATH
74fi 99fi
100
75export BBPATH OEROOT BUILD_SYS BUILDDIR 101export BBPATH OEROOT BUILD_SYS BUILDDIR
76 102
77# Kill off the TERMINFO variable, as glibc will grab its contents in its 'make 103# Kill off the TERMINFO variable, as glibc will grab its contents in its 'make