summaryrefslogtreecommitdiff
path: root/meta/recipes-extended/sudo
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-04 13:09:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-05 12:32:10 +0000
commit9c93526756e7cbbff027c88eb972f877bcb1f057 (patch)
tree327939f0ff75f9b439ed8d851af1e552db64acad /meta/recipes-extended/sudo
parent9a272ee6d72fc727a2dfe660ceded560a9f1ae88 (diff)
downloadopenembedded-core-9c93526756e7cbbff027c88eb972f877bcb1f057.tar.gz
openembedded-core-9c93526756e7cbbff027c88eb972f877bcb1f057.tar.bz2
openembedded-core-9c93526756e7cbbff027c88eb972f877bcb1f057.zip
classes/recipes: More optimal DISTRO_FEATURES references
Using the contains function results in more optimal sstate checksums resulting in better cache reuse as we as more consistent code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/sudo')
-rw-r--r--meta/recipes-extended/sudo/sudo_1.8.8.bb9
1 files changed, 3 insertions, 6 deletions
diff --git a/meta/recipes-extended/sudo/sudo_1.8.8.bb b/meta/recipes-extended/sudo/sudo_1.8.8.bb
index ba7c4ab454..6ab072f4db 100644
--- a/meta/recipes-extended/sudo/sudo_1.8.8.bb
+++ b/meta/recipes-extended/sudo/sudo_1.8.8.bb
@@ -14,12 +14,9 @@ RDEPENDS_${PN} += " ${@base_contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limit
EXTRA_OECONF += " ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}"
do_install_append () {
- for feature in ${DISTRO_FEATURES}; do
- if [ "$feature" = "pam" ]; then
- install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
- break
- fi
- done
+ if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+ install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
+ fi
chmod 4111 ${D}${bindir}/sudo
chmod 0440 ${D}${sysconfdir}/sudoers