meta-arago: cleanup use of d.getVar()
PATCH 1/1 meta-arago: cleanup use of d.getVar()
1. drop use of True as second parameter, which is default, to align with master
2. there were instances of incorrectly passing 'd' as second parameter from previous conversion from bb.data.getVar() usage
Signed-off-by Denys Dmytriyenko <[email protected]>
--- .../classes/kernel-fitimage.bbclass | 16 ++++++++-------- meta-arago-distro/classes/tisdk-image.bbclass | 8 ++++---- meta-arago-distro/classes/uboot-config.bbclass | 14 +++++++------- meta-arago-distro/classes/uboot-sign.bbclass | 6 +++--- meta-arago-distro/conf/distro/arago.conf | 4 ++-- .../conf/distro/include/toolchain-gcc.inc | 2 +- .../netboot-initrd/netboot-initrd_0.0.1.bb | 3 +-- .../recipes-devtools/gcc/gcc_%.bbappend | 2 +- .../wayland/wayland-ivi-extension_2.1.0.bb | 2 +- .../examples/qtwebbrowser_1.0.bbappend | 0 .../recipes-qt/qt5/qtbase_%.bbappend | 4 ++-- .../include/tclibc-external-linaro-toolchain.inc | 6 +++--- meta-arago-extras/recipes-core/llvm/llvm.inc | 2 +- .../meta/external-linaro-bfd-version.inc | 4 ++-- .../ocl-rtos/opencl-examples-rtos_git.bb | 4 ++-- .../recipes-ti/ocl/opencl-examples_git.bb | 4 ++-- .../openmpacc/openmpacc-examples_git.bb | 4 ++-- 17 files changed, 42 insertions(+), 43 deletions(-) mode change 100755 => 100644 meta-arago-distro/recipes-qt/examples/qtwebbrowser_1.0.bbappend
meta-arago-distro/classes/kernel-fitimage.bbclass +8 -8
@@ -10,13 +10,13 @@ XZ_INTEGRITY_CHECK ?= "crc32" XZ_THREADS ?= "-T 0" python __anonymous () { - kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or "" + kerneltypes = d.getVar('KERNEL_IMAGETYPES') or "" if 'fitImage' in kerneltypes.split(): - depends = d.getVar("DEPENDS", True) + depends = d.getVar("DEPENDS") depends = "%s u-boot-mkimage-native dtc-native" % depends d.setVar("DEPENDS", depends) - if d.getVar("UBOOT_ARCH", True) == "x86": + if d.getVar("UBOOT_ARCH") == "x86": replacementtype = "bzImage" else: replacementtype = "zImage"
@@ -24,22 +24,22 @@ python __anonymous () { # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal # to kernel.bbclass . We have to override it, since we pack zImage # (at least for now) into the fitImage . - typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or "" + typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or "" if 'fitImage' in typeformake.split(): d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('fitImage', replacementtype)) - image = d.getVar('INITRAMFS_IMAGE', True) + image = d.getVar('INITRAMFS_IMAGE') if image: d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') # Verified boot will sign the fitImage and append the public key to # U-boot dtb. We ensure the U-Boot dtb is deployed before assembling # the fitImage: - if d.getVar('UBOOT_SIGN_ENABLE', True): - uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot', True) or 'u-boot' + if d.getVar('UBOOT_SIGN_ENABLE'): + uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot' d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_deploy' % uboot_pn) - if d.getVar('OPTEEMACHINE', True): + if d.getVar('OPTEEMACHINE'): d.appendVarFlag('do_assemble_fitimage', 'depends', ' optee-os:do_deploy') }
meta-arago-distro/classes/tisdk-image.bbclass +4 -4
@@ -81,12 +81,12 @@ def string_set(iterable): # Add a dependency for the do_rootfs function that will force us to build # the TARGET_IMAGES first so that they will be available for packaging. -do_rootfs[depends] += "${@string_set('%s:do_image_complete' % pn for pn in (d.getVar("TARGET_IMAGES", True) or "").split())}" +do_rootfs[depends] += "${@string_set('%s:do_image_complete' % pn for pn in (d.getVar("TARGET_IMAGES") or "").split())}" # Add a dependency for the do_populate_sdk function of the TIDSK_TOOLCHAIN # variable which will force us to build the toolchain first so that it will be # available for packaging -do_rootfs[depends] += "${@string_set('%s:do_populate_sdk' % pn for pn in (d.getVar("TISDK_TOOLCHAIN", True) or "").split())}" +do_rootfs[depends] += "${@string_set('%s:do_populate_sdk' % pn for pn in (d.getVar("TISDK_TOOLCHAIN") or "").split())}" do_rootfs[nostamp] = "1" do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock"
@@ -670,7 +670,7 @@ fakeroot python do_rootfs () { fakeroot python do_image () { from oe.utils import execute_pre_post_process - pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND", True) + pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND") execute_pre_post_process(d, pre_process_cmds) }
@@ -681,7 +681,7 @@ addtask do_image after do_rootfs before do_build fakeroot python do_image_complete () { from oe.utils import execute_pre_post_process - post_process_cmds = d.getVar("IMAGE_POSTPROCESS_COMMAND", True) + post_process_cmds = d.getVar("IMAGE_POSTPROCESS_COMMAND") execute_pre_post_process(d, post_process_cmds) }
meta-arago-distro/classes/uboot-config.bbclass +7 -7
@@ -14,20 +14,20 @@ UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" python () { - ubootmachine = d.getVar("UBOOT_MACHINE", True) + ubootmachine = d.getVar("UBOOT_MACHINE") ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') - ubootbinary = d.getVar('UBOOT_BINARY', True) - ubootbinaries = d.getVar('UBOOT_BINARIES', True) + ubootbinary = d.getVar('UBOOT_BINARY') + ubootbinaries = d.getVar('UBOOT_BINARIES') # The "doc" varflag is special, we don't want to see it here ubootconfigflags.pop('doc', None) - ubootconfig = (d.getVar('UBOOT_CONFIG', True) or "").split() + ubootconfig = (d.getVar('UBOOT_CONFIG') or "").split() if not ubootmachine and len(ubootconfig) == 0: - PN = d.getVar("PN", True) - FILE = os.path.basename(d.getVar("FILE", True)) + PN = d.getVar("PN") + FILE = os.path.basename(d.getVar("FILE")) bb.debug(1, "To build %s, see %s for instructions on \ setting up your machine config" % (PN, FILE)) - raise bb.parse.SkipPackage("Either UBOOT_MACHINE or UBOOT_CONFIG must be set in the %s machine configuration." % d.getVar("MACHINE", True)) + raise bb.parse.SkipPackage("Either UBOOT_MACHINE or UBOOT_CONFIG must be set in the %s machine configuration." % d.getVar("MACHINE")) if ubootmachine and len(ubootconfig) > 0: raise bb.parse.SkipPackage("You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.")
meta-arago-distro/classes/uboot-sign.bbclass +3 -3
@@ -80,9 +80,9 @@ do_concat_dtb () { } python () { - uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot', True) or 'u-boot' - if d.getVar('UBOOT_SIGN_ENABLE', True) == '1' and d.getVar('PN', True) == uboot_pn: - kernel_pn = d.getVar('PREFERRED_PROVIDER_virtual/kernel', True) + uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot' + if d.getVar('UBOOT_SIGN_ENABLE') == '1' and d.getVar('PN') == uboot_pn: + kernel_pn = d.getVar('PREFERRED_PROVIDER_virtual/kernel') # u-boot.dtb and u-boot-nodtb.bin are deployed _before_ do_deploy # Thus, do_deploy_setscene will also populate them in DEPLOY_IMAGE_DIR
meta-arago-distro/conf/distro/arago.conf +2 -2
@@ -132,13 +132,13 @@ ARAGO_KERNEL_SUFFIX_append = "${@base_conditional("ARAGO_RT_ENABLE", "1", "-rt", # Set systest kernel suffix ARAGO_SYSTEST_ENABLE ?= "0" ARAGO_KERNEL_SUFFIX_append = "${@base_conditional("ARAGO_SYSTEST_ENABLE", "1", "-systest", "", d)}" -IMAGE_FSTYPES_remove = "${@['','ubi ubifs'][d.getVar('ARAGO_SYSTEST_ENABLE', True) == '1']}" +IMAGE_FSTYPES_remove = "${@['','ubi ubifs'][d.getVar('ARAGO_SYSTEST_ENABLE') == '1']}" # Toolchain should be selected by setting TOOLCHAIN_BRAND in local.conf # Set some sane defaults, in case someone forgets to set them in local.conf TC_SANE_DEFAULT ?= "linaro" TOOLCHAIN_TYPE ?= "external" -TOOLCHAIN_BRAND ?= "${@[d.getVar('TC_SANE_DEFAULT', True),'gcc'][d.getVar('TOOLCHAIN_TYPE', True) == 'internal']}" +TOOLCHAIN_BRAND ?= "${@[d.getVar('TC_SANE_DEFAULT'),'gcc'][d.getVar('TOOLCHAIN_TYPE') == 'internal']}" require conf/distro/include/toolchain-${TOOLCHAIN_BRAND}.inc require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc
meta-arago-distro/conf/distro/include/toolchain-gcc.inc +1 -1
@@ -2,7 +2,7 @@ TCMODE = "default" TCLIBC = "glibc" -LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}" +LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION') or '') != '']}" # Match some of the external vars TOOLCHAIN_SYS := "${TARGET_SYS}"
meta-arago-distro/recipes-bsp/netboot-initrd/netboot-initrd_0.0.1.bb +1 -2
@@ -25,8 +25,7 @@ IMAGE_INSTALL = "\ " # add the required kernel modules -IMAGE_INSTALL += "${@' '.join(['kernel-module-'+x for x in d.getVar('NETBOOT_KERNEL_MODULES',d,1).split()])}" - +IMAGE_INSTALL += "${@' '.join(['kernel-module-'+x for x in d.getVar('NETBOOT_KERNEL_MODULES').split()])}" # Reduce the size of the rootfs by removing features
meta-arago-distro/recipes-devtools/gcc/gcc_%.bbappend +1 -1
@@ -1,4 +1,4 @@ DEPENDS =+ "flex-native" -EXTRA_DEPS = "${@['','external-linaro-toolchain-cross-${TARGET_ARCH}'][d.getVar('TOOLCHAIN_TYPE', True) == 'external' and d.getVar('TOOLCHAIN_BRAND', True) == 'linaro']}" +EXTRA_DEPS = "${@['','external-linaro-toolchain-cross-${TARGET_ARCH}'][d.getVar('TOOLCHAIN_TYPE') == 'external' and d.getVar('TOOLCHAIN_BRAND') == 'linaro']}" DEPENDS += "${EXTRA_DEPS}"
meta-arago-distro/recipes-graphics/wayland/wayland-ivi-extension_2.1.0.bb +1 -1
@@ -22,7 +22,7 @@ EXTRA_OECMAKE := "-DWITH_ILM_INPUT=1" FILES_${PN} += "${libdir}/weston/*" FILES_${PN}-dbg += "${libdir}/weston/.debug/*" -EXTRA_OECMAKE += "-DLIB_SUFFIX=${@d.getVar('baselib', True).replace('lib', '')}" +EXTRA_OECMAKE += "-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}" PR = "r1"
meta-arago-distro/recipes-qt/examples/qtwebbrowser_1.0.bbappend +0 -0
meta-arago-distro/recipes-qt/qt5/qtbase_%.bbappend +2 -2
@@ -23,8 +23,8 @@ SRC_URI += "\ python do_patch_append() { import shutil - work_dir = d.getVar("WORKDIR", True) - s = d.getVar("S", True) + work_dir = d.getVar("WORKDIR") + s = d.getVar("S") if not bb.utils.contains('DISTRO_FEATURES','wayland',True,False,d): shutil.copy(os.path.join(work_dir,"quit.png"),os.path.join(s,"examples/widgets/animation/animatedtiles/images/"))
meta-arago-extras/conf/distro/include/tclibc-external-linaro-toolchain.inc +3 -3
@@ -2,7 +2,7 @@ # external Linaro glibc specific configuration # -LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}" +LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION') or '') != '']}" # Add glibc overrides to the overrides for glibc. LIBCOVERRIDE = ":libc-glibc"
@@ -32,7 +32,7 @@ LIBC_LOCALE_DEPENDENCIES = "\ locale-base-en-gb" def get_libc_locales_dependencies(d): - if 'libc-locales' in (d.getVar('DISTRO_FEATURES', True) or '').split() : - return d.getVar('LIBC_LOCALE_DEPENDENCIES', True) or '' + if 'libc-locales' in (d.getVar('DISTRO_FEATURES') or '').split() : + return d.getVar('LIBC_LOCALE_DEPENDENCIES') or '' else: return ''
meta-arago-extras/recipes-core/llvm/llvm.inc +1 -1
@@ -153,7 +153,7 @@ python llvm_populate_packages() { split_packages = do_split_packages(d, libdir, '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s', 'Split package for %s', allow_dirs=True, allow_links=True, recursive=True) split_staticdev_packages = do_split_packages(d, libllvm_libdir, '^lib(.*)\.a$', 'libllvm${LLVM_RELEASE}-%s-staticdev', 'Split staticdev package for %s', allow_dirs=True) if split_packages: - pn = d.getVar('PN', True) + pn = d.getVar('PN') d.appendVar('RDEPENDS_' + pn, ' '+' '.join(split_packages)) d.appendVar('RDEPENDS_' + pn + '-dbg', ' '+' '.join(split_dbg_packages)) d.appendVar('RDEPENDS_' + pn + '-staticdev', ' '+' '.join(split_staticdev_packages))
meta-arago-extras/recipes-core/meta/external-linaro-bfd-version.inc +2 -2
@@ -2,7 +2,7 @@ TOOLCHAIN_PATH ??= "${STAGING_BINDIR_TOOLCHAIN}" def elt_get_bfd_version(d): import subprocess,os,bb - if os.path.exists(d.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+d.getVar('TARGET_PREFIX', d, 1)+'as'): - return subprocess.Popen([d.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+d.getVar('TARGET_PREFIX', d, 1)+'as', '-v', '--version'], stderr=subprocess.STDOUT,stdout=subprocess.PIPE).communicate()[0].splitlines()[0].split()[3] + if os.path.exists(d.getVar('TOOLCHAIN_PATH')+'/bin/'+d.getVar('TARGET_PREFIX')+'as'): + return subprocess.Popen([d.getVar('TOOLCHAIN_PATH')+'/bin/'+d.getVar('TARGET_PREFIX')+'as', '-v', '--version'], stderr=subprocess.STDOUT,stdout=subprocess.PIPE).communicate()[0].splitlines()[0].split()[3] ELT_VER_BFD := "${@elt_get_bfd_version(d)}"
meta-arago-extras/recipes-ti/ocl-rtos/opencl-examples-rtos_git.bb +2 -2
@@ -47,14 +47,14 @@ python do_unpack_append() { import shutil git_dir = d.expand("${WORKDIR}/git/examples") - s = d.getVar("S", True) + s = d.getVar("S") os.makedirs(s) shutil.copy(os.path.join(git_dir,"Makefile"),s) shutil.copy(os.path.join(git_dir,"make_rtos.inc"),s) shutil.copy(os.path.join(git_dir,"rtos_main.c"),s) shutil.copy(os.path.join(git_dir,"load_am57_rtos.js"),s) - for example in d.getVar("OCL_EXAMPLE_LIST", True).split(): + for example in d.getVar("OCL_EXAMPLE_LIST").split(): shutil.copytree(os.path.join(git_dir,example), os.path.join(s,example)) }
meta-arago-extras/recipes-ti/ocl/opencl-examples_git.bb +2 -2
@@ -68,12 +68,12 @@ python do_unpack_append() { import shutil git_dir = d.expand("${WORKDIR}/git/examples") - s = d.getVar("S", True) + s = d.getVar("S") os.makedirs(s) shutil.copy(os.path.join(git_dir,"Makefile"),s) shutil.copy(os.path.join(git_dir,"make.inc"),s) - for example in d.getVar("OCL_EXAMPLE_LIST", True).split(): + for example in d.getVar("OCL_EXAMPLE_LIST").split(): shutil.copytree(os.path.join(git_dir,example), os.path.join(s,example)) }
meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb +2 -2
@@ -30,13 +30,13 @@ python do_unpack_append() { import shutil git_dir = d.expand("${WORKDIR}/git/examples") - s = d.getVar("S", True) + s = d.getVar("S") os.makedirs(s) shutil.copy(os.path.join(git_dir,"Makefile"),s) shutil.copy(os.path.join(git_dir,"make.inc"),s) shutil.copy(os.path.join(git_dir,"ompacc_env.sh"),s) - for example in d.getVar("OMPACC_EXAMPLE_LIST", True).split(): + for example in d.getVar("OMPACC_EXAMPLE_LIST").split(): shutil.copytree(os.path.join(git_dir,example), os.path.join(s,example)) }
Signature · 1 line
2.17.1