summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMikko Ylinen <mikko.ylinen@linux.intel.com>2017-10-03 07:09:26 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-10-07 22:20:40 (GMT)
commit5b28fe163a177ee6aae94fc558bb248027e7460d (patch)
tree964f07c6880889ef46c51326f4cb4d24db63668c /meta
parent4433e8616e92ab5075f28a3d406ecd98e5c6fc05 (diff)
downloadpoky-5b28fe163a177ee6aae94fc558bb248027e7460d.tar.gz
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-*. (From OE-Core rev: b28374cfad37db161b5ac5953b4a4638912f3f27) Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/staging.bbclass2
-rw-r--r--meta/classes/useradd.bbclass5
2 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index d21e198..c479bd9 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -167,7 +167,7 @@ def staging_processfixme(fixme, target, recipesysroot, recipesysrootnative, d):
167 if not fixme: 167 if not fixme:
168 return 168 return
169 cmd = "sed -e 's:^[^/]*/:%s/:g' %s | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIRHOST:%s:g'" % (target, " ".join(fixme), recipesysroot, recipesysrootnative) 169 cmd = "sed -e 's:^[^/]*/:%s/:g' %s | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIRHOST:%s:g'" % (target, " ".join(fixme), recipesysroot, recipesysrootnative)
170 for fixmevar in ['COMPONENTS_DIR', 'HOSTTOOLS_DIR', 'PKGDATA_DIR']: 170 for fixmevar in ['COMPONENTS_DIR', 'HOSTTOOLS_DIR', 'PKGDATA_DIR', 'PSEUDO_LOCALSTATEDIR', 'LOGFIFO']:
171 fixme_path = d.getVar(fixmevar) 171 fixme_path = d.getVar(fixmevar)
172 cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path) 172 cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path)
173 bb.debug(2, cmd) 173 bb.debug(2, cmd)
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 686e5fb..c9103cb 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -133,9 +133,10 @@ useradd_sysroot () {
133} 133}
134 134
135# The export of PSEUDO in useradd_sysroot() above contains references to 135# The export of PSEUDO in useradd_sysroot() above contains references to
136# ${COMPONENTS_DIR}. These need to be handled when restoring 136# ${COMPONENTS_DIR} and ${PSEUDO_LOCALSTATEDIR}. Additionally, the logging
137# shell functions use ${LOGFIFO}. These need to be handled when restoring
137# postinst-useradd-${PN} from the sstate cache. 138# postinst-useradd-${PN} from the sstate cache.
138EXTRA_STAGING_FIXMES += "COMPONENTS_DIR" 139EXTRA_STAGING_FIXMES += "COMPONENTS_DIR PSEUDO_LOCALSTATEDIR LOGFIFO"
139 140
140python useradd_sysroot_sstate () { 141python useradd_sysroot_sstate () {
141 scriptfile = None 142 scriptfile = None