meta-ti: cleanup use of d.getVar()
PATCH 1/1 meta-ti: 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/ti-pdk.bbclass | 2 +- conf/machine/include/beaglebone.inc | 2 +- recipes-bsp/ipumm-fw/ipumm-fw_git.bb | 2 +- .../libgal/ti-gc320-libs_5.0.11.p7.bb | 6 +++--- .../libgles/ti-sgx-ddk-um_1.14.3699939.bb | 6 +++--- recipes-kernel/linux/cmem.inc | 16 ++++++++-------- recipes-ti/devtools/ti-cgt6x_8.2.2.bb | 8 ++++---- recipes-ti/includes/ti-unpack.inc | 12 ++++++------ 8 files changed, 27 insertions(+), 27 deletions(-)
classes/ti-pdk.bbclass +1 -1
@@ -67,7 +67,7 @@ PARALLEL_XDC = "--jobs=${BB_NUMBER_THREADS}" PARALLEL_MAKE = "" def get_doxygen_support(d): - if d.getVar('TI_PDK_DOXYGEN_SUPPORT', True) == '1': + if d.getVar('TI_PDK_DOXYGEN_SUPPORT') == '1': return '' return 'DOXYGEN_SUPPORT=no'
conf/machine/include/beaglebone.inc +1 -1
@@ -1,5 +1,5 @@ python () { - layers = d.getVar("BBFILE_COLLECTIONS", True) + layers = d.getVar("BBFILE_COLLECTIONS") if not layers: return if "yoctobsp" in layers:
recipes-bsp/ipumm-fw/ipumm-fw_git.bb +1 -1
@@ -1,5 +1,5 @@ python __anonymous() { - features = d.getVar("MACHINE_FEATURES", d, 1) + features = d.getVar("MACHINE_FEATURES") if not features: return if "mmip" not in features:
recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb +3 -3
@@ -14,11 +14,11 @@ SRCREV = "c0afab259de59909cfe74c01f3f7fbaa147f94b5" # There's only hardfp version available python __anonymous() { - tunes = d.getVar("TUNE_FEATURES", d, 1) + tunes = d.getVar("TUNE_FEATURES") if not tunes: return - pkgn = d.getVar("PN", d, 1) - pkgv = d.getVar("PV", d, 1) + pkgn = d.getVar("PN") + pkgv = d.getVar("PV") if "callconvention-hard" not in tunes: bb.warn("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv)) raise bb.parse.SkipPackage("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv))
recipes-graphics/libgles/ti-sgx-ddk-um_1.14.3699939.bb +3 -3
@@ -14,11 +14,11 @@ SRCREV = "358fe42d34a7570896e5d1639869da564ddd0484" # There's only hardfp version available python __anonymous() { - tunes = d.getVar("TUNE_FEATURES", d, 1) + tunes = d.getVar("TUNE_FEATURES") if not tunes: return - pkgn = d.getVar("PN", d, 1) - pkgv = d.getVar("PV", d, 1) + pkgn = d.getVar("PN") + pkgv = d.getVar("PV") if "callconvention-hard" not in tunes: bb.warn("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv)) raise bb.parse.SkipPackage("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv))
recipes-kernel/linux/cmem.inc +8 -8
@@ -39,13 +39,13 @@ python do_unpack() { # Initialize with empty string to simplify logic to append to SRC_URI cmem_dtsi = set(['']) - for cmem_machine in (d.getVar('CMEM_MACHINE', True) or '').split(): + for cmem_machine in (d.getVar('CMEM_MACHINE') or '').split(): # Create copy of data for additional override localdata = bb.data.createCopy(d) localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides)) bb.data.update_data(localdata) - cmem_dtsi.add(localdata.getVar('CMEM_DTSI', True)) + cmem_dtsi.add(localdata.getVar('CMEM_DTSI')) d.appendVar('SRC_URI', ' file://'.join(cmem_dtsi)) bb.build.exec_func('base_do_unpack', d)
@@ -56,27 +56,27 @@ python do_setup_cmem() { old_overrides = d.getVar('OVERRIDES', False) - if d.getVar('RESERVE_CMEM', True) is '1': - for cmem_machine in (d.getVar('CMEM_MACHINE', True) or '').split(): + if d.getVar('RESERVE_CMEM') is '1': + for cmem_machine in (d.getVar('CMEM_MACHINE') or '').split(): # Create copy of data for additional override localdata = bb.data.createCopy(d) localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides)) bb.data.update_data(localdata) # Get source directory and dtsi filename - src_dir = localdata.getVar('WORKDIR', True) - src_dtsi = localdata.getVar('CMEM_DTSI', True) + src_dir = localdata.getVar('WORKDIR') + src_dtsi = localdata.getVar('CMEM_DTSI') # Get destination directory and destination dtsi filename which adds # the MACHINE prefix. - dst_dir = os.path.join(localdata.getVar('S', True), 'arch/arm/boot/dts') + dst_dir = os.path.join(localdata.getVar('S'), 'arch/arm/boot/dts') dst_dtsi = localdata.expand('${MACHINE}-${CMEM_DTSI}') # Copy cmem.dtsi into source tree shutil.copy(os.path.join(src_dir,src_dtsi), os.path.join(dst_dir,dst_dtsi)) # Inject dtsi into each dts in list - for dtb in (localdata.getVar('CMEM_DEVICETREE', True) or '').split(): + for dtb in (localdata.getVar('CMEM_DEVICETREE') or '').split(): dts = dtb[:-4] + '.dts' with open(os.path.join(dst_dir,dts), 'a') as dts_file:
recipes-ti/devtools/ti-cgt6x_8.2.2.bb +4 -4
@@ -13,14 +13,14 @@ COMPATIBLE_HOST_class-target = "arm.*-linux" # For now we only have hardfp version for target class python __anonymous() { - c = d.getVar("CLASSOVERRIDE", d, 1) + c = d.getVar("CLASSOVERRIDE") if c == "class-target": - tunes = d.getVar("TUNE_FEATURES", d, 1) + tunes = d.getVar("TUNE_FEATURES") if not tunes: return - pkgn = d.getVar("PN", d, 1) - pkgv = d.getVar("PV", d, 1) + pkgn = d.getVar("PN") + pkgv = d.getVar("PV") if "callconvention-hard" not in tunes: bb.warn("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv)) raise bb.parse.SkipPackage("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv))
recipes-ti/includes/ti-unpack.inc +6 -6
@@ -29,21 +29,21 @@ python ti_bin_do_unpack() { localdata = bb.data.createCopy(d) bb.data.update_data(localdata) - binfile = d.getVar('BINFILE', localdata) + binfile = localdata.getVar('BINFILE') binfile = bb.data.expand(binfile, localdata) # Change to the working directory save_cwd = os.getcwd() - workdir = d.getVar('WORKDIR', localdata) + workdir = localdata.getVar('WORKDIR') workdir = bb.data.expand(workdir, localdata) os.chdir(workdir) # Get unpack args - arg_string = d.getVar('TI_BIN_UNPK_ARGS', localdata) + arg_string = localdata.getVar('TI_BIN_UNPK_ARGS') arg_string = bb.data.expand(arg_string, localdata) # Get unpack commands - cmd_string = d.getVar('TI_BIN_UNPK_CMDS', localdata) + cmd_string = localdata.getVar('TI_BIN_UNPK_CMDS') cmd_list = cmd_string.split( ":" ) # Make the InstallJammer binary executable so we can run it
@@ -61,14 +61,14 @@ python ti_bin_do_unpack() { f = os.popen(filename,'w') for cmd in cmd_list: if cmd == "workdir": - wdext = d.getVar('TI_BIN_UNPK_WDEXT', localdata) + wdext = localdata.getVar('TI_BIN_UNPK_WDEXT') wdext = bb.data.expand(wdext, localdata) cmd = workdir+wdext f.write(cmd+'\n'); f.close() # Expand the tarball that was created if required - tarfile = d.getVar('TARFILE', localdata) + tarfile = localdata.getVar('TARFILE') if bool(tarfile) == True: tarfile = bb.data.expand(tarfile, localdata) tcmd = 'tar x --no-same-owner -f %s -C %s' % (tarfile, workdir)
Signature · 1 line
2.17.1