From c988867fd2c72fe5abeb63c4abe92f10eea6499d Mon Sep 17 00:00:00 2001 From: Cyril Bur Date: Wed, 24 Nov 2021 15:06:54 +0000 Subject: [PATCH] support/scripts/pkg-stats: Don't print directory in 'make' call 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 Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- 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()