From b28374cfad37db161b5ac5953b4a4638912f3f27 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Tue, 3 Oct 2017 10:09:26 +0300 Subject: 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 Signed-off-by: Ross Burton --- meta/classes/staging.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/classes/staging.bbclass') diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index d21e198ae8..c479bd93ea 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass @@ -167,7 +167,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) -- cgit 1.2.3-korg