summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-26 12:51:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-27 09:40:07 +0000
commit3b47c5310ad94bd73073ab881ada5cb7ec98271a (patch)
tree85920bc34d0360fcaabb9558e6b8315b27bd871e /meta
parent0a3a15c8dd27f27424c1d150192438df2e8fee1b (diff)
downloadpoky-3b47c5310ad94bd73073ab881ada5cb7ec98271a.tar.gz
useradd.bbclass: Ensure pseudo can load in the pseudo unloaded case
In the do_populate_sysroot_setscene case, pseudo has been unloaded and we need to reload it. This code change ensures all the pseudo options are specified so pseudo loads correctly. It also improves some of the comments so all the different contexts are listed. (From OE-Core rev: 76345cd61c9523ce6755ef8e923dec37800b7a98) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/useradd.bbclass16
1 files changed, 11 insertions, 5 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 2cffbfa12c..6ee575e4ca 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -6,9 +6,13 @@ USERADDDEPENDS = " base-passwd shadow-native shadow-sysroot shadow"
6USERADDDEPENDS_virtclass-native = "" 6USERADDDEPENDS_virtclass-native = ""
7USERADDDEPENDS_virtclass-nativesdk = "" 7USERADDDEPENDS_virtclass-nativesdk = ""
8 8
9# This preinstall function will be run in two contexts: once for the 9# This preinstall function can be run in four different contexts:
10# native sysroot (as invoked by the useradd_sysroot() wrapper), and 10#
11# also as the preinst script in the target package. 11# a) Before do_install
12# b) At do_populate_sysroot_setscene when installing from sstate packages
13# c) As the preinst script in the target package at do_rootfs time
14# d) As the preinst script in the target package on device as a package upgrade
15#
12useradd_preinst () { 16useradd_preinst () {
13OPT="" 17OPT=""
14SYSROOT="" 18SYSROOT=""
@@ -80,8 +84,10 @@ fi
80} 84}
81 85
82useradd_sysroot () { 86useradd_sysroot () {
83 export PSEUDO="${STAGING_DIR_NATIVE}${bindir}/pseudo" 87 # Pseudo may (do_install) or may not (do_populate_sysroot_setscene) be running
84 export PSEUDO_LOCALSTATEDIR="${STAGING_DIR_TARGET}${localstatedir}/pseudo" 88 # at this point so we're explicit about the environment so pseudo can load if
89 # not already present.
90 export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${STAGING_DIR_NATIVE}${bindir}/pseudo"
85 91
86 # Explicitly set $D since it isn't set to anything 92 # Explicitly set $D since it isn't set to anything
87 # before do_install 93 # before do_install