kumquat-buildroot/support
Thomas Petazzoni ee4e2f1611 support/scripts/pkg-stats: import cve module only when needed
The cve module needs ijson, which may not be installed. Since cve
matching is only enabled when --nvd-path is passed, it is a bit silly
to error out about ijson being missing if it's not used.

So instead of unconditionally importing the cve module, only do it
conditionally.

However, instead of doing it right at the point where it is used, we
do it at the beginning of the main() function. Indeed, if the cve
module is needed but cannot be imported, we want to error out
immediately rather than doing a whole bunch of things, and failing on
the user later on in the middle of the pkg-stats execution.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 824032d168)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-01-19 15:23:47 +01:00
..
config-fragments support/config-fragments/autobuild/bootlin-x86-64-glibc: use toolchain-external-bootlin 2021-01-19 15:09:32 +01:00
dependencies support/dependencies: clarify intended use of host bison/flex 2020-11-22 15:24:12 +01:00
docker support/docker: drop Python 2.x modules 2020-08-14 23:08:34 +02:00
download suport/download: fix git wrapper with submodules on older git versions 2020-06-17 22:58:22 +02:00
gnuconfig support/gnuconfig: fix previous version bump 2020-09-27 18:30:05 +02:00
kconfig
legal-info core/legal-info: update list of saved material in README 2020-01-18 18:38:42 +01:00
libtool
misc Update for 2020.11.1 2020-12-27 15:23:34 +01:00
scripts support/scripts/pkg-stats: import cve module only when needed 2021-01-19 15:23:47 +01:00
testing support/testing/tests/init/test_systemd: update to BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE 2020-11-11 11:49:59 +01:00