diff options
author | Denys Dmytriyenko <denys@ti.com> | 2018-07-10 07:06:01 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2018-07-10 18:39:09 +0000 |
commit | a5ecd90543b0842555662ea92e129d78e6f8c08b (patch) | |
tree | e78c524c27bd0922dbe64879c84fa2405dd6e30e /recipes-ti | |
parent | f64a19d3e99027030decbf4ae9760f3a22a4e584 (diff) | |
download | meta-ti-a5ecd90543b0842555662ea92e129d78e6f8c08b.tar.gz |
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 <denys@ti.com>
Diffstat (limited to 'recipes-ti')
-rw-r--r-- | recipes-ti/devtools/ti-cgt6x_8.2.2.bb | 8 | ||||
-rw-r--r-- | recipes-ti/includes/ti-unpack.inc | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/recipes-ti/devtools/ti-cgt6x_8.2.2.bb b/recipes-ti/devtools/ti-cgt6x_8.2.2.bb index 04e55ae9..53f52526 100644 --- a/recipes-ti/devtools/ti-cgt6x_8.2.2.bb +++ b/recipes-ti/devtools/ti-cgt6x_8.2.2.bb | |||
@@ -13,14 +13,14 @@ COMPATIBLE_HOST_class-target = "arm.*-linux" | |||
13 | 13 | ||
14 | # For now we only have hardfp version for target class | 14 | # For now we only have hardfp version for target class |
15 | python __anonymous() { | 15 | python __anonymous() { |
16 | c = d.getVar("CLASSOVERRIDE", d, 1) | 16 | c = d.getVar("CLASSOVERRIDE") |
17 | 17 | ||
18 | if c == "class-target": | 18 | if c == "class-target": |
19 | tunes = d.getVar("TUNE_FEATURES", d, 1) | 19 | tunes = d.getVar("TUNE_FEATURES") |
20 | if not tunes: | 20 | if not tunes: |
21 | return | 21 | return |
22 | pkgn = d.getVar("PN", d, 1) | 22 | pkgn = d.getVar("PN") |
23 | pkgv = d.getVar("PV", d, 1) | 23 | pkgv = d.getVar("PV") |
24 | if "callconvention-hard" not in tunes: | 24 | if "callconvention-hard" not in tunes: |
25 | bb.warn("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv)) | 25 | bb.warn("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv)) |
26 | raise bb.parse.SkipPackage("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv)) | 26 | raise bb.parse.SkipPackage("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv)) |
diff --git a/recipes-ti/includes/ti-unpack.inc b/recipes-ti/includes/ti-unpack.inc index cc315dff..a571fd5d 100644 --- a/recipes-ti/includes/ti-unpack.inc +++ b/recipes-ti/includes/ti-unpack.inc | |||
@@ -29,21 +29,21 @@ python ti_bin_do_unpack() { | |||
29 | localdata = bb.data.createCopy(d) | 29 | localdata = bb.data.createCopy(d) |
30 | bb.data.update_data(localdata) | 30 | bb.data.update_data(localdata) |
31 | 31 | ||
32 | binfile = d.getVar('BINFILE', localdata) | 32 | binfile = localdata.getVar('BINFILE') |
33 | binfile = bb.data.expand(binfile, localdata) | 33 | binfile = bb.data.expand(binfile, localdata) |
34 | 34 | ||
35 | # Change to the working directory | 35 | # Change to the working directory |
36 | save_cwd = os.getcwd() | 36 | save_cwd = os.getcwd() |
37 | workdir = d.getVar('WORKDIR', localdata) | 37 | workdir = localdata.getVar('WORKDIR') |
38 | workdir = bb.data.expand(workdir, localdata) | 38 | workdir = bb.data.expand(workdir, localdata) |
39 | os.chdir(workdir) | 39 | os.chdir(workdir) |
40 | 40 | ||
41 | # Get unpack args | 41 | # Get unpack args |
42 | arg_string = d.getVar('TI_BIN_UNPK_ARGS', localdata) | 42 | arg_string = localdata.getVar('TI_BIN_UNPK_ARGS') |
43 | arg_string = bb.data.expand(arg_string, localdata) | 43 | arg_string = bb.data.expand(arg_string, localdata) |
44 | 44 | ||
45 | # Get unpack commands | 45 | # Get unpack commands |
46 | cmd_string = d.getVar('TI_BIN_UNPK_CMDS', localdata) | 46 | cmd_string = localdata.getVar('TI_BIN_UNPK_CMDS') |
47 | cmd_list = cmd_string.split( ":" ) | 47 | cmd_list = cmd_string.split( ":" ) |
48 | 48 | ||
49 | # Make the InstallJammer binary executable so we can run it | 49 | # Make the InstallJammer binary executable so we can run it |
@@ -61,14 +61,14 @@ python ti_bin_do_unpack() { | |||
61 | f = os.popen(filename,'w') | 61 | f = os.popen(filename,'w') |
62 | for cmd in cmd_list: | 62 | for cmd in cmd_list: |
63 | if cmd == "workdir": | 63 | if cmd == "workdir": |
64 | wdext = d.getVar('TI_BIN_UNPK_WDEXT', localdata) | 64 | wdext = localdata.getVar('TI_BIN_UNPK_WDEXT') |
65 | wdext = bb.data.expand(wdext, localdata) | 65 | wdext = bb.data.expand(wdext, localdata) |
66 | cmd = workdir+wdext | 66 | cmd = workdir+wdext |
67 | f.write(cmd+'\n'); | 67 | f.write(cmd+'\n'); |
68 | f.close() | 68 | f.close() |
69 | 69 | ||
70 | # Expand the tarball that was created if required | 70 | # Expand the tarball that was created if required |
71 | tarfile = d.getVar('TARFILE', localdata) | 71 | tarfile = localdata.getVar('TARFILE') |
72 | if bool(tarfile) == True: | 72 | if bool(tarfile) == True: |
73 | tarfile = bb.data.expand(tarfile, localdata) | 73 | tarfile = bb.data.expand(tarfile, localdata) |
74 | tcmd = 'tar x --no-same-owner -f %s -C %s' % (tarfile, workdir) | 74 | tcmd = 'tar x --no-same-owner -f %s -C %s' % (tarfile, workdir) |