From 0319170f50c043e86a79d151b23008f6d639b06d Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sat, 12 Feb 2022 19:41:55 +0100 Subject: [PATCH] support/pkg-stats: fix regression after cleanup in show-info Commit 471ecea5eeb0 (core/show-info: 'name' only applies to packages) removed the 'name' field for rootfs (really, for non-package) entries, thus breaking the pkg-stats processing. We fix that by excluding any entry that has no 'name', on the assumption that if it has no name, it is not a package. Reported-by: Xogium on IRC Signed-off-by: Yann E. MORIN Cc: Thomas Petazzoni Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- support/scripts/pkg-stats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index abd36a3dd5..c235d99407 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -371,7 +371,7 @@ def get_pkglist(npackages, package_list): def get_config_packages(): cmd = ["make", "--no-print-directory", "show-info"] js = json.loads(subprocess.check_output(cmd)) - return set([v["name"] for v in js.values()]) + return set([v["name"] for v in js.values() if 'name' in v]) def package_init_make_info():