summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2023-02-01 16:50:38 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-15 21:46:56 +0000
commit54d0147307e0fb581db20603cfec58d74343a0de (patch)
tree0924d0197faf85851987995fe249615d0ee28e16
parentf8183e4c6f63ac34ab17262f60ea4b64d6712e6f (diff)
downloadpoky-54d0147307e0fb581db20603cfec58d74343a0de.tar.gz
meta: remove True option to getVar and getVarFlag calls (again)
* True is default since 2016 and most layers were already updated not to pass this parameter where not necessary, e.g. oe-core was updated couple times, first in: https://git.openembedded.org/openembedded-core/commit/?id=7c552996597faaee2fbee185b250c0ee30ea3b5f Updated with the same regexp as later oe-core update: https://git.openembedded.org/openembedded-core/commit/?id=9f551d588693328e4d99d33be94f26684eafcaba with small modification to replace not only d.getVar, but also data.getVar as in e.g.: e.data.getVar('ERR_REPORT_USERNAME', True) and for getVarFlag: sed -e 's|\(d\.getVarFlag \?\)( \?\([^,()]*, \?[^,()]*\), \?True)|\1(\2)|g' \ -i $(git grep -E 'getVarFlag ?\( ?([^,()]*), ?([^,()]*), ?True\)' \ | cut -d':' -f1 \ | sort -u) (From OE-Core rev: de7bf6689a19dc614ce4b39c84ffd825bee1b962) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 26c74fd10614582e177437608908eb43688ab510) Signed-off-by: Steve Sakoman <steve@sakoman.com> (cherry picked from commit 24a86d0c55ee89ae0dc77975e1d0ee02898d2289) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image.bbclass2
-rw-r--r--meta/classes/license_image.bbclass2
-rw-r--r--meta/lib/oe/package_manager/deb/__init__.py8
-rw-r--r--meta/recipes-devtools/go/go_1.17.13.bb4
-rw-r--r--meta/recipes-devtools/rust/rust-common.inc2
-rw-r--r--meta/recipes-devtools/rust/rust.inc20
-rwxr-xr-xscripts/contrib/image-manifest2
-rw-r--r--scripts/lib/devtool/menuconfig.py2
8 files changed, 21 insertions, 21 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index c424c4c41d..aa14ea2316 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -440,7 +440,7 @@ python () {
440 localdata.delVar('DATE') 440 localdata.delVar('DATE')
441 localdata.delVar('TMPDIR') 441 localdata.delVar('TMPDIR')
442 localdata.delVar('IMAGE_VERSION_SUFFIX') 442 localdata.delVar('IMAGE_VERSION_SUFFIX')
443 vardepsexclude = (d.getVarFlag('IMAGE_CMD:' + realt, 'vardepsexclude', True) or '').split() 443 vardepsexclude = (d.getVarFlag('IMAGE_CMD:' + realt, 'vardepsexclude') or '').split()
444 for dep in vardepsexclude: 444 for dep in vardepsexclude:
445 localdata.delVar(dep) 445 localdata.delVar(dep)
446 446
diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass
index 3213ea758e..1c06a02951 100644
--- a/meta/classes/license_image.bbclass
+++ b/meta/classes/license_image.bbclass
@@ -229,7 +229,7 @@ def get_deployed_dependencies(d):
229 deploy = {} 229 deploy = {}
230 # Get all the dependencies for the current task (rootfs). 230 # Get all the dependencies for the current task (rootfs).
231 taskdata = d.getVar("BB_TASKDEPDATA", False) 231 taskdata = d.getVar("BB_TASKDEPDATA", False)
232 pn = d.getVar("PN", True) 232 pn = d.getVar("PN")
233 depends = list(set([dep[0] for dep 233 depends = list(set([dep[0] for dep
234 in list(taskdata.values()) 234 in list(taskdata.values())
235 if not dep[0].endswith("-native") and not dep[0] == pn])) 235 if not dep[0].endswith("-native") and not dep[0] == pn]))
diff --git a/meta/lib/oe/package_manager/deb/__init__.py b/meta/lib/oe/package_manager/deb/__init__.py
index 86ddb130ad..910f217b62 100644
--- a/meta/lib/oe/package_manager/deb/__init__.py
+++ b/meta/lib/oe/package_manager/deb/__init__.py
@@ -80,15 +80,15 @@ class DpkgIndexer(Indexer):
80 return 80 return
81 81
82 oe.utils.multiprocess_launch(create_index, index_cmds, self.d) 82 oe.utils.multiprocess_launch(create_index, index_cmds, self.d)
83 if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1': 83 if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
84 signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND', True)) 84 signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND'))
85 else: 85 else:
86 signer = None 86 signer = None
87 if signer: 87 if signer:
88 for f in index_sign_files: 88 for f in index_sign_files:
89 signer.detach_sign(f, 89 signer.detach_sign(f,
90 self.d.getVar('PACKAGE_FEED_GPG_NAME', True), 90 self.d.getVar('PACKAGE_FEED_GPG_NAME'),
91 self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE', True), 91 self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
92 output_suffix="gpg", 92 output_suffix="gpg",
93 use_sha256=True) 93 use_sha256=True)
94 94
diff --git a/meta/recipes-devtools/go/go_1.17.13.bb b/meta/recipes-devtools/go/go_1.17.13.bb
index 34dc89bb0c..bb57c1c48a 100644
--- a/meta/recipes-devtools/go/go_1.17.13.bb
+++ b/meta/recipes-devtools/go/go_1.17.13.bb
@@ -11,7 +11,7 @@ export CXX_FOR_TARGET = "g++"
11# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its 11# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its
12# variants. 12# variants.
13python() { 13python() {
14 if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv32' in d.getVar('TARGET_ARCH',True): 14 if 'mips' in d.getVar('TARGET_ARCH') or 'riscv32' in d.getVar('TARGET_ARCH'):
15 d.appendVar('INSANE_SKIP:%s' % d.getVar('PN',True), " textrel") 15 d.appendVar('INSANE_SKIP:%s' % d.getVar('PN'), " textrel")
16} 16}
17 17
diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc
index ef70c48d0f..db0bd8fc1b 100644
--- a/meta/recipes-devtools/rust/rust-common.inc
+++ b/meta/recipes-devtools/rust/rust-common.inc
@@ -109,7 +109,7 @@ def llvm_features_from_target_fpu(d):
109 # TARGET_FPU can be hard or soft. +soft-float tell llvm to use soft float 109 # TARGET_FPU can be hard or soft. +soft-float tell llvm to use soft float
110 # ABI. There is no option for hard. 110 # ABI. There is no option for hard.
111 111
112 fpu = d.getVar('TARGET_FPU', True) 112 fpu = d.getVar('TARGET_FPU')
113 return ["+soft-float"] if fpu == "soft" else [] 113 return ["+soft-float"] if fpu == "soft" else []
114 114
115def llvm_features(d): 115def llvm_features(d):
diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
index f39228e3c0..008b2ce4a4 100644
--- a/meta/recipes-devtools/rust/rust.inc
+++ b/meta/recipes-devtools/rust/rust.inc
@@ -79,7 +79,7 @@ python do_configure() {
79 config = configparser.RawConfigParser() 79 config = configparser.RawConfigParser()
80 80
81 # [target.ARCH-poky-linux] 81 # [target.ARCH-poky-linux]
82 target_section = "target.{}".format(d.getVar('TARGET_SYS', True)) 82 target_section = "target.{}".format(d.getVar('TARGET_SYS'))
83 config.add_section(target_section) 83 config.add_section(target_section)
84 84
85 llvm_config = d.expand("${YOCTO_ALTERNATE_EXE_PATH}") 85 llvm_config = d.expand("${YOCTO_ALTERNATE_EXE_PATH}")
@@ -90,7 +90,7 @@ python do_configure() {
90 90
91 # If we don't do this rust-native will compile it's own llvm for BUILD. 91 # If we don't do this rust-native will compile it's own llvm for BUILD.
92 # [target.${BUILD_ARCH}-unknown-linux-gnu] 92 # [target.${BUILD_ARCH}-unknown-linux-gnu]
93 target_section = "target.{}".format(d.getVar('SNAPSHOT_BUILD_SYS', True)) 93 target_section = "target.{}".format(d.getVar('SNAPSHOT_BUILD_SYS'))
94 config.add_section(target_section) 94 config.add_section(target_section)
95 95
96 config.set(target_section, "llvm-config", e(llvm_config)) 96 config.set(target_section, "llvm-config", e(llvm_config))
@@ -124,26 +124,26 @@ python do_configure() {
124 config.set("build", "vendor", e(True)) 124 config.set("build", "vendor", e(True))
125 125
126 if not "targets" in locals(): 126 if not "targets" in locals():
127 targets = [d.getVar("TARGET_SYS", True)] 127 targets = [d.getVar("TARGET_SYS")]
128 config.set("build", "target", e(targets)) 128 config.set("build", "target", e(targets))
129 129
130 if not "hosts" in locals(): 130 if not "hosts" in locals():
131 hosts = [d.getVar("HOST_SYS", True)] 131 hosts = [d.getVar("HOST_SYS")]
132 config.set("build", "host", e(hosts)) 132 config.set("build", "host", e(hosts))
133 133
134 # We can't use BUILD_SYS since that is something the rust snapshot knows 134 # We can't use BUILD_SYS since that is something the rust snapshot knows
135 # nothing about when trying to build some stage0 tools (like fabricate) 135 # nothing about when trying to build some stage0 tools (like fabricate)
136 config.set("build", "build", e(d.getVar("SNAPSHOT_BUILD_SYS", True))) 136 config.set("build", "build", e(d.getVar("SNAPSHOT_BUILD_SYS")))
137 137
138 # [install] 138 # [install]
139 config.add_section("install") 139 config.add_section("install")
140 # ./x.py install doesn't have any notion of "destdir" 140 # ./x.py install doesn't have any notion of "destdir"
141 # but we can prepend ${D} to all the directories instead 141 # but we can prepend ${D} to all the directories instead
142 config.set("install", "prefix", e(d.getVar("D", True) + d.getVar("prefix", True))) 142 config.set("install", "prefix", e(d.getVar("D") + d.getVar("prefix")))
143 config.set("install", "bindir", e(d.getVar("D", True) + d.getVar("bindir", True))) 143 config.set("install", "bindir", e(d.getVar("D") + d.getVar("bindir")))
144 config.set("install", "libdir", e(d.getVar("D", True) + d.getVar("libdir", True))) 144 config.set("install", "libdir", e(d.getVar("D") + d.getVar("libdir")))
145 config.set("install", "datadir", e(d.getVar("D", True) + d.getVar("datadir", True))) 145 config.set("install", "datadir", e(d.getVar("D") + d.getVar("datadir")))
146 config.set("install", "mandir", e(d.getVar("D", True) + d.getVar("mandir", True))) 146 config.set("install", "mandir", e(d.getVar("D") + d.getVar("mandir")))
147 147
148 with open("config.toml", "w") as f: 148 with open("config.toml", "w") as f:
149 f.write('changelog-seen = 2\n\n') 149 f.write('changelog-seen = 2\n\n')
diff --git a/scripts/contrib/image-manifest b/scripts/contrib/image-manifest
index 3c07a73a4e..4d65a99258 100755
--- a/scripts/contrib/image-manifest
+++ b/scripts/contrib/image-manifest
@@ -392,7 +392,7 @@ def export_manifest_info(args):
392 for key in rd.getVarFlags('PACKAGECONFIG').keys(): 392 for key in rd.getVarFlags('PACKAGECONFIG').keys():
393 if key == 'doc': 393 if key == 'doc':
394 continue 394 continue
395 rvalues[pn]['packageconfig_opts'][key] = rd.getVarFlag('PACKAGECONFIG', key, True) 395 rvalues[pn]['packageconfig_opts'][key] = rd.getVarFlag('PACKAGECONFIG', key)
396 396
397 if config['patches'] == 'yes': 397 if config['patches'] == 'yes':
398 patches = oe.recipeutils.get_recipe_patches(rd) 398 patches = oe.recipeutils.get_recipe_patches(rd)
diff --git a/scripts/lib/devtool/menuconfig.py b/scripts/lib/devtool/menuconfig.py
index 95384c5333..ff9227035d 100644
--- a/scripts/lib/devtool/menuconfig.py
+++ b/scripts/lib/devtool/menuconfig.py
@@ -43,7 +43,7 @@ def menuconfig(args, config, basepath, workspace):
43 return 1 43 return 1
44 44
45 check_workspace_recipe(workspace, args.component) 45 check_workspace_recipe(workspace, args.component)
46 pn = rd.getVar('PN', True) 46 pn = rd.getVar('PN')
47 47
48 if not rd.getVarFlag('do_menuconfig','task'): 48 if not rd.getVarFlag('do_menuconfig','task'):
49 raise DevtoolError("This recipe does not support menuconfig option") 49 raise DevtoolError("This recipe does not support menuconfig option")