[Buildroot] [PATCH 7/8] package/asterisk: add comment about a check-package false positive

Ricardo Martincoski ricardo.martincoski at datacom.ind.br
Thu Nov 30 11:19:41 UTC 2017


Hello,

On Thursday, November 30, 2017 6:00:57 AM, Thomas Petazzoni wrote:
> On Thu, 30 Nov 2017 00:08:44 +0100, Yann E. MORIN wrote:
[snip]
>> +++ b/package/asterisk/asterisk.mk
>> @@ -285,6 +285,7 @@ HOST_ASTERISK_LICENSE_FILES = COPYING
>>  
>>  # No need to autoreconf for the host variant,
>>  # so do not inherit the target setup.
>> +# check-package reports an issue here, but that's a false positive. Ignore.
>>  HOST_ASTERISK_AUTORECONF = NO
> 
> I'm not sure we should have a comment here. Instead we should fix
> check-package: it is not normal for check-package to emit a warning
> here, since it is legal (currently) for a package to autoreconf its
> target variant, and not autoreconf its host variant.

I agree, it's better to not issue a false warning.

> 
> Ricardo, do you think you could fix this problem in check-package ?

We can use something like this (not fully tested yet!):

+++ utils/checkpackagelib/lib_mk.py
@@ -219 +219 @@ class UselessFlag(_CheckFunction):
-        if self.DEFAULT_AUTOTOOLS_FLAG.search(text):
+        if self.DEFAULT_AUTOTOOLS_FLAG.search(text) and not text.lstrip().startswith("HOST_"):

Avoiding false warnings is more important than testing for all corner
cases IMO. Using the code above we don't issue a valid warning for
rare cases, we stop issuing a false warning and we also keep O(n).

I will send it separately (after proper commit message and testing)
if Yann doesn't include something similar (feel free to do so!) to
the series before.

Regards,
--
Ricardo Martincoski
DATACOM 
Ethernet Switches 
Rua América, 1000 - Eldorado do Sul, RS - 92990-000 - Brasil
+55 51 3933 3000 - Ramal 3307
ricardo.martincoski at datacom.ind.br
www.datacom.ind.br



More information about the buildroot mailing list