summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
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:47:00 +0000
commitbd6d3f995030136092746ed4a612f59f7bdca753 (patch)
tree2fdf0a77e64bf685259b4de25d1cfe67b82570ab /meta/recipes-devtools
parent6dbb08c7a482cc9841c2c20351712458deee2316 (diff)
downloadpoky-bd6d3f995030136092746ed4a612f59f7bdca753.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: f12fcb8a3f3d11c981c223569f8f40ec705c837a) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/go/go_1.19.4.bb4
-rw-r--r--meta/recipes-devtools/rust/rust.inc22
2 files changed, 13 insertions, 13 deletions
diff --git a/meta/recipes-devtools/go/go_1.19.4.bb b/meta/recipes-devtools/go/go_1.19.4.bb
index 98977673ee..587ee55944 100644
--- a/meta/recipes-devtools/go/go_1.19.4.bb
+++ b/meta/recipes-devtools/go/go_1.19.4.bb
@@ -12,7 +12,7 @@ export CXX_FOR_TARGET = "g++"
12# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its 12# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its
13# variants. 13# variants.
14python() { 14python() {
15 if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv32' in d.getVar('TARGET_ARCH',True): 15 if 'mips' in d.getVar('TARGET_ARCH') or 'riscv32' in d.getVar('TARGET_ARCH'):
16 d.appendVar('INSANE_SKIP:%s' % d.getVar('PN',True), " textrel") 16 d.appendVar('INSANE_SKIP:%s' % d.getVar('PN'), " textrel")
17} 17}
18 18
diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
index 956301023a..7d87e8e1b2 100644
--- a/meta/recipes-devtools/rust/rust.inc
+++ b/meta/recipes-devtools/rust/rust.inc
@@ -72,7 +72,7 @@ python do_configure() {
72 config = configparser.RawConfigParser() 72 config = configparser.RawConfigParser()
73 73
74 # [target.ARCH-poky-linux] 74 # [target.ARCH-poky-linux]
75 host_section = "target.{}".format(d.getVar('RUST_HOST_SYS', True)) 75 host_section = "target.{}".format(d.getVar('RUST_HOST_SYS'))
76 config.add_section(host_section) 76 config.add_section(host_section)
77 77
78 llvm_config_target = d.expand("${RUST_ALTERNATE_EXE_PATH}") 78 llvm_config_target = d.expand("${RUST_ALTERNATE_EXE_PATH}")
@@ -87,7 +87,7 @@ python do_configure() {
87 87
88 # If we don't do this rust-native will compile it's own llvm for BUILD. 88 # If we don't do this rust-native will compile it's own llvm for BUILD.
89 # [target.${BUILD_ARCH}-unknown-linux-gnu] 89 # [target.${BUILD_ARCH}-unknown-linux-gnu]
90 build_section = "target.{}".format(d.getVar('RUST_BUILD_SYS', True)) 90 build_section = "target.{}".format(d.getVar('RUST_BUILD_SYS'))
91 if build_section != host_section: 91 if build_section != host_section:
92 config.add_section(build_section) 92 config.add_section(build_section)
93 93
@@ -97,7 +97,7 @@ python do_configure() {
97 config.set(build_section, "cc", e(d.expand("${RUST_BUILD_CC}"))) 97 config.set(build_section, "cc", e(d.expand("${RUST_BUILD_CC}")))
98 config.set(build_section, "linker", e(d.expand("${RUST_BUILD_CCLD}"))) 98 config.set(build_section, "linker", e(d.expand("${RUST_BUILD_CCLD}")))
99 99
100 target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True)) 100 target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS'))
101 if target_section != host_section and target_section != build_section: 101 if target_section != host_section and target_section != build_section:
102 config.add_section(target_section) 102 config.add_section(target_section)
103 103
@@ -143,26 +143,26 @@ python do_configure() {
143 config.set("build", "vendor", e(True)) 143 config.set("build", "vendor", e(True))
144 144
145 if not "targets" in locals(): 145 if not "targets" in locals():
146 targets = [d.getVar("RUST_TARGET_SYS", True)] 146 targets = [d.getVar("RUST_TARGET_SYS")]
147 config.set("build", "target", e(targets)) 147 config.set("build", "target", e(targets))
148 148
149 if not "hosts" in locals(): 149 if not "hosts" in locals():
150 hosts = [d.getVar("RUST_HOST_SYS", True)] 150 hosts = [d.getVar("RUST_HOST_SYS")]
151 config.set("build", "host", e(hosts)) 151 config.set("build", "host", e(hosts))
152 152
153 # We can't use BUILD_SYS since that is something the rust snapshot knows 153 # We can't use BUILD_SYS since that is something the rust snapshot knows
154 # nothing about when trying to build some stage0 tools (like fabricate) 154 # nothing about when trying to build some stage0 tools (like fabricate)
155 config.set("build", "build", e(d.getVar("RUST_BUILD_SYS", True))) 155 config.set("build", "build", e(d.getVar("RUST_BUILD_SYS")))
156 156
157 # [install] 157 # [install]
158 config.add_section("install") 158 config.add_section("install")
159 # ./x.py install doesn't have any notion of "destdir" 159 # ./x.py install doesn't have any notion of "destdir"
160 # but we can prepend ${D} to all the directories instead 160 # but we can prepend ${D} to all the directories instead
161 config.set("install", "prefix", e(d.getVar("D", True) + d.getVar("prefix", True))) 161 config.set("install", "prefix", e(d.getVar("D") + d.getVar("prefix")))
162 config.set("install", "bindir", e(d.getVar("D", True) + d.getVar("bindir", True))) 162 config.set("install", "bindir", e(d.getVar("D") + d.getVar("bindir")))
163 config.set("install", "libdir", e(d.getVar("D", True) + d.getVar("libdir", True))) 163 config.set("install", "libdir", e(d.getVar("D") + d.getVar("libdir")))
164 config.set("install", "datadir", e(d.getVar("D", True) + d.getVar("datadir", True))) 164 config.set("install", "datadir", e(d.getVar("D") + d.getVar("datadir")))
165 config.set("install", "mandir", e(d.getVar("D", True) + d.getVar("mandir", True))) 165 config.set("install", "mandir", e(d.getVar("D") + d.getVar("mandir")))
166 166
167 with open("config.toml", "w") as f: 167 with open("config.toml", "w") as f:
168 f.write('changelog-seen = 2\n\n') 168 f.write('changelog-seen = 2\n\n')