[OE-core] [PATCH 3/3] image.bbclass: search both rootfs and staging dir for passwd files
Peter A. Bigot
pab at pabigot.com
Sun Oct 12 23:49:55 UTC 2014
When pseudo is configured to disallow fallback to the build host
/etc/hosts and /etc/group, the selection of ${IMAGE_ROOT} for
PSEUDO_PASSWD is insufficient as the necessary files will not be
available until base-passwd has been installed and its pkg_postinst
script run. Fall back to the ${STAGING_DIR_TARGET} version of those
files until the rootfs versions are available.
Signed-off-by: Peter A. Bigot <pab at pabigot.com>
---
NOTE: This patch REQUIRES that preceding two patches to pseudo
that provide multiple path support in PSEUDO_PASSWD.
meta/classes/image.bbclass | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 940bdb6..18f0fdd 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -186,7 +186,9 @@ IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS', True).split()))}"
-PSEUDO_PASSWD = "${IMAGE_ROOTFS}"
+# Prefer image, but fall back to staging dir if image files not yet
+# available.
+PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_TARGET}"
do_rootfs[dirs] = "${TOPDIR}"
do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock"
--
1.8.5.5
More information about the Openembedded-core
mailing list