Message ID | 20220402141531.1320584-1-thomas.petazzoni@bootlin.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/4] support/script/pkg-stats: allow disabling CPE matching | expand |
Thomas, All, On 2022-04-02 16:15 +0200, Thomas Petazzoni via buildroot spake thusly: > This is useful when debugging/developing the pkg-stats script. > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Patches 1-3 applied to master, thanks. I'll resume looking at the 4th patch later. Regards, Yann E. MORIN. > --- > support/scripts/pkg-stats | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats > index 8cc64a54d1..ef9482ed95 100755 > --- a/support/scripts/pkg-stats > +++ b/support/scripts/pkg-stats > @@ -1125,7 +1125,7 @@ def parse_args(): > parser.add_argument('--nvd-path', dest='nvd_path', > help='Path to the local NVD database', type=resolvepath) > parser.add_argument('--disable', type=list_str, > - help='Features to disable, comma-separated (cve, upstream, url)', > + help='Features to disable, comma-separated (cve, upstream, url, cpe)', > default=[]) > args = parser.parse_args() > if not args.html and not args.json: > @@ -1184,6 +1184,8 @@ def __main__(): > if "cve" not in args.disable and args.nvd_path: > print("Checking packages CVEs") > check_package_cves(args.nvd_path, packages) > + if "cpe" not in args.disable and args.nvd_path: > + print("Checking packages CPEs") > check_package_cpes(args.nvd_path, packages) > print("Calculate stats") > stats = calculate_stats(packages) > -- > 2.35.1 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes: > This is useful when debugging/developing the pkg-stats script. > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Committed to 2021.02.x and 2022.02.x, thanks.
diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index 8cc64a54d1..ef9482ed95 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -1125,7 +1125,7 @@ def parse_args(): parser.add_argument('--nvd-path', dest='nvd_path', help='Path to the local NVD database', type=resolvepath) parser.add_argument('--disable', type=list_str, - help='Features to disable, comma-separated (cve, upstream, url)', + help='Features to disable, comma-separated (cve, upstream, url, cpe)', default=[]) args = parser.parse_args() if not args.html and not args.json: @@ -1184,6 +1184,8 @@ def __main__(): if "cve" not in args.disable and args.nvd_path: print("Checking packages CVEs") check_package_cves(args.nvd_path, packages) + if "cpe" not in args.disable and args.nvd_path: + print("Checking packages CPEs") check_package_cpes(args.nvd_path, packages) print("Calculate stats") stats = calculate_stats(packages)
This is useful when debugging/developing the pkg-stats script. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> --- support/scripts/pkg-stats | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)