summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-21 10:44:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-21 14:31:42 +0000
commit518dffe20178f5969dddccb17d6ab347afb72beb (patch)
treee1fa659c8daf470a1d961b79601faf8200db1f30 /meta/classes
parent33046605549501bed9ceff102614d86ba54a5891 (diff)
downloadopenembedded-core-518dffe20178f5969dddccb17d6ab347afb72beb.tar.gz
openembedded-core-518dffe20178f5969dddccb17d6ab347afb72beb.tar.bz2
openembedded-core-518dffe20178f5969dddccb17d6ab347afb72beb.tar.xz
openembedded-core-518dffe20178f5969dddccb17d6ab347afb72beb.zip
bitbake.conf/sstate.bbclass: Change PATH when installing sstate files to avoid issues
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>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sstate.bbclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 0d16d118d..15706541a 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -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])