diff mbox series

[V2,1/2] util-linux: Make pam specific logic apply to target recipe alone

Message ID 20190815055655.6759-1-raj.khem@gmail.com
State Accepted
Commit a57f56576eda4b3ad5496e375b432e06e34ad8b9
Headers show
Series [V2,1/2] util-linux: Make pam specific logic apply to target recipe alone | expand

Commit Message

Khem Raj Aug. 15, 2019, 5:56 a.m. UTC
This helps with a case where a distro builds one image with systemd and
another with sysvinit, it ends up recompiling almost everything since
python3-native gets rebuilt and tracing dependencies with
bitbake-diffsigs shows that the chain ends at util-linux-native being
recompiled because distro features now does or does not have 'pam'

Hash for dependent task python/python3_3.7.4.bb:do_prepare_recipe_sysroot:virtual:native:/mnt/a/yoe/sources/openembedded-core/meta/recipes-devt
ools/python/python3_3.7.4.bb changed from 8befaac4f995aaff3f95d27c9caaf1006f86e1344b02c1ae82f5d12f885f2240 to 2a45fe0cd0d3640a88c4a5c8b1880c4e9
a089cc7446a91d2a920c1cef6fa916a
    Hash for dependent task util-linux/util-linux_2.34.bb:do_populate_sysroot:virtual:native:/mnt/a/yoe/sources/openembedded-core/meta/recipes-
core/util-linux/util-linux_2.34.bb changed from 0db292cb2e37d5788bdcf51038b2802d748b719d860aca3a26d7a793b0cf3905 to 15d6e165f025f10c2c455df8a87
5cafe021eaed4214c793e708d4827a58ca89d
        Hash for dependent task util-linux/util-linux_2.34.bb:do_install:virtual:native:/mnt/a/yoe/sources/openembedded-core/meta/recipes-core/util-linux/util-linux_2.34.bb changed from 54bb4ee6bdb5c7fc260dabddb4932cb0e554a62cd92aba080a18306291fb470b to e25b1119ce8dd7ca43fbd2db771e04fa
6ff6b9d701fd78ac6c443224b036ed9f                                                                                                                           basehash changed from 8e8687a866689a697001dedc0a43f478e68e6efe270bd77362f24c6000f9e882 to 62df6610eab9c1b1a17d7132943507641c8538690
f26186843c86144d4598e64
            Variable do_install value changed:

rm -f ${D}${bindir}/chkdupexe
-   if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+   if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then
        install -d ${D}${sysconfdir}/pam.d
        install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser
        install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l
@@ -47,5 +47,4 @@
        rm -f ${D}${base_sbindir}/nologin
        rm -f ${D}${base_bindir}/kill

    -DISTRO_FEATURES{pam} = Unset
    PACKAGECONFIG{pam} = Unset

So far it seems this pam conditional code in util-linux is target
specific and would not apply to native or nativesdk recipes

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
v2:
- Add missing do_install append qualifier
- No need to mark ALTERNATIVE_${PN}-doc target specific

 meta/recipes-core/util-linux/util-linux.inc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

-- 
2.22.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 84c7012752..1fa82363b1 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -190,20 +190,19 @@  do_install () {
 	echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
 
 	rm -f ${D}${bindir}/chkdupexe
+}
 
-	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+do_install_append_class-target () {
+	if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then
 		install -d ${D}${sysconfdir}/pam.d
 		install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser
 		install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l
-	fi
-	if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then
 		# Required for "su -" aka "su --login" because
 		# otherwise it uses "other", which has "auth pam_deny.so"
 		# and thus prevents the operation.
 		ln -s su ${D}${sysconfdir}/pam.d/su-l
 	fi
 }
-
 # nologin causes a conflict with shadow-native
 # kill causes a conflict with coreutils-native (if ${bindir}==${base_bindir})
 do_install_append_class-native () {