diff options
-rw-r--r-- | meta/classes/sanity.bbclass | 25 | ||||
-rwxr-xr-x | scripts/bitbake | 3 | ||||
-rwxr-xr-x | scripts/poky-env-internal | 2 |
3 files changed, 28 insertions, 2 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index a6d320b167..6e13d2ac4d 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -40,7 +40,26 @@ def check_sanity_tmpdir_change(tmpdir): | |||
40 | def check_sanity_version_change(): | 40 | def check_sanity_version_change(): |
41 | # Sanity checks to be done when SANITY_VERSION changes | 41 | # Sanity checks to be done when SANITY_VERSION changes |
42 | return "" | 42 | return "" |
43 | 43 | ||
44 | def check_pseudo_wrapper(): | ||
45 | import subprocess as sub | ||
46 | # Check if bitbake wrapper is being used | ||
47 | pseudo_build = os.environ.get( 'PSEUDO_BUILD' ) | ||
48 | if not pseudo_build: | ||
49 | bb.warn("Bitbake has not been run using the bitbake wrapper (scripts/bitbake); this is likely because your PATH has been altered from that normally set up by the poky-init-build-env script. Not using the wrapper may result in failures during package installation, so it is highly recommended that you set your PATH back so that the wrapper script is being executed.") | ||
50 | |||
51 | if (not pseudo_build) or pseudo_build == '2': | ||
52 | # pseudo ought to be working, let's see if it is... | ||
53 | p = sub.Popen(['sh', '-c', 'PSEUDO_DISABLED=0 id -u'],stdout=sub.PIPE,stderr=sub.PIPE) | ||
54 | out, err = p.communicate() | ||
55 | if out.rstrip() != '0': | ||
56 | msg = "Pseudo is not functioning correctly, which will cause failures during package installation. Please check your configuration." | ||
57 | if pseudo_build == '2': | ||
58 | return msg | ||
59 | else: | ||
60 | bb.warn(msg) | ||
61 | return "" | ||
62 | |||
44 | def check_create_long_filename(filepath, pathname): | 63 | def check_create_long_filename(filepath, pathname): |
45 | testfile = os.path.join(filepath, ''.join([`num`[-1] for num in xrange(1,200)])) | 64 | testfile = os.path.join(filepath, ''.join([`num`[-1] for num in xrange(1,200)])) |
46 | try: | 65 | try: |
@@ -187,6 +206,10 @@ def check_sanity(e): | |||
187 | missing = missing.rstrip(',') | 206 | missing = missing.rstrip(',') |
188 | messages = messages + "Please install following missing utilities: %s\n" % missing | 207 | messages = messages + "Please install following missing utilities: %s\n" % missing |
189 | 208 | ||
209 | pseudo_msg = check_pseudo_wrapper() | ||
210 | if pseudo_msg != "": | ||
211 | messages = messages + pseudo_msg + '\n' | ||
212 | |||
190 | # Check if DISPLAY is set if IMAGETEST is set | 213 | # Check if DISPLAY is set if IMAGETEST is set |
191 | if not data.getVar( 'DISPLAY', e.data, True ) and data.getVar( 'IMAGETEST', e.data, True ) == 'qemu': | 214 | if not data.getVar( 'DISPLAY', e.data, True ) and data.getVar( 'IMAGETEST', e.data, True ) == 'qemu': |
192 | messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n' | 215 | messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n' |
diff --git a/scripts/bitbake b/scripts/bitbake index cad4dbe1b4..29e7bcd8fe 100755 --- a/scripts/bitbake +++ b/scripts/bitbake | |||
@@ -27,6 +27,7 @@ OLDPATH=$PATH | |||
27 | export PATH=`echo $PATH | sed s#[^:]*/scripts:##` | 27 | export PATH=`echo $PATH | sed s#[^:]*/scripts:##` |
28 | if [ $buildpseudo = "1" ]; then | 28 | if [ $buildpseudo = "1" ]; then |
29 | echo "Pseudo is not present but is required, building this first before the main build" | 29 | echo "Pseudo is not present but is required, building this first before the main build" |
30 | export PSEUDO_BUILD=1 | ||
30 | bitbake pseudo-native tar-replacement-native -c populate_sysroot | 31 | bitbake pseudo-native tar-replacement-native -c populate_sysroot |
31 | ret=$? | 32 | ret=$? |
32 | if [ "$ret" != "0" ]; then | 33 | if [ "$ret" != "0" ]; then |
@@ -44,9 +45,11 @@ fi | |||
44 | BITBAKE=`which bitbake` | 45 | BITBAKE=`which bitbake` |
45 | export PATH=$OLDPATH | 46 | export PATH=$OLDPATH |
46 | if [ $needpseudo = "1" ]; then | 47 | if [ $needpseudo = "1" ]; then |
48 | export PSEUDO_BUILD=2 | ||
47 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` | 49 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` |
48 | PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@ | 50 | PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@ |
49 | else | 51 | else |
52 | export PSEUDO_BUILD=0 | ||
50 | $BITBAKE $@ | 53 | $BITBAKE $@ |
51 | fi | 54 | fi |
52 | ret=$? | 55 | ret=$? |
diff --git a/scripts/poky-env-internal b/scripts/poky-env-internal index 724a6e4e5c..554945452a 100755 --- a/scripts/poky-env-internal +++ b/scripts/poky-env-internal | |||
@@ -55,6 +55,6 @@ unset BITBAKEDIR | |||
55 | export BUILDDIR | 55 | export BUILDDIR |
56 | export PATH | 56 | export PATH |
57 | 57 | ||
58 | export BB_ENV_EXTRAWHITE="MACHINE DISTRO POKYMODE POKYLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND PSEUDO_DISABLED" | 58 | export BB_ENV_EXTRAWHITE="MACHINE DISTRO POKYMODE POKYLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND PSEUDO_DISABLED PSEUDO_BUILD" |
59 | 59 | ||
60 | export BBFETCH2=True | 60 | export BBFETCH2=True |