summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-22 10:02:51 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-22 11:35:22 +0000
commit0cb6f853357f26962748ab1a21490e7d4af53af0 (patch)
tree874fbfa373108d38ec163dc0b9f4770dce3bd75e /meta/classes/sstate.bbclass
parent52d7d2c06b7d48594d5388644a826b4d0f0057a4 (diff)
downloadpoky-0cb6f853357f26962748ab1a21490e7d4af53af0.tar.gz
sstate: Ensure installation directory is empty before execution
When you enable the systemd DISTRO_FEATURE, opkg-native contains systemd units which have a relocation fixme list. When systemd isn't in DISTRO_FEATURES, there are no fixmes required. Unfortunately as sstate isn't cleaning up its installation directory before use, if you install the systemd version, then install the non-systemd version from sstate, it would leave behind the fixme file from the systemd version and breakage results as it would try and fixup files which don't exist. The solution is to ensure the unpack/install directory is clean before use. It does raise other questions about opkg-native, systemd and DISTRO_FEATURES but there is an underlying sstate issue here too which would cause missing file failures. (From OE-Core rev: d1d55041e38b12d40f896834b56475ea19a6047f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index a780926797..af588548c2 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -313,6 +313,11 @@ def sstate_installpkg(ss, d):
313 if not signer.verify(sstatepkg + '.sig'): 313 if not signer.verify(sstatepkg + '.sig'):
314 bb.warn("Cannot verify signature on sstate package %s" % sstatepkg) 314 bb.warn("Cannot verify signature on sstate package %s" % sstatepkg)
315 315
316 # Empty sstateinst directory, ensure its clean
317 if os.path.exists(sstateinst):
318 oe.path.remove(sstateinst)
319 bb.utils.mkdirhier(sstateinst)
320
316 sstateinst = d.getVar("SSTATE_INSTDIR") 321 sstateinst = d.getVar("SSTATE_INSTDIR")
317 d.setVar('SSTATE_FIXMEDIR', ss['fixmedir']) 322 d.setVar('SSTATE_FIXMEDIR', ss['fixmedir'])
318 323