summaryrefslogtreecommitdiffstats
path: root/meta
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 15:33:07 +0000
commit01218e29f963120c77885964702198d9bce77e11 (patch)
tree426b841c1df9ee4d755e87fbd183504129ff1bc3 /meta
parent42c445bc04afe19413b2d89719400ef1f1bbf9c9 (diff)
downloadpoky-01218e29f963120c77885964702198d9bce77e11.tar.gz
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. (From OE-Core rev: 518dffe20178f5969dddccb17d6ab347afb72beb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sstate.bbclass8
-rw-r--r--meta/conf/bitbake.conf1
2 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 0d16d118d9..15706541ae 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -153,6 +153,12 @@ def sstate_installpkg(ss, d):
153 bb.mkdirhier(dir) 153 bb.mkdirhier(dir)
154 oe.path.remove(dir) 154 oe.path.remove(dir)
155 155
156 # We're adding binaries into the sysroots, we don't want to execute them
157 # whilst they're half installed or being installed so we need to
158 # remove the sysroots from PATH
159 savedpath = d.getVar("PATH")
160 d.setVar("PATH", "${ORIGPATH}")
161
156 sstateinst = d.expand("${WORKDIR}/sstate-install-%s/" % ss['name']) 162 sstateinst = d.expand("${WORKDIR}/sstate-install-%s/" % ss['name'])
157 sstatepkg = d.getVar('SSTATE_PKG', True) + '_' + ss['name'] + ".tgz" 163 sstatepkg = d.getVar('SSTATE_PKG', True) + '_' + ss['name'] + ".tgz"
158 164
@@ -190,6 +196,8 @@ def sstate_installpkg(ss, d):
190 # conflict with another writer 196 # conflict with another writer
191 os.remove(fixmefn) 197 os.remove(fixmefn)
192 198
199 d.setVar("PATH", savedpath)
200
193 for state in ss['dirs']: 201 for state in ss['dirs']:
194 prepdir(state[1]) 202 prepdir(state[1])
195 os.rename(sstateinst + state[0], state[1]) 203 os.rename(sstateinst + state[0], state[1])
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 17d2f265de..07982d783d 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -401,6 +401,7 @@ EXTRA_IMAGEDEPENDS = ""
401# Toolchain info. 401# Toolchain info.
402################################################################## 402##################################################################
403 403
404ORIGPATH := "${PATH}"
404PATH_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}:" 405PATH_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}:"
405export PATH 406export PATH
406 407