summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2014-04-24 15:59:20 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-25 17:19:19 +0100
commit4c14b094985216c433d330fb3d9532d4b6c91fcf (patch)
tree6970f383436ca29450779bd98c378aae89f2e079 /meta/classes/image.bbclass
parent08a38a7865c41ec60f4b993b964f8d477ea0f680 (diff)
downloadpoky-4c14b094985216c433d330fb3d9532d4b6c91fcf.tar.gz
Globally replace 'base_contains' calls with 'bb.utils.contains'
The base_contains is kept as a compatibility method and we ought to not use it in OE-Core so we can remove it from base metadata in future. (From OE-Core rev: d83b16dbf0862be387f84228710cb165c6d2b03b) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass20
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 79de5a2cae..ceee8481e6 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -25,7 +25,7 @@ IMAGE_FEATURES[type] = "list"
25IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs" 25IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs"
26 26
27# rootfs bootstrap install 27# rootfs bootstrap install
28ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}" 28ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
29 29
30# packages to install from features 30# packages to install from features
31FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" 31FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
@@ -79,9 +79,9 @@ do_rootfs[vardeps] += "BAD_RECOMMENDATIONS NO_RECOMMENDATIONS"
79do_build[depends] += "virtual/kernel:do_deploy" 79do_build[depends] += "virtual/kernel:do_deploy"
80 80
81def build_live(d): 81def build_live(d):
82 if base_contains("IMAGE_FSTYPES", "live", "live", "0", d) == "0": # live is not set but hob might set iso or hddimg 82 if bb.utils.contains("IMAGE_FSTYPES", "live", "live", "0", d) == "0": # live is not set but hob might set iso or hddimg
83 d.setVar('NOISO', base_contains('IMAGE_FSTYPES', "iso", "0", "1", d)) 83 d.setVar('NOISO', bb.utils.contains('IMAGE_FSTYPES', "iso", "0", "1", d))
84 d.setVar('NOHDD', base_contains('IMAGE_FSTYPES', "hddimg", "0", "1", d)) 84 d.setVar('NOHDD', bb.utils.contains('IMAGE_FSTYPES', "hddimg", "0", "1", d))
85 if d.getVar('NOISO', True) == "0" or d.getVar('NOHDD', True) == "0": 85 if d.getVar('NOISO', True) == "0" or d.getVar('NOHDD', True) == "0":
86 return "image-live" 86 return "image-live"
87 return "" 87 return ""
@@ -90,7 +90,7 @@ def build_live(d):
90IMAGE_TYPE_live = "${@build_live(d)}" 90IMAGE_TYPE_live = "${@build_live(d)}"
91 91
92inherit ${IMAGE_TYPE_live} 92inherit ${IMAGE_TYPE_live}
93IMAGE_TYPE_vmdk = '${@base_contains("IMAGE_FSTYPES", "vmdk", "image-vmdk", "", d)}' 93IMAGE_TYPE_vmdk = '${@bb.utils.contains("IMAGE_FSTYPES", "vmdk", "image-vmdk", "", d)}'
94inherit ${IMAGE_TYPE_vmdk} 94inherit ${IMAGE_TYPE_vmdk}
95 95
96python () { 96python () {
@@ -143,17 +143,17 @@ inherit ${IMAGE_CLASSES}
143IMAGE_POSTPROCESS_COMMAND ?= "" 143IMAGE_POSTPROCESS_COMMAND ?= ""
144MACHINE_POSTPROCESS_COMMAND ?= "" 144MACHINE_POSTPROCESS_COMMAND ?= ""
145# Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks is enabled 145# Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks is enabled
146ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "ssh_allow_empty_password; ", "",d)}' 146ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "ssh_allow_empty_password; ", "",d)}'
147# Enable postinst logging if debug-tweaks is enabled 147# Enable postinst logging if debug-tweaks is enabled
148ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}' 148ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}'
149# Write manifest 149# Write manifest
150IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest" 150IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
151ROOTFS_POSTPROCESS_COMMAND =+ "write_image_manifest ; " 151ROOTFS_POSTPROCESS_COMMAND =+ "write_image_manifest ; "
152# Set default postinst log file 152# Set default postinst log file
153POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log" 153POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
154# Set default target for systemd images 154# Set default target for systemd images
155SYSTEMD_DEFAULT_TARGET ?= '${@base_contains("IMAGE_FEATURES", "x11-base", "graphical.target", "multi-user.target", d)}' 155SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "graphical.target", "multi-user.target", d)}'
156ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; ", "", d)}' 156ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; ", "", d)}'
157 157
158# some default locales 158# some default locales
159IMAGE_LINGUAS ?= "de-de fr-fr en-gb" 159IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
@@ -173,7 +173,7 @@ do_rootfs[umask] = "022"
173# A hook function to support read-only-rootfs IMAGE_FEATURES 173# A hook function to support read-only-rootfs IMAGE_FEATURES
174# Currently, it only supports sysvinit system. 174# Currently, it only supports sysvinit system.
175read_only_rootfs_hook () { 175read_only_rootfs_hook () {
176 if ${@base_contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then 176 if ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then
177 # Tweak the mount option and fs_passno for rootfs in fstab 177 # Tweak the mount option and fs_passno for rootfs in fstab
178 sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab 178 sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
179 # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes 179 # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes