Просмотр исходного кода

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 <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Yann E. MORIN 3 лет назад
Родитель
Сommit
0319170f50
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      support/scripts/pkg-stats

+ 1 - 1
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():