summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
diff options
context:
space:
mode:
authorYoann Congal <yoann.congal@smile.fr>2024-02-15 18:36:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-16 15:14:26 +0000
commite898f65b339a1310b7b57e1dfa3f6efc58ad2c60 (patch)
tree2b37678665af01e9efa3839a30b54a5320b4a4b8 /meta/classes-recipe
parent122401ce482fe8db9d83ccbe74e7beb9aa3f850a (diff)
downloadpoky-e898f65b339a1310b7b57e1dfa3f6efc58ad2c60.tar.gz
waf.bbclass: Print waf output on unparsable version
On AB runs of reproducible-meta-oe/Repro meta-oe/meta-oe, "waf --version" does not seem to contain the version but an error message with "RuntimeWarning: <something>" [0]. Since the actual output is not saved anywhere, it is quite hard to debug. This patch detects the problematic case and send it to the log where it will be seen and fixed. As a side-effect, this error will now only be a warning. Here is a partial backtrace for this (full back trace visible in [0]): NOTE: recipe mpv-0.35.1-r0: task do_configure: Started ERROR: mpv-0.35.1-r0 do_configure: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> *** 0002:waf_preconfigure(d) File: '$TOP/meta/classes-recipe/waf.bbclass', lineno: 58, function: waf_preconfigure 0056: result = subprocess.check_output([python, wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT) 0057: version = result.decode('utf-8').split()[1] *** 0058: if bb.utils.vercmp_string_op(version, "1.8.7", ">="): [...] File: '$TOP/bitbake/lib/bb/utils.py', lineno: 91, function: split_version *** 0091: e = int(s.split(":")[0]) Exception: ValueError: invalid literal for int() with base 10: 'RuntimeWarning' [0]: https://autobuilder.yoctoproject.org/typhoon/#/builders/155/builds/11/steps/32/logs/stdio line 31883 (From OE-Core rev: 4a82c7ca74075b4c22be94891eecc24238bd0e65) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r--meta/classes-recipe/waf.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes-recipe/waf.bbclass b/meta/classes-recipe/waf.bbclass
index 5fa0cc4987..70bf3be8fd 100644
--- a/meta/classes-recipe/waf.bbclass
+++ b/meta/classes-recipe/waf.bbclass
@@ -55,7 +55,10 @@ python waf_preconfigure() {
55 try: 55 try:
56 result = subprocess.check_output([python, wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT) 56 result = subprocess.check_output([python, wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT)
57 version = result.decode('utf-8').split()[1] 57 version = result.decode('utf-8').split()[1]
58 if bb.utils.vercmp_string_op(version, "1.8.7", ">="): 58 if not bb.utils.is_semver(version):
59 bb.warn("Unable to parse \"waf --version\" output. Assuming waf version without bindir/libdir support.")
60 bb.warn("waf·--version·output = \n%s" % result.decode('utf-8'))
61 elif bb.utils.vercmp_string_op(version, "1.8.7", ">="):
59 d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}") 62 d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}")
60 except subprocess.CalledProcessError as e: 63 except subprocess.CalledProcessError as e:
61 bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % e.returncode) 64 bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % e.returncode)