Browse Source

support/scripts/pkg-stats: add list of status checks to the json output

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 759521dae60122771dd65e7ace9eb56d1eafc78e)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Heiko Thiery 5 years ago
parent
commit
7c87a94ef8
1 changed files with 6 additions and 0 deletions
  1. 6 0
      support/scripts/pkg-stats

+ 6 - 0
support/scripts/pkg-stats

@@ -88,6 +88,11 @@ class Package:
     all_license_files = list()
     all_versions = dict()
     all_ignored_cves = dict()
+    # This is the list of all possible checks. Add new checks to this list so
+    # a tool that post-processeds the json output knows the checks before
+    # iterating over the packages.
+    status_checks = ['cve', 'developers', 'hash', 'license',
+                     'license-files', 'patches', 'pkg-check', 'url', 'version']
 
     def __init__(self, name, path):
         self.name = name
@@ -972,6 +977,7 @@ def dump_json(packages, defconfigs, stats, date, commit, output):
     final = {'packages': pkgs,
              'stats': statistics,
              'defconfigs': defconfigs,
+             'package_status_checks': Package.status_checks,
              'commit': commit,
              'date': str(date)}