[oe-commits] [openembedded-core] 65/65: sstate: Ensure installation directory is empty before execution

git at git.openembedded.org git at git.openembedded.org
Wed Mar 22 10:14:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit d1d55041e38b12d40f896834b56475ea19a6047f
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Mar 22 10:02:51 2017 +0000

    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.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/sstate.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index a780926..af58854 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -313,6 +313,11 @@ def sstate_installpkg(ss, d):
         if not signer.verify(sstatepkg + '.sig'):
             bb.warn("Cannot verify signature on sstate package %s" % sstatepkg)
 
+    # Empty sstateinst directory, ensure its clean
+    if os.path.exists(sstateinst):
+        oe.path.remove(sstateinst)
+    bb.utils.mkdirhier(sstateinst)
+
     sstateinst = d.getVar("SSTATE_INSTDIR")
     d.setVar('SSTATE_FIXMEDIR', ss['fixmedir'])
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list