[oe-commits] [openembedded-core] 14/20: staging.bbclass: handle postinst-useradd-* fixmes

git at git.openembedded.org git at git.openembedded.org
Sun Jan 7 17:12:15 UTC 2018


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

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

commit 764b93cac374a55c31c86627f13270db874cdbdb
Author: Mikko Ylinen <mikko.ylinen at linux.intel.com>
AuthorDate: Wed Dec 6 14:53:18 2017 -0800

    staging.bbclass: handle postinst-useradd-* fixmes
    
    After 02457ef7f600ce954874e2d11e74b1c6daaa3bfc, PSEUDO for
    postinst-useradd-* scripts get to use only one PSEUDO_LOCALSTATEDIR
    which is set under recipes ${WORKDIR}.
    
    When the those scripts are run in a clean build environment that
    is built from the sstate (populate_sysroot_setscene run for
    postinst-useradd-* providers), pseudo fails to run because it cannot
    access the PSEUDO_LOCALSTATEDIR (recipe ${WORKDIR}s do not exist).
    This triggers a sysroot staging error.
    
    Previously, the PSEUDO_LOCALSTATEDIR setting in useradd.bbclass
    worked because the RSS sstate/staging logic automagically processed
    ${STAGING_DIR_TARGET} in postinst-useradd-* scripts to point under
    the sysroot being built.
    
    The fix uses the same fixme processing by adding PSEUDO_LOCALSTATEDIR
    variable to it. Furthermore, LOGFIFO is added to be able to use
    the logging fifo of the recipe that actually runs postinst-useradd-*.
    
    Signed-off-by: Mikko Ylinen <mikko.ylinen at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/classes/staging.bbclass | 2 +-
 meta/classes/useradd.bbclass | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index a90cf43..984051d 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -249,7 +249,7 @@ def staging_processfixme(fixme, target, recipesysroot, recipesysrootnative, d):
     if not fixme:
         return
     cmd = "sed -e 's:^[^/]*/:%s/:g' %s | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIRHOST:%s:g'" % (target, " ".join(fixme), recipesysroot, recipesysrootnative)
-    for fixmevar in ['COMPONENTS_DIR', 'HOSTTOOLS_DIR', 'PKGDATA_DIR']:
+    for fixmevar in ['COMPONENTS_DIR', 'HOSTTOOLS_DIR', 'PKGDATA_DIR', 'PSEUDO_LOCALSTATEDIR', 'LOGFIFO']:
         fixme_path = d.getVar(fixmevar)
         cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path)
     bb.debug(2, cmd)
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 0f51e55..0f551b5 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -133,9 +133,10 @@ useradd_sysroot () {
 }
 
 # The export of PSEUDO in useradd_sysroot() above contains references to
-# ${COMPONENTS_DIR}. These need to be handled when restoring
+# ${COMPONENTS_DIR} and ${PSEUDO_LOCALSTATEDIR}. Additionally, the logging
+# shell functions use ${LOGFIFO}. These need to be handled when restoring
 # postinst-useradd-${PN} from the sstate cache.
-EXTRA_STAGING_FIXMES += "COMPONENTS_DIR"
+EXTRA_STAGING_FIXMES += "COMPONENTS_DIR PSEUDO_LOCALSTATEDIR LOGFIFO"
 
 python useradd_sysroot_sstate () {
     task = d.getVar("BB_CURRENTTASK")

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


More information about the Openembedded-commits mailing list