summaryrefslogtreecommitdiffstats
path: root/meta/classes/useradd.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-31 08:54:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-30 16:44:42 +0100
commitbcdafed2db2ad822288faec6103328f465d57197 (patch)
tree75f57cdb2a562ff70e96ced230c500b753aacaf7 /meta/classes/useradd.bbclass
parentdabc1206b54d423996c311126f2bacc445fb2459 (diff)
downloadpoky-bcdafed2db2ad822288faec6103328f465d57197.tar.gz
useradd: Fix build architecture corruption of sstate artefacts
When mixing aarch64 and x86_64 host builds with common sstate, useradd failures were found. This was due to references to: /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/sysroots-components/aarch64/pseudo-native/usr/bin/pseudo or /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/sysroots-components/x86_64/pseudo-native/usr/bin/pseudo on the wrong architecture within the useradd postinst files. Instead of using COMPONENTS_DIR as the FIXME, use PSEUDO_SYSROOT which contains the arch component as well to avoid this. Add extra comments to cause the relavent sstate to be rebuilt. (From OE-Core rev: 441a2b8979e69c20e7ed0178cdb210eecdec91e1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0384622f72a6c0bd8225cf06f692340fdef67d4a) 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.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 124becd082..5e600dec84 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -100,6 +100,8 @@ useradd_sysroot () {
100 # Pseudo may (do_prepare_recipe_sysroot) or may not (do_populate_sysroot_setscene) be running 100 # Pseudo may (do_prepare_recipe_sysroot) or may not (do_populate_sysroot_setscene) be running
101 # at this point so we're explicit about the environment so pseudo can load if 101 # at this point so we're explicit about the environment so pseudo can load if
102 # not already present. 102 # not already present.
103 # PSEUDO_SYSROOT can contain references to the build architecture and COMPONENT_DIR
104 # so needs the STAGING_FIXME below
103 export PSEUDO="${FAKEROOTENV} ${PSEUDO_SYSROOT}${bindir_native}/pseudo" 105 export PSEUDO="${FAKEROOTENV} ${PSEUDO_SYSROOT}${bindir_native}/pseudo"
104 106
105 # Explicitly set $D since it isn't set to anything 107 # Explicitly set $D since it isn't set to anything
@@ -134,10 +136,10 @@ useradd_sysroot () {
134} 136}
135 137
136# The export of PSEUDO in useradd_sysroot() above contains references to 138# The export of PSEUDO in useradd_sysroot() above contains references to
137# ${COMPONENTS_DIR} and ${PSEUDO_LOCALSTATEDIR}. Additionally, the logging 139# ${PSEUDO_SYSROOT} and ${PSEUDO_LOCALSTATEDIR}. Additionally, the logging
138# shell functions use ${LOGFIFO}. These need to be handled when restoring 140# shell functions use ${LOGFIFO}. These need to be handled when restoring
139# postinst-useradd-${PN} from the sstate cache. 141# postinst-useradd-${PN} from the sstate cache.
140EXTRA_STAGING_FIXMES += "COMPONENTS_DIR PSEUDO_LOCALSTATEDIR LOGFIFO" 142EXTRA_STAGING_FIXMES += "PSEUDO_SYSROOT PSEUDO_LOCALSTATEDIR LOGFIFO"
141 143
142python useradd_sysroot_sstate () { 144python useradd_sysroot_sstate () {
143 scriptfile = None 145 scriptfile = None