]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake.conf/sstate.bbclass: Change PATH when installing sstate files to avoid issues
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Mar 2012 10:44:43 +0000 (10:44 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Mar 2012 14:31:42 +0000 (14:31 +0000)
This resolves issues related to pigz-native when installing from sstate that people
have been seeing. It also gives us a way to solve issues like the gzip-native race
during sstate package creation covered in Yocto #1774.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass
meta/conf/bitbake.conf

index 0d16d118d9ee551e80071779393de8ca2caf32ff..15706541aebb5eafc362ec0c85fba9adab020e69 100644 (file)
@@ -153,6 +153,12 @@ def sstate_installpkg(ss, d):
         bb.mkdirhier(dir)
         oe.path.remove(dir)
 
+    # We're adding binaries into the sysroots, we don't want to execute them
+    # whilst they're half installed or being installed so we need to
+    # remove the sysroots from PATH
+    savedpath = d.getVar("PATH")
+    d.setVar("PATH", "${ORIGPATH}")
+
     sstateinst = d.expand("${WORKDIR}/sstate-install-%s/" % ss['name'])
     sstatepkg = d.getVar('SSTATE_PKG', True) + '_' + ss['name'] + ".tgz"
 
@@ -190,6 +196,8 @@ def sstate_installpkg(ss, d):
         # conflict with another writer
         os.remove(fixmefn)
 
+    d.setVar("PATH", savedpath)
+
     for state in ss['dirs']:
         prepdir(state[1])
         os.rename(sstateinst + state[0], state[1])
index 17d2f265de69e710f31ce2b6cbc0382e67ce4cb9..07982d783d8908da35f8cb32ad78d17bcd78b963 100644 (file)
@@ -401,6 +401,7 @@ EXTRA_IMAGEDEPENDS = ""
 # Toolchain info.
 ##################################################################
 
+ORIGPATH := "${PATH}"
 PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}:${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}/${base_bindir_native}:"
 export PATH