summaryrefslogtreecommitdiffstats
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 14:24:43 +0000
commit6ab56c54f316154d89f03ec0c6c2cb39d1736cff (patch)
tree952d5bde1c81457378d6d995051cd04674dbf489
parent82233cd647b1ecc256afb0c3378906cf8af46f8e (diff)
downloadpoky-6ab56c54f316154d89f03ec0c6c2cb39d1736cff.tar.gz
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. (From OE-Core rev: 9c93526756e7cbbff027c88eb972f877bcb1f057) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/libc-package.bbclass6
-rw-r--r--meta/classes/systemd.bbclass15
-rw-r--r--meta/classes/update-rc.d.bbclass2
-rw-r--r--meta/recipes-connectivity/openssh/openssh_6.4p1.bb12
-rw-r--r--meta/recipes-core/busybox/busybox.inc23
-rw-r--r--meta/recipes-core/dbus/dbus.inc3
-rw-r--r--meta/recipes-core/dropbear/dropbear.inc12
-rw-r--r--meta/recipes-core/systemd/systemd_208.bb3
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc4
-rw-r--r--meta/recipes-devtools/opkg/opkg.inc2
-rw-r--r--meta/recipes-devtools/perl/perl-ptest.inc2
-rw-r--r--meta/recipes-extended/at/at_3.1.14.bb9
-rw-r--r--meta/recipes-extended/pam/libpam_1.1.6.bb2
-rw-r--r--meta/recipes-extended/screen/screen_4.0.3.bb9
-rw-r--r--meta/recipes-extended/sudo/sudo_1.8.8.bb9
-rw-r--r--meta/recipes-graphics/wayland/weston_1.3.1.bb16
16 files changed, 54 insertions, 75 deletions
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 454ee76602..0af42a002c 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -36,10 +36,10 @@ python __anonymous () {
36 d.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile") 36 d.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile")
37 break 37 break
38 38
39 distro_features = (d.getVar('DISTRO_FEATURES', True) or '').split()
40
41 # try to fix disable charsets/locales/locale-code compile fail 39 # try to fix disable charsets/locales/locale-code compile fail
42 if 'libc-charsets' in distro_features and 'libc-locales' in distro_features and 'libc-locale-code' in distro_features: 40 if oe.utils.contains('DISTRO_FEATURES', 'libc-charsets', True, False, d) and \
41 oe.utils.contains('DISTRO_FEATURES', 'libc-locales', True, False, d) and \
42 oe.utils.contains('DISTRO_FEATURES', 'libc-locale-code', True, False, d):
43 d.setVar('PACKAGE_NO_GCONV', '0') 43 d.setVar('PACKAGE_NO_GCONV', '0')
44 else: 44 else:
45 d.setVar('PACKAGE_NO_GCONV', '1') 45 d.setVar('PACKAGE_NO_GCONV', '1')
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index 7a8d35cd2f..efc1adcacb 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -12,13 +12,12 @@ SYSTEMD_AUTO_ENABLE ??= "enable"
12# even if systemd is not in DISTRO_FEATURES. As such don't make any changes 12# even if systemd is not in DISTRO_FEATURES. As such don't make any changes
13# directly but check the DISTRO_FEATURES first. 13# directly but check the DISTRO_FEATURES first.
14python __anonymous() { 14python __anonymous() {
15 features = d.getVar("DISTRO_FEATURES", True).split()
16 # If the distro features have systemd but not sysvinit, inhibit update-rcd 15 # If the distro features have systemd but not sysvinit, inhibit update-rcd
17 # from doing any work so that pure-systemd images don't have redundant init 16 # from doing any work so that pure-systemd images don't have redundant init
18 # files. 17 # files.
19 if "systemd" in features: 18 if oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
20 d.appendVar("DEPENDS", " systemd-systemctl-native") 19 d.appendVar("DEPENDS", " systemd-systemctl-native")
21 if "sysvinit" not in features: 20 if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
22 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") 21 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
23} 22}
24 23
@@ -52,7 +51,7 @@ fi
52systemd_populate_packages[vardeps] += "systemd_prerm systemd_postinst" 51systemd_populate_packages[vardeps] += "systemd_prerm systemd_postinst"
53 52
54python systemd_populate_packages() { 53python systemd_populate_packages() {
55 if "systemd" not in d.getVar("DISTRO_FEATURES", True).split(): 54 if not oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
56 return 55 return
57 56
58 def get_package_var(d, var, pkg): 57 def get_package_var(d, var, pkg):
@@ -167,7 +166,7 @@ PACKAGESPLITFUNCS_prepend = "systemd_populate_packages "
167 166
168python rm_systemd_unitdir (){ 167python rm_systemd_unitdir (){
169 import shutil 168 import shutil
170 if "systemd" not in d.getVar("DISTRO_FEATURES", True).split(): 169 if not oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
171 systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True)) 170 systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True))
172 if os.path.exists(systemd_unitdir): 171 if os.path.exists(systemd_unitdir):
173 shutil.rmtree(systemd_unitdir) 172 shutil.rmtree(systemd_unitdir)
@@ -181,9 +180,9 @@ python rm_sysvinit_initddir (){
181 import shutil 180 import shutil
182 sysv_initddir = oe.path.join(d.getVar("D", True), (d.getVar('INIT_D_DIR', True) or "/etc/init.d")) 181 sysv_initddir = oe.path.join(d.getVar("D", True), (d.getVar('INIT_D_DIR', True) or "/etc/init.d"))
183 182
184 if ("systemd" in d.getVar("DISTRO_FEATURES", True).split() and 183 if oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and \
185 "sysvinit" not in d.getVar("DISTRO_FEATURES", True).split() and 184 not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \
186 os.path.exists(sysv_initddir)): 185 os.path.exists(sysv_initddir):
187 systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True), "system") 186 systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True), "system")
188 187
189 # If systemd_unitdir contains anything, delete sysv_initddir 188 # If systemd_unitdir contains anything, delete sysv_initddir
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 29b5a8ea27..c9bf04c4f8 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -105,7 +105,7 @@ python populate_packages_updatercd () {
105 105
106 # Check that this class isn't being inhibited (generally, by 106 # Check that this class isn't being inhibited (generally, by
107 # systemd.bbclass) before doing any work. 107 # systemd.bbclass) before doing any work.
108 if "sysvinit" in d.getVar("DISTRO_FEATURES").split() or \ 108 if oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or \
109 not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True): 109 not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
110 pkgs = d.getVar('INITSCRIPT_PACKAGES', True) 110 pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
111 if pkgs == None: 111 if pkgs == None:
diff --git a/meta/recipes-connectivity/openssh/openssh_6.4p1.bb b/meta/recipes-connectivity/openssh/openssh_6.4p1.bb
index 859fdd615e..b9a7580fdc 100644
--- a/meta/recipes-connectivity/openssh/openssh_6.4p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_6.4p1.bb
@@ -80,13 +80,11 @@ do_compile_append () {
80} 80}
81 81
82do_install_append () { 82do_install_append () {
83 for i in ${DISTRO_FEATURES}; 83 if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
84 do 84 install -d ${D}${sysconfdir}/pam.d
85 if [ ${i} = "pam" ]; then 85 install -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
86 install -d ${D}${sysconfdir}/pam.d 86 fi
87 install -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd 87
88 fi
89 done
90 install -d ${D}${sysconfdir}/init.d 88 install -d ${D}${sysconfdir}/init.d
91 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd 89 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
92 rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin 90 rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index b3d0cd25de..0c84c1f115 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -47,11 +47,11 @@ RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
47inherit cml1 systemd update-rc.d ptest 47inherit cml1 systemd update-rc.d ptest
48 48
49# internal helper 49# internal helper
50def busybox_cfg(feature, features, tokens, cnf, rem): 50def busybox_cfg(feature, tokens, cnf, rem):
51 if type(tokens) == type(""): 51 if type(tokens) == type(""):
52 tokens = [tokens] 52 tokens = [tokens]
53 rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens]) 53 rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens])
54 if type(features) == type([]) and feature in features: 54 if feature:
55 cnf.extend([token + '=y' for token in tokens]) 55 cnf.extend([token + '=y' for token in tokens])
56 else: 56 else:
57 cnf.extend(['# ' + token + ' is not set' for token in tokens]) 57 cnf.extend(['# ' + token + ' is not set' for token in tokens])
@@ -59,15 +59,14 @@ def busybox_cfg(feature, features, tokens, cnf, rem):
59# Map distro features to config settings 59# Map distro features to config settings
60def features_to_busybox_settings(d): 60def features_to_busybox_settings(d):
61 cnf, rem = ([], []) 61 cnf, rem = ([], [])
62 distro_features = d.getVar('DISTRO_FEATURES', True).split() 62 busybox_cfg(base_contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IPV6', cnf, rem)
63 busybox_cfg('ipv6', distro_features, 'CONFIG_FEATURE_IPV6', cnf, rem) 63 busybox_cfg(base_contains('DISTRO_FEATURES', 'largefile', True, False, d), 'CONFIG_LFS', cnf, rem)
64 busybox_cfg('largefile', distro_features, 'CONFIG_LFS', cnf, rem) 64 busybox_cfg(base_contains('DISTRO_FEATURES', 'largefile', True, False, d), 'CONFIG_FDISK_SUPPORT_LARGE_DISKS', cnf, rem)
65 busybox_cfg('largefile', distro_features, 'CONFIG_FDISK_SUPPORT_LARGE_DISKS', cnf, rem) 65 busybox_cfg(base_contains('DISTRO_FEATURES', 'nls', True, False, d), 'CONFIG_LOCALE_SUPPORT', cnf, rem)
66 busybox_cfg('nls', distro_features, 'CONFIG_LOCALE_SUPPORT', cnf, rem) 66 busybox_cfg(base_contains('DISTRO_FEATURES', 'ipv4', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem)
67 busybox_cfg('ipv4', distro_features, 'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem) 67 busybox_cfg(base_contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem)
68 busybox_cfg('ipv6', distro_features, 'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem) 68 busybox_cfg(base_contains('DISTRO_FEATURES', 'wifi', True, False, d), 'CONFIG_RFKILL', cnf, rem)
69 busybox_cfg('wifi', distro_features, 'CONFIG_RFKILL', cnf, rem) 69 busybox_cfg(base_contains('DISTRO_FEATURES', 'bluetooth', True, False, d), 'CONFIG_RFKILL', cnf, rem)
70 busybox_cfg('bluetooth', distro_features, 'CONFIG_RFKILL', cnf, rem)
71 return "\n".join(cnf), "\n".join(rem) 70 return "\n".join(cnf), "\n".join(rem)
72 71
73# X, Y = ${@features_to_uclibc_settings(d)} 72# X, Y = ${@features_to_uclibc_settings(d)}
@@ -295,7 +294,7 @@ ALTERNATIVE_${PN}-syslog += "syslog-conf"
295ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" 294ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
296 295
297python () { 296python () {
298 if 'sysvinit' in d.getVar("DISTRO_FEATURES", True).split(): 297 if base_contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
299 pn = d.getVar('PN', True) 298 pn = d.getVar('PN', True)
300 d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-init') 299 d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-init')
301 d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (d.getVar('sysconfdir', True))) 300 d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (d.getVar('sysconfdir', True)))
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index 6612184e22..5b99034bf4 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -27,8 +27,7 @@ INITSCRIPT_NAME = "dbus-1"
27INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." 27INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
28 28
29python __anonymous() { 29python __anonymous() {
30 features = d.getVar("DISTRO_FEATURES", True).split() 30 if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
31 if "sysvinit" not in features:
32 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") 31 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
33} 32}
34 33
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index 5d9623d2c6..4262b1d6e5 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -62,14 +62,10 @@ do_install() {
62 -e 's,/usr/bin,${bindir},g' \ 62 -e 's,/usr/bin,${bindir},g' \
63 -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/dropbear 63 -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/dropbear
64 chmod 755 ${D}${sysconfdir}/init.d/dropbear 64 chmod 755 ${D}${sysconfdir}/init.d/dropbear
65 for i in ${DISTRO_FEATURES}; 65 if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
66 do 66 install -d ${D}${sysconfdir}/pam.d
67 if [ ${i} = "pam" ]; then 67 install -m 0644 ${WORKDIR}/dropbear ${D}${sysconfdir}/pam.d/
68 install -d ${D}${sysconfdir}/pam.d 68 fi
69 install -m 0644 ${WORKDIR}/dropbear ${D}${sysconfdir}/pam.d/
70 fi
71 done
72
73} 69}
74 70
75inherit update-alternatives 71inherit update-alternatives
diff --git a/meta/recipes-core/systemd/systemd_208.bb b/meta/recipes-core/systemd/systemd_208.bb
index 66e6beec8a..c1f8d773fb 100644
--- a/meta/recipes-core/systemd/systemd_208.bb
+++ b/meta/recipes-core/systemd/systemd_208.bb
@@ -271,8 +271,7 @@ INITSCRIPT_NAME_udev = "systemd-udevd"
271INITSCRIPT_PARAMS_udev = "start 03 S ." 271INITSCRIPT_PARAMS_udev = "start 03 S ."
272 272
273python __anonymous() { 273python __anonymous() {
274 features = d.getVar("DISTRO_FEATURES", True).split() 274 if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
275 if "sysvinit" not in features:
276 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") 275 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
277} 276}
278 277
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index cc0ab2afbd..55c61850b6 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -19,7 +19,7 @@ def get_gcc_fpu_setting(bb, d):
19get_gcc_fpu_setting[vardepvalue] = "${@get_gcc_fpu_setting(bb, d)}" 19get_gcc_fpu_setting[vardepvalue] = "${@get_gcc_fpu_setting(bb, d)}"
20 20
21def get_gcc_mips_plt_setting(bb, d): 21def get_gcc_mips_plt_setting(bb, d):
22 if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'mips', 'mipsel' ] and 'mplt' in d.getVar('DISTRO_FEATURES',1).split() : 22 if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'mips', 'mipsel' ] and oe.utils.contains('DISTRO_FEATURES', 'mplt', True, False, d):
23 return "--with-mips-plt" 23 return "--with-mips-plt"
24 return "" 24 return ""
25 25
@@ -32,7 +32,7 @@ def get_gcc_multiarch_setting(bb, d):
32 "sparc": "--enable-targets=all", 32 "sparc": "--enable-targets=all",
33 } 33 }
34 34
35 if 'multiarch' in d.getVar('DISTRO_FEATURES', True).split() : 35 if oe.utils.contains('DISTRO_FEATURES', 'multiarch', True, False, d):
36 if target_arch in multiarch_options : 36 if target_arch in multiarch_options :
37 return multiarch_options[target_arch] 37 return multiarch_options[target_arch]
38 return "" 38 return ""
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
index 1076472779..4ffd430b3f 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -18,7 +18,7 @@ do_configure_prepend() {
18inherit autotools pkgconfig systemd 18inherit autotools pkgconfig systemd
19 19
20python () { 20python () {
21 if 'sysvinit' not in d.getVar("DISTRO_FEATURES", True).split(): 21 if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
22 pn = d.getVar('PN', True) 22 pn = d.getVar('PN', True)
23 d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'opkg-configure.service') 23 d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'opkg-configure.service')
24} 24}
diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
index 6999e6be37..914ca0f4c0 100644
--- a/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/meta/recipes-devtools/perl/perl-ptest.inc
@@ -42,7 +42,7 @@ python populate_packages_prepend() {
42 # Put all *.t files from the lib dir in the ptest package 42 # Put all *.t files from the lib dir in the ptest package
43 # do_split_packages requires a pair of () in the regex, but we have nothing 43 # do_split_packages requires a pair of () in the regex, but we have nothing
44 # to match, so use an empty pair. 44 # to match, so use an empty pair.
45 if "ptest" in d.getVar("DISTRO_FEATURES", True).split(): 45 if oe.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
46 do_split_packages(d, d.expand('${libdir}/perl/${PV}'), '.*\.t()', 46 do_split_packages(d, d.expand('${libdir}/perl/${PV}'), '.*\.t()',
47 '${PN}-ptest%s', '%s', recursive=True, match_path=True) 47 '${PN}-ptest%s', '%s', recursive=True, match_path=True)
48} 48}
diff --git a/meta/recipes-extended/at/at_3.1.14.bb b/meta/recipes-extended/at/at_3.1.14.bb
index f80b620e68..166a2a5804 100644
--- a/meta/recipes-extended/at/at_3.1.14.bb
+++ b/meta/recipes-extended/at/at_3.1.14.bb
@@ -54,10 +54,7 @@ do_install () {
54 install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd 54 install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd
55 ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at 55 ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at
56 56
57 for feature in ${DISTRO_FEATURES}; do 57 if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
58 if [ "$feature" = "pam" ]; then 58 install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
59 install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd 59 fi
60 break
61 fi
62 done
63} 60}
diff --git a/meta/recipes-extended/pam/libpam_1.1.6.bb b/meta/recipes-extended/pam/libpam_1.1.6.bb
index c9bdcb0908..8d0a5685b6 100644
--- a/meta/recipes-extended/pam/libpam_1.1.6.bb
+++ b/meta/recipes-extended/pam/libpam_1.1.6.bb
@@ -110,7 +110,7 @@ do_install() {
110} 110}
111 111
112python do_pam_sanity () { 112python do_pam_sanity () {
113 if "pam" not in d.getVar("DISTRO_FEATURES", True).split(): 113 if not base_contains('DISTRO_FEATURES', 'pam', True, False, d):
114 bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly") 114 bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
115} 115}
116addtask pam_sanity before do_configure 116addtask pam_sanity before do_configure
diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb
index be42fb9eec..b79b573e6c 100644
--- a/meta/recipes-extended/screen/screen_4.0.3.bb
+++ b/meta/recipes-extended/screen/screen_4.0.3.bb
@@ -36,12 +36,9 @@ EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
36 ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}" 36 ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
37 37
38do_install_append () { 38do_install_append () {
39 for feature in ${DISTRO_FEATURES}; do 39 if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
40 if [ "$feature" = "pam" ]; then 40 install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen
41 install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen 41 fi
42 break
43 fi
44 done
45} 42}
46 43
47pkg_postinst_${PN} () { 44pkg_postinst_${PN} () {
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
14EXTRA_OECONF += " ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}" 14EXTRA_OECONF += " ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}"
15 15
16do_install_append () { 16do_install_append () {
17 for feature in ${DISTRO_FEATURES}; do 17 if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
18 if [ "$feature" = "pam" ]; then 18 install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
19 install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo 19 fi
20 break
21 fi
22 done
23 20
24 chmod 4111 ${D}${bindir}/sudo 21 chmod 4111 ${D}${bindir}/sudo
25 chmod 0440 ${D}${sysconfdir}/sudoers 22 chmod 0440 ${D}${sysconfdir}/sudoers
diff --git a/meta/recipes-graphics/wayland/weston_1.3.1.bb b/meta/recipes-graphics/wayland/weston_1.3.1.bb
index 82bcf3ba39..d97f6af45b 100644
--- a/meta/recipes-graphics/wayland/weston_1.3.1.bb
+++ b/meta/recipes-graphics/wayland/weston_1.3.1.bb
@@ -55,16 +55,14 @@ do_install_append() {
55 # Weston doesn't need the .la files to load modules, so wipe them 55 # Weston doesn't need the .la files to load modules, so wipe them
56 rm -f ${D}/${libdir}/weston/*.la 56 rm -f ${D}/${libdir}/weston/*.la
57 57
58 for feature in ${DISTRO_FEATURES}; do 58 # If X11, ship a desktop file to launch it
59 # If X11, ship a desktop file to launch it 59 if [ "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
60 if [ "$feature" = "x11" ]; then 60 install -d ${D}${datadir}/applications
61 install -d ${D}${datadir}/applications 61 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
62 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
63 62
64 install -d ${D}${datadir}/icons/hicolor/48x48/apps 63 install -d ${D}${datadir}/icons/hicolor/48x48/apps
65 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps 64 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
66 fi 65 fi
67 done
68} 66}
69 67
70PACKAGES += "${PN}-examples" 68PACKAGES += "${PN}-examples"