Gentoo Archives: gentoo-dev

From: "M. J. Everitt" <m.j.everitt@×××.org>
To: gentoo-dev@l.g.o, Joke Junkie <jjunkie@××××.li>
Subject: Re: [gentoo-dev] [PATCH] waf-utils.eclass: WAF_VERBOSE always effectively on
Date: Wed, 15 Aug 2018 22:55:37
Message-Id: 703dbd0a-8b15-7177-1346-031a4f045b7e@iee.org
In Reply to: [gentoo-dev] [PATCH] waf-utils.eclass: WAF_VERBOSE always effectively on by Joke Junkie
1 On 14/08/18 08:03, Joke Junkie wrote:
2 > Fix broken behavior not allowing to change the default verbosity.
3 > This should be of importance to everybody building on SMP systems, since
4 > giving the --verbose option to waf breaks a multi-job build (by making
5 > it one-job), at least for me. This is probably a waf issue, but the
6 > inability to change WAF_VERBOSE is clearly a bug in the eclass.
7 > The test affected by change is always true because WAF_VERBOSE is always
8 > set to "ON" or other non-null value. The change fixes that.
9 > ---
10 > eclass/waf-utils.eclass | 2 +-
11 > 1 file changed, 1 insertion(+), 1 deletion(-)
12 >
13 > diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass
14 > index 7acc97b10314..8b011c04b400 100644
15 > --- a/eclass/waf-utils.eclass
16 > +++ b/eclass/waf-utils.eclass
17 > @@ -98,7 +98,7 @@ waf-utils_src_configure() {
18 > waf-utils_src_compile() {
19 > debug-print-function ${FUNCNAME} "$@"
20 > local _mywafconfig
21 > - [[ "${WAF_VERBOSE}" ]] && _mywafconfig="--verbose"
22 > + [[ "${WAF_VERBOSE}" = "ON" ]] && _mywafconfig="--verbose"
23 >
24 > local jobs="--jobs=$(makeopts_jobs)"
25 > echo "\"${WAF_BINARY}\" build ${_mywafconfig} ${jobs}"
26 >
27 There is always a trade-off here as to what a flag *means* .. does
28 simply specifying it mean that its 'set' or do you need one of the
29 following (set) to actually define it - [on,yes,y,ON,YES,Y,1].
30 Parsing such a set is slightly more tedious than simply accepting it's
31 existence, bearing in mind you need similar logic for the inverse
32 (OFF,off,NO,no,N,n,0].
33 I think the portage code-base is the one area I've seen this kinda of
34 option-handling (and overrides) done pretty well (potentially not
35 'perfect', i just said 'pretty well').
36
37 </bikeshed>

Attachments

File name MIME type
signature.asc application/pgp-signature