diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/useradd.bbclass | 16 |
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" | |||
6 | USERADDDEPENDS_virtclass-native = "" | 6 | USERADDDEPENDS_virtclass-native = "" |
7 | USERADDDEPENDS_virtclass-nativesdk = "" | 7 | USERADDDEPENDS_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 | # | ||
12 | useradd_preinst () { | 16 | useradd_preinst () { |
13 | OPT="" | 17 | OPT="" |
14 | SYSROOT="" | 18 | SYSROOT="" |
@@ -80,8 +84,10 @@ fi | |||
80 | } | 84 | } |
81 | 85 | ||
82 | useradd_sysroot () { | 86 | useradd_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 |