From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 8/8] utils/check-package: warn about overridden variables
Date: Sun, 26 May 2019 11:20:49 +0200 [thread overview]
Message-ID: <20190526092049.GI12162@scaer> (raw)
In-Reply-To: <20190127185943.1136-9-ricardo.martincoski@gmail.com>
Ricardo, All,
On 2019-01-27 16:59 -0200, Ricardo Martincoski spake thusly:
> For the general case, appending values to variables is OK and also a
> good practice, like this:
> |PACKAGE_VAR = value1
> |ifeq ...
> |PACKAGE_VAR += value2
>
> or this, when the above is not possible:
> |PACKAGE_VAR = value1
> |ifeq ...
> |PACKAGE_VAR := $(PACKAGE_VAR), value2
>
> But this override is an error:
> |PACKAGE_VAR = value1
> |PACKAGE_VAR = value2
>
> as well this one:
> |ifeq ...
> |PACKAGE_VAR += value1
> |endif
> |PACKAGE_VAR = value2
>
> And this override is error-prone:
> |PACKAGE_VAR = value1
> |ifeq ...
> |PACKAGE_VAR = value2
>
> Create a check function to warn about overridden variables.
>
> Some variables are likely to have a default value that gets overridden
> in a conditional, so ignore them. The name of such variables end in
> _ARCH, _CPU, _SITE, _SOURCE or _VERSION.
Since I updated my host distribution to Ubuntu 19.04, flake8 now reports
tons of errors:
./utils/checkpackagelib/lib_mk.py:22:7: W605 invalid escape sequence '\s'
This is because Ubuntu has update pycodestyle to 2.4.0, which introduced
this new W605 check. It mandates that regexps be prefixed by an 'r'
(like a binary string be prefixed by a 'b'), like:
r"^\s*#"
However, when I fix all these 82 new errors, and run check-package, I
now get a warning about overriden license lists in the few packages
where we do override the license, like in dtc:
ifeq ($(BR2_PACKAGE_DTC_PROGRAMS),y)
DTC_LICENSE := $(DTC_LICENSE), GPL-2.0+ (programs)
[...]
endif
However, as far as I understand the code, there is an explicit condition
that allows concatenating to a variable (the CONCATENATING regexp), now
line 127.
Do you have an idea what's going on now?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2019-05-26 9:20 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-27 18:59 [Buildroot] [PATCH 0/8] Detect and fix overridden variables in .mk files Ricardo Martincoski
2019-01-27 18:59 ` [Buildroot] [PATCH 1/8] package/s6-networking: fix dependency when libressl is enabled Ricardo Martincoski
2019-01-27 19:52 ` Thomas Petazzoni
2019-01-28 2:26 ` Ricardo Martincoski
2019-01-27 21:15 ` Peter Korsgaard
2019-01-29 21:56 ` Peter Korsgaard
2019-01-27 18:59 ` [Buildroot] [PATCH 2/8] package/sdl_sound: actually use the optional CONF_OPTS Ricardo Martincoski
2019-01-27 21:16 ` Peter Korsgaard
2019-01-29 21:57 ` Peter Korsgaard
2019-01-27 18:59 ` [Buildroot] [PATCH 3/8] Revert "avrdude: add license information" Ricardo Martincoski
2019-01-27 21:17 ` Peter Korsgaard
2019-01-29 21:59 ` Peter Korsgaard
2019-01-27 18:59 ` [Buildroot] [PATCH 4/8] package/usb_modeswitch: drop unicode space in comment Ricardo Martincoski
2019-01-27 21:19 ` Peter Korsgaard
2019-01-29 22:00 ` Peter Korsgaard
2019-01-27 18:59 ` [Buildroot] [PATCH 5/8] package/usb_modeswitch: avoid overriding variables Ricardo Martincoski
2019-01-27 21:28 ` Peter Korsgaard
2019-01-29 22:01 ` Peter Korsgaard
2019-01-27 18:59 ` [Buildroot] [PATCH 6/8] utils/check-package: allow to disable warning for a line Ricardo Martincoski
2019-01-28 17:16 ` Arnout Vandecappelle
2019-01-29 15:38 ` Peter Korsgaard
2019-01-27 18:59 ` [Buildroot] [PATCH 7/8] utils/check-package: handle ifdef/ifndef in .mk files Ricardo Martincoski
2019-01-28 17:07 ` Arnout Vandecappelle
2019-01-29 15:39 ` Peter Korsgaard
2019-01-27 18:59 ` [Buildroot] [PATCH 8/8] utils/check-package: warn about overridden variables Ricardo Martincoski
2019-02-04 15:15 ` Titouan Christophe
2019-02-05 19:25 ` Peter Korsgaard
2019-05-26 9:20 ` Yann E. MORIN [this message]
2019-05-26 11:05 ` Arnout Vandecappelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190526092049.GI12162@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox