From: Peter Kjellerstedt Date: Wed, 3 May 2017 21:13:39 +0000 (+0200) Subject: useradd.bbclass: Handle COMPONENTS_DIR when restoring state X-Git-Tag: uninative-1.7~966 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=097875bc9ab9d60a452b01ac6825775983684d68;p=openembedded-core.git useradd.bbclass: Handle COMPONENTS_DIR when restoring state The export of PSEUDO in useradd_sysroot() contains references to ${COMPONENTS_DIR}. These need to be handled when restoring postinst-useradd-${PN} from the sstate cache. Signed-off-by: Peter Kjellerstedt Signed-off-by: Richard Purdie --- diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index 31cd625640..565638f48d 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 ['HOSTTOOLS_DIR', 'PKGDATA_DIR']: + for fixmevar in ['COMPONENTS_DIR', 'HOSTTOOLS_DIR', 'PKGDATA_DIR']: fixme_path = d.getVar(fixmevar) cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path) bb.note(cmd) diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass index 4373677bd6..92e45ff9bc 100644 --- a/meta/classes/useradd.bbclass +++ b/meta/classes/useradd.bbclass @@ -132,6 +132,11 @@ useradd_sysroot () { useradd_preinst } +# The export of PSEUDO in useradd_sysroot() above contains references to +# ${COMPONENTS_DIR}. These need to be handled when restoring +# postinst-useradd-${PN} from the sstate cache. +EXTRA_STAGING_FIXMES += "COMPONENTS_DIR" + python useradd_sysroot_sstate () { task = d.getVar("BB_CURRENTTASK") if task == "package_setscene":