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-02 09:50:02 +0000
commit94149c4f374f31d5c780fd33e947170530cd81ec (patch)
tree2f4c9e8666efc8e0bbac014a13b5a15d738a5f9d /meta/recipes-devtools
parent8c36e1557f51934bfc0172909d80f4d7825dd6d0 (diff)
downloadpoky-94149c4f374f31d5c780fd33e947170530cd81ec.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: 26c74fd10614582e177437608908eb43688ab510) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.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_1.67.0.bb22
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_1.67.0.bb b/meta/recipes-devtools/rust/rust_1.67.0.bb
index f4ac8bc635..60f3daf464 100644
--- a/meta/recipes-devtools/rust/rust_1.67.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.67.0.bb
@@ -83,7 +83,7 @@ python do_configure() {
83 config = configparser.RawConfigParser() 83 config = configparser.RawConfigParser()
84 84
85 # [target.ARCH-poky-linux] 85 # [target.ARCH-poky-linux]
86 host_section = "target.{}".format(d.getVar('RUST_HOST_SYS', True)) 86 host_section = "target.{}".format(d.getVar('RUST_HOST_SYS'))
87 config.add_section(host_section) 87 config.add_section(host_section)
88 88
89 llvm_config_target = d.expand("${RUST_ALTERNATE_EXE_PATH}") 89 llvm_config_target = d.expand("${RUST_ALTERNATE_EXE_PATH}")
@@ -98,7 +98,7 @@ python do_configure() {
98 98
99 # If we don't do this rust-native will compile it's own llvm for BUILD. 99 # If we don't do this rust-native will compile it's own llvm for BUILD.
100 # [target.${BUILD_ARCH}-unknown-linux-gnu] 100 # [target.${BUILD_ARCH}-unknown-linux-gnu]
101 build_section = "target.{}".format(d.getVar('RUST_BUILD_SYS', True)) 101 build_section = "target.{}".format(d.getVar('RUST_BUILD_SYS'))
102 if build_section != host_section: 102 if build_section != host_section:
103 config.add_section(build_section) 103 config.add_section(build_section)
104 104
@@ -108,7 +108,7 @@ python do_configure() {
108 config.set(build_section, "cc", e(d.expand("${RUST_BUILD_CC}"))) 108 config.set(build_section, "cc", e(d.expand("${RUST_BUILD_CC}")))
109 config.set(build_section, "linker", e(d.expand("${RUST_BUILD_CCLD}"))) 109 config.set(build_section, "linker", e(d.expand("${RUST_BUILD_CCLD}")))
110 110
111 target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True)) 111 target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS'))
112 if target_section != host_section and target_section != build_section: 112 if target_section != host_section and target_section != build_section:
113 config.add_section(target_section) 113 config.add_section(target_section)
114 114
@@ -154,26 +154,26 @@ python do_configure() {
154 config.set("build", "vendor", e(True)) 154 config.set("build", "vendor", e(True))
155 155
156 if not "targets" in locals(): 156 if not "targets" in locals():
157 targets = [d.getVar("RUST_TARGET_SYS", True)] 157 targets = [d.getVar("RUST_TARGET_SYS")]
158 config.set("build", "target", e(targets)) 158 config.set("build", "target", e(targets))
159 159
160 if not "hosts" in locals(): 160 if not "hosts" in locals():
161 hosts = [d.getVar("RUST_HOST_SYS", True)] 161 hosts = [d.getVar("RUST_HOST_SYS")]
162 config.set("build", "host", e(hosts)) 162 config.set("build", "host", e(hosts))
163 163
164 # We can't use BUILD_SYS since that is something the rust snapshot knows 164 # We can't use BUILD_SYS since that is something the rust snapshot knows
165 # nothing about when trying to build some stage0 tools (like fabricate) 165 # nothing about when trying to build some stage0 tools (like fabricate)
166 config.set("build", "build", e(d.getVar("RUST_BUILD_SYS", True))) 166 config.set("build", "build", e(d.getVar("RUST_BUILD_SYS")))
167 167
168 # [install] 168 # [install]
169 config.add_section("install") 169 config.add_section("install")
170 # ./x.py install doesn't have any notion of "destdir" 170 # ./x.py install doesn't have any notion of "destdir"
171 # but we can prepend ${D} to all the directories instead 171 # but we can prepend ${D} to all the directories instead
172 config.set("install", "prefix", e(d.getVar("D", True) + d.getVar("prefix", True))) 172 config.set("install", "prefix", e(d.getVar("D") + d.getVar("prefix")))
173 config.set("install", "bindir", e(d.getVar("D", True) + d.getVar("bindir", True))) 173 config.set("install", "bindir", e(d.getVar("D") + d.getVar("bindir")))
174 config.set("install", "libdir", e(d.getVar("D", True) + d.getVar("libdir", True))) 174 config.set("install", "libdir", e(d.getVar("D") + d.getVar("libdir")))
175 config.set("install", "datadir", e(d.getVar("D", True) + d.getVar("datadir", True))) 175 config.set("install", "datadir", e(d.getVar("D") + d.getVar("datadir")))
176 config.set("install", "mandir", e(d.getVar("D", True) + d.getVar("mandir", True))) 176 config.set("install", "mandir", e(d.getVar("D") + d.getVar("mandir")))
177 177
178 with open("config.toml", "w") as f: 178 with open("config.toml", "w") as f:
179 f.write('changelog-seen = 2\n\n') 179 f.write('changelog-seen = 2\n\n')