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

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Thu Nov 30 12:57:21 UTC 2017


Hello,

Thanks for looking into it so quickly!

On Thu, 30 Nov 2017 09:19:41 -0200 (BRST), Ricardo Martincoski wrote:

> 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).

Yeah, if you want to test this properly, it's more difficult. Just
AUTORECONF = NO is redundant. Just HOST_AUTORECONF = NO is redundant.
But the combination of AUTORECONF = YES + HOST_AUTORECONF = NO is valid.

So basically for all variables that have inheritance between target
and host, having the host variant of the variable set the variable
value back to its default is correct if the target variable is set.

So, your approach at least works, and will not generate false warnings.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



More information about the buildroot mailing list