Skip to contentSkip to conversation

waf.bbclass: Throw error if waf doesn't exist

PATCH New Amanda Brindle 1 participant 2 messages Mar 22, 2018

lore
Share & tools
lore
#0 lore raw

v2 cover waf.bbclass: Throw error if waf doesn't exist

In v2, change bb.warn to bb.fatal

The following changes since commit f49ee61422c867516db252054e993df29f775136:

systemd-boot: upgrade to 237 (2018-03-20 09:59:33 +0000)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib abrindle/waf_error
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=abrindle/waf_error

Amanda Brindle (1):
waf.bbclass: Throw error if waf doesn't exist

 meta/classes/waf.bbclass | 2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 waf.bbclass: Throw error if waf doesn't exist

Before, waf.bbclass would fail to catch FileNotFoundError. Now, it will catch this error and say that waf doesn't exist.

Fixes [YOCTO 12553]

---
 meta/classes/waf.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/waf.bbclass +2 -0
index f9a851d..19e9376 100644
@@ -15,6 +15,8 @@ python waf_preconfigure() {
             d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}")
     except subprocess.CalledProcessError as e:
         bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % e.returncode)
+    except FileNotFoundError:
+        bb.fatal("waf does not exist in %s" % subsrcdir)
 }
 
 do_configure[prefuncs] += "waf_preconfigure"
Signature · 1 line
2.7.4