Skip to contentSkip to conversation

waf.bbclass: Warn if waf doesn't exist

PATCH Superseded Amanda Brindle 4 participants 6 messages Mar 20, 2018 – Mar 22, 2018 1 message not in the archive

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover waf.bbclass: Warn if waf doesn't exist

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: Warn 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 1/1 waf.bbclass: Warn if waf doesn't exist

Before, waf.bbclass would fail to catch FileNotFoundError. Now, it will catch this error and warn 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..5bd5913 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.warn("waf does not exist in %s" % subsrcdir)
 }
 
 do_configure[prefuncs] += "waf_preconfigure"
Signature · 1 line
2.7.4
#2 lore raw

see https://patchwork.openembedded.org/patch/147693/

and updated version (just rebased after other waf related changes were merged):
http://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/master-submitted&id=3f70b555e3f6033b807e03247605f3fdad868646

but it was rejected by Ross before, maybe now it won't be when it has Yocto bug number in commit message..

On Wed, Mar 21, 2018 at 12:07 AM, Amanda Brindle <[email protected]

Quoted 36 lines

wrote:

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

Fixes [YOCTO 12553]

---
 meta/classes/waf.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/waf.bbclass +2 -2
index f9a851d..5bd5913 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.warn("waf does not exist in %s" % subsrcdir)
 }
 
 do_configure[prefuncs] += "waf_preconfigure"
--

2.7.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

A message that is not in the archive (sent off-list or not yet received): CAJdd5GbDmBRej_emtnhHh8PmaRE3Tfs5qzgAva8jW9K-9xUXFg@mail.gmail.com

#4 lore raw

On Mar 20, 2018 18:33, "Martin Jansa" <[email protected]> wrote:

see https://patchwork.openembedded.org/patch/147693/

and updated version (just rebased after other waf related changes were merged):
http://git.openembedded.org/openembedded-core-contrib/
commit/?h=jansa/master-submitted&id=3f70b555e3f6033b807e03247605f3fdad868646

but it was rejected by Ross before, maybe now it won't be when it has Yocto bug number in commit message..

Ah started my reply before I saw yours. I thought this looked familiar. IIRC, the other patch was before we changed waf-samba.bbclass to no longer inherit from waf.bbclass.

I didn't remember exactly why the previous one was rejected.... But looking back I think Ross was right that inheriting waf.bbclass without actually having waf should be an error (at some point). I was (perhaps incorrectly) presuming that even if you got the FileNotFoundError, do_configure would still fail. Is that correct? If not I think something strange is going on.

On Wed, Mar 21, 2018 at 12:07 AM, Amanda Brindle <[email protected]

Quoted 30 lines

wrote:

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

Fixes [YOCTO 12553]

---
 meta/classes/waf.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/waf.bbclass +2 -2
index f9a851d..5bd5913 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.warn("waf does not exist in %s" % subsrcdir)
 }
 
 do_configure[prefuncs] += "waf_preconfigure"
--

2.7.4

Quoted 6 lines

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#5 lore raw
Quoted 5 lines · Joshua Watt

I didn't remember exactly why the previous one was rejected.... But looking back I think Ross was right that inheriting waf.bbclass without actually having waf should be an error (at some point). I was (perhaps incorrectly) presuming that even if you got the FileNotFoundError, do_configure would still fail. Is that correct? If not I think something strange is going on.

That's still my opinion: don't inherit waf if waf isn't being used.

Changing bb.warn to bb.fatal would make me happy...

Ross

#6 lore raw
In reply to Amanda Brindle

On Mar 20, 2018 18:08, "Amanda Brindle" <[email protected]> wrote:

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

Fixes [YOCTO 12553]

---
 meta/classes/waf.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/waf.bbclass +0 -1
index f9a851d..5bd5913 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.warn("waf does not exist in %s" % subsrcdir)
}

FWIW, this looks good to me

do_configure[prefuncs] += "waf_preconfigure"
--
2.7.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core