summaryrefslogtreecommitdiffstats
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-05-31 21:11:43 +0100
commitf3fc5e1e3f115dc4145167f5da5a9ada59f02903 (patch)
tree5af48de692e2aee29dd6b566b344f5dec57ae634
parente2c5e5a513b9f9bf34d2970b43b1582d9c85f0bb (diff)
downloadpoky-f3fc5e1e3f115dc4145167f5da5a9ada59f02903.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) (From OE-Core rev: 6f25ede827ee469464ca2db72bf05c75fa7c11f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 27647cbc8b..195c8cc972 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