diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/boot-directdisk.bbclass | 10 | ||||
-rw-r--r-- | meta/classes/bootimg.bbclass | 8 | ||||
-rw-r--r-- | meta/classes/buildhistory.bbclass | 8 | ||||
-rw-r--r-- | meta/classes/core-image.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/image.bbclass | 20 | ||||
-rw-r--r-- | meta/classes/packagegroup.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/ptest.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/rootfs_rpm.bbclass | 2 |
8 files changed, 29 insertions, 29 deletions
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass index 88e5c52e2b..0da9932f4f 100644 --- a/meta/classes/boot-directdisk.bbclass +++ b/meta/classes/boot-directdisk.bbclass @@ -31,17 +31,17 @@ EXCLUDE_FROM_WORLD = "1" BOOTDD_VOLUME_ID ?= "boot" BOOTDD_EXTRA_SPACE ?= "16384" -EFI = "${@base_contains("MACHINE_FEATURES", "efi", "1", "0", d)}" +EFI = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "1", "0", d)}" EFI_PROVIDER ?= "grub-efi" -EFI_CLASS = "${@base_contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)}" +EFI_CLASS = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)}" # Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not # contain "efi". This way legacy is supported by default if neither is # specified, maintaining the original behavior. def pcbios(d): - pcbios = base_contains("MACHINE_FEATURES", "pcbios", "1", "0", d) + pcbios = bb.utils.contains("MACHINE_FEATURES", "pcbios", "1", "0", d) if pcbios == "0": - pcbios = base_contains("MACHINE_FEATURES", "efi", "0", "1", d) + pcbios = bb.utils.contains("MACHINE_FEATURES", "efi", "0", "1", d) return pcbios def pcbios_class(d): @@ -62,7 +62,7 @@ DISK_SIGNATURE ?= "${DISK_SIGNATURE_GENERATED}" SYSLINUX_ROOT ?= "root=/dev/sda2" SYSLINUX_TIMEOUT ?= "10" -IS_VMDK = '${@base_contains("IMAGE_FSTYPES", "vmdk", "true", "false", d)}' +IS_VMDK = '${@bb.utils.contains("IMAGE_FSTYPES", "vmdk", "true", "false", d)}' boot_direct_populate() { dest=$1 diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass index b13eef965d..7678567600 100644 --- a/meta/classes/bootimg.bbclass +++ b/meta/classes/bootimg.bbclass @@ -41,17 +41,17 @@ COMPRESSISO ?= "0" BOOTIMG_VOLUME_ID ?= "boot" BOOTIMG_EXTRA_SPACE ?= "512" -EFI = "${@base_contains("MACHINE_FEATURES", "efi", "1", "0", d)}" +EFI = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "1", "0", d)}" EFI_PROVIDER ?= "grub-efi" -EFI_CLASS = "${@base_contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)}" +EFI_CLASS = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)}" # Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not # contain "efi". This way legacy is supported by default if neither is # specified, maintaining the original behavior. def pcbios(d): - pcbios = base_contains("MACHINE_FEATURES", "pcbios", "1", "0", d) + pcbios = bb.utils.contains("MACHINE_FEATURES", "pcbios", "1", "0", d) if pcbios == "0": - pcbios = base_contains("MACHINE_FEATURES", "efi", "0", "1", d) + pcbios = bb.utils.contains("MACHINE_FEATURES", "efi", "0", "1", d) return pcbios PCBIOS = "${@pcbios(d)}" diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 262095f60a..d75e7e6fff 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -403,7 +403,7 @@ buildhistory_get_image_installed() { # Anything requiring the use of the packaging system should be done in here # in case the packaging files are going to be removed for this image - if [ "${@base_contains('BUILDHISTORY_FEATURES', 'image', '1', '0', d)}" = "0" ] ; then + if [ "${@bb.utils.contains('BUILDHISTORY_FEATURES', 'image', '1', '0', d)}" = "0" ] ; then return fi @@ -414,7 +414,7 @@ buildhistory_get_sdk_installed() { # Anything requiring the use of the packaging system should be done in here # in case the packaging files are going to be removed for this SDK - if [ "${@base_contains('BUILDHISTORY_FEATURES', 'sdk', '1', '0', d)}" = "0" ] ; then + if [ "${@bb.utils.contains('BUILDHISTORY_FEATURES', 'sdk', '1', '0', d)}" = "0" ] ; then return fi @@ -437,7 +437,7 @@ buildhistory_list_files() { buildhistory_get_imageinfo() { - if [ "${@base_contains('BUILDHISTORY_FEATURES', 'image', '1', '0', d)}" = "0" ] ; then + if [ "${@bb.utils.contains('BUILDHISTORY_FEATURES', 'image', '1', '0', d)}" = "0" ] ; then return fi @@ -469,7 +469,7 @@ END } buildhistory_get_sdkinfo() { - if [ "${@base_contains('BUILDHISTORY_FEATURES', 'sdk', '1', '0', d)}" = "0" ] ; then + if [ "${@bb.utils.contains('BUILDHISTORY_FEATURES', 'sdk', '1', '0', d)}" = "0" ] ; then return fi diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass index 7475d7d8d5..1b36cba773 100644 --- a/meta/classes/core-image.bbclass +++ b/meta/classes/core-image.bbclass @@ -73,7 +73,7 @@ inherit image ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; " # Zap the root password if debug-tweaks feature is not enabled -ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "", "zap_empty_root_password ; ",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "", "zap_empty_root_password ; ",d)}' # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled -ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}' 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" IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs" # rootfs bootstrap install -ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}" +ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}" # packages to install from features FEATURE_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" do_build[depends] += "virtual/kernel:do_deploy" def build_live(d): - if base_contains("IMAGE_FSTYPES", "live", "live", "0", d) == "0": # live is not set but hob might set iso or hddimg - d.setVar('NOISO', base_contains('IMAGE_FSTYPES', "iso", "0", "1", d)) - d.setVar('NOHDD', base_contains('IMAGE_FSTYPES', "hddimg", "0", "1", d)) + if bb.utils.contains("IMAGE_FSTYPES", "live", "live", "0", d) == "0": # live is not set but hob might set iso or hddimg + d.setVar('NOISO', bb.utils.contains('IMAGE_FSTYPES', "iso", "0", "1", d)) + d.setVar('NOHDD', bb.utils.contains('IMAGE_FSTYPES', "hddimg", "0", "1", d)) if d.getVar('NOISO', True) == "0" or d.getVar('NOHDD', True) == "0": return "image-live" return "" @@ -90,7 +90,7 @@ def build_live(d): IMAGE_TYPE_live = "${@build_live(d)}" inherit ${IMAGE_TYPE_live} -IMAGE_TYPE_vmdk = '${@base_contains("IMAGE_FSTYPES", "vmdk", "image-vmdk", "", d)}' +IMAGE_TYPE_vmdk = '${@bb.utils.contains("IMAGE_FSTYPES", "vmdk", "image-vmdk", "", d)}' inherit ${IMAGE_TYPE_vmdk} python () { @@ -143,17 +143,17 @@ inherit ${IMAGE_CLASSES} IMAGE_POSTPROCESS_COMMAND ?= "" MACHINE_POSTPROCESS_COMMAND ?= "" # Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks is enabled -ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "ssh_allow_empty_password; ", "",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "ssh_allow_empty_password; ", "",d)}' # Enable postinst logging if debug-tweaks is enabled -ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}' # Write manifest IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest" ROOTFS_POSTPROCESS_COMMAND =+ "write_image_manifest ; " # Set default postinst log file POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log" # Set default target for systemd images -SYSTEMD_DEFAULT_TARGET ?= '${@base_contains("IMAGE_FEATURES", "x11-base", "graphical.target", "multi-user.target", d)}' -ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; ", "", d)}' +SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "graphical.target", "multi-user.target", d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; ", "", d)}' # some default locales IMAGE_LINGUAS ?= "de-de fr-fr en-gb" @@ -173,7 +173,7 @@ do_rootfs[umask] = "022" # A hook function to support read-only-rootfs IMAGE_FEATURES # Currently, it only supports sysvinit system. read_only_rootfs_hook () { - if ${@base_contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then + if ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then # Tweak the mount option and fs_passno for rootfs in fstab sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass index 9bc9cc22ad..6606bc6f71 100644 --- a/meta/classes/packagegroup.bbclass +++ b/meta/classes/packagegroup.bbclass @@ -41,7 +41,7 @@ do_populate_sysroot[noexec] = "1" python () { initman = d.getVar("VIRTUAL-RUNTIME_init_manager", True) - if initman and initman in ['sysvinit', 'systemd'] and not base_contains('DISTRO_FEATURES', initman, True, False, d): + if initman and initman in ['sysvinit', 'systemd'] and not bb.utils.contains('DISTRO_FEATURES', initman, True, False, d): bb.fatal("Please ensure that your setting of VIRTUAL-RUNTIME_init_manager (%s) matches the entries enabled in DISTRO_FEATURES" % initman) } diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass index 5c5505d9b2..c96e74fd9e 100644 --- a/meta/classes/ptest.bbclass +++ b/meta/classes/ptest.bbclass @@ -6,14 +6,14 @@ PTEST_PATH ?= "${libdir}/${PN}/ptest" FILES_${PN}-ptest = "${PTEST_PATH}" SECTION_${PN}-ptest = "devel" ALLOW_EMPTY_${PN}-ptest = "1" -PTEST_ENABLED = "${@base_contains('DISTRO_FEATURES', 'ptest', '1', '0', d)}" +PTEST_ENABLED = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '1', '0', d)}" PTEST_ENABLED_class-native = "" PTEST_ENABLED_class-nativesdk = "" PTEST_ENABLED_class-cross-canadian = "" RDEPENDS_${PN}-ptest_class-native = "" RDEPENDS_${PN}-ptest_class-nativesdk = "" -PACKAGES =+ "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}" +PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}" do_configure_ptest() { : diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass index 4b02247d49..9e97d341d9 100644 --- a/meta/classes/rootfs_rpm.bbclass +++ b/meta/classes/rootfs_rpm.bbclass @@ -6,7 +6,7 @@ ROOTFS_PKGMANAGE = "rpm smartpm" ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts" # Add 50Meg of extra space for Smart -IMAGE_ROOTFS_EXTRA_SPACE_append = "${@base_contains("PACKAGE_INSTALL", "smartpm", " + 51200", "" ,d)}" +IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "smartpm", " + 51200", "" ,d)}" # Smart is python based, so be sure python-native is available to us. EXTRANATIVEPATH += "python-native" |