summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-26 12:42:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-26 20:53:16 +0000
commit238a47d800446996f5cb9929f33aaaffe618f7b6 (patch)
tree9513d46e1d10aaa2633dbfe4755f37a041bb4988 /meta
parentf54a443aa756f369e048985937e8a14217d004d7 (diff)
downloadpoky-238a47d800446996f5cb9929f33aaaffe618f7b6.tar.gz
shadow-sysroot: Simplfy login.defs installation
Currently if shadow-sysroot is installed from a sstate package, shadow_sysroot_sstate_postinst is looking in ${D} for login.defs which isn't a valid for an install from sstate. The easiest and most correct way to fix this is to override the standard sysroot_stage_all function to install the files correctly and then sstate installs work as expected. This simplifies the code as an added bonus. (From OE-Core rev: 6437e7315a0f2e077f9d69e4b65b48280ea8edbc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb16
1 files changed, 3 insertions, 13 deletions
diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb
index 076bc9ae15..fbffb845a7 100644
--- a/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdf
8 8
9DEPENDS = "base-passwd" 9DEPENDS = "base-passwd"
10 10
11PR = "r0" 11PR = "r1"
12 12
13# The sole purpose of this recipe is to provide the /etc/login.defs 13# The sole purpose of this recipe is to provide the /etc/login.defs
14# file for the target sysroot - needed so the shadow-native utilities 14# file for the target sysroot - needed so the shadow-native utilities
@@ -19,22 +19,12 @@ SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
19SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" 19SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
20 20
21S = "${WORKDIR}" 21S = "${WORKDIR}"
22SSTATEPOSTINSTFUNCS += "shadow_sysroot_sstate_postinst"
23 22
24do_install() { 23do_install() {
25 install -d ${D}${sysconfdir} 24 install -d ${D}${sysconfdir}
26 install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs 25 install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs
27} 26}
28 27
29shadow_sysroot_sstate_postinst() { 28sysroot_stage_all() {
30 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] 29 sysroot_stage_dir ${D} ${SYSROOT_DESTDIR}
31 then
32 # Staging does not copy ${sysconfdir} files into the
33 # target sysroot, so we need to do so manually. We
34 # put this file in the target sysroot so it can be
35 # used by recipes which use custom user/group
36 # permissions.
37 install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir}
38 install -p -m 644 ${D}${sysconfdir}/login.defs ${STAGING_DIR_TARGET}/${sysconfdir}/login.defs
39 fi
40} 30}