diff options
author | Mikko Ylinen <mikko.ylinen@linux.intel.com> | 2017-12-06 14:53:18 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-07 17:07:57 +0000 |
commit | e8b99fac13e89361fa388297944c854e2c057b56 (patch) | |
tree | afcc382d37325d035164d74881f391aa3ad9bf83 /meta/classes/useradd.bbclass | |
parent | 5e85fb27536634542c8451eda743d419898b517b (diff) | |
download | poky-e8b99fac13e89361fa388297944c854e2c057b56.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: 764b93cac374a55c31c86627f13270db874cdbdb)
Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/useradd.bbclass')
-rw-r--r-- | meta/classes/useradd.bbclass | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass index 0f51e5522b..0f551b50f3 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. |
138 | EXTRA_STAGING_FIXMES += "COMPONENTS_DIR" | 139 | EXTRA_STAGING_FIXMES += "COMPONENTS_DIR PSEUDO_LOCALSTATEDIR LOGFIFO" |
139 | 140 | ||
140 | python useradd_sysroot_sstate () { | 141 | python useradd_sysroot_sstate () { |
141 | task = d.getVar("BB_CURRENTTASK") | 142 | task = d.getVar("BB_CURRENTTASK") |