[Buildroot] [PATCH] pkg-stats: Ignore make output without '=' character

Arnout Vandecappelle arnout at mind.be
Sat Dec 11 20:44:52 UTC 2021


  Hi Cyril,

  It no longer is "ignore make output ..." so I updated the subject line and 
committed to master, thanks.

  Regards,
  Arnout

On 24/11/2021 16:06, Cyril Bur wrote:
> It is possible that some users of buildroot have put it in a repository
> and call into it from another Makefile such as:
> .DEFAULT:
> 	$(MAKE) O=$(abspath $(O)) -C buildroot $(@)
> 
> This technique works well except that Make tells us that it changes into
> the buildroot directory:
> make[1]: Entering directory 'buildroot'
> 
> Because this line doesn't have an equals within it, python raises a
> ValueError exception within pkg-stats.
> 
> This patch has python tell the invoked make not to print directories
> 
> Signed-off-by: Cyril Bur <cyrilbur at gmail.com>
> ---
> Dropped the RFC after feedback from Arnout which I have taken onboard
> 
>   support/scripts/pkg-stats | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
> index 3992c8312a..a435abff3d 100755
> --- a/support/scripts/pkg-stats
> +++ b/support/scripts/pkg-stats
> @@ -375,7 +375,8 @@ def get_config_packages():
>   
>   def package_init_make_info():
>       # Fetch all variables at once
> -    variables = subprocess.check_output(["make", "BR2_HAVE_DOT_CONFIG=y", "-s", "printvars",
> +    variables = subprocess.check_output(["make", "--no-print-directory", "-s",
> +                                         "BR2_HAVE_DOT_CONFIG=y", "printvars",
>                                            "VARS=%_LICENSE %_LICENSE_FILES %_VERSION %_IGNORE_CVES %_CPE_ID"])
>       variable_list = variables.decode().splitlines()
>   
> 



More information about the buildroot mailing list