cve-update-db: do_populate_cve_db depends on do_fetch
PATCH v2 1/1 cve-update-db: do_populate_cve_db depends on do_fetch
From: Pierre Le Magourou <[email protected]>
To be able to populate NVD database on a fetchall
(bitbake <image> --run-all=fetch), set the do_populate_cve_db task to be executed before do_fetch.
--- meta/recipes-core/meta/cve-update-db.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
meta/recipes-core/meta/cve-update-db.bb +5 -2
@@ -4,9 +4,12 @@ LICENSE = "MIT" INHIBIT_DEFAULT_DEPS = "1" PACKAGES = "" +CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK" +CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvd-json.db" +CVE_CHECK_TMP_FILE ?= "${TMPDIR}/cve_check" + inherit nopackages -deltask do_fetch deltask do_unpack deltask do_patch deltask do_configure
@@ -115,7 +118,7 @@ def update_db(c, json_filename): -addtask do_populate_cve_db before do_cve_check +addtask do_populate_cve_db before do_fetch do_populate_cve_db[nostamp] = "1" EXCLUDE_FROM_WORLD = "1"
Signature · 1 line
2.11.0
Quoted 7 lines · Pierre Le Magourou
From: Pierre Le Magourou <[email protected]>
To be able to populate NVD database on a fetchall
(bitbake <image> --run-all=fetch), set thedo_populate_cve_dbtask to be
executed beforedo_fetch.
Quoted 6 lines
Signed-off-by: Pierre Le Magourou <
[email protected]>--- meta/recipes-core/meta/cve-update-db.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Thanks for the fast turnaround on the patch. This seems to move the problem to:
https://autobuilder.yoctoproject.org/typhoon/#/builders/23/builds/990/steps/7/logs/step1b
:(
Perhaps we need to skip the recipe if the class isn't enabled? Is that the reason its failing like this?
Cheers,
Richard
Quoted 9 lines
Thanks for the fast turnaround on the patch. This seems to move the problem to:
https://autobuilder.yoctoproject.org/typhoon/#/builders/23/builds/990/steps/7/logs/step1b
:(
Perhaps we need to skip the recipe if the class isn't enabled? Is that the reason its failing like this?
It is failing with 'sqlite3.OperationalError' exception when opening the sqlite3 db file.
I reproduced the bug by removing the ${DL_DIR}/CVE_CHECK directory
I forgot to check that the ${DL_DIR}/CVE_CHECK directory exists before creating sqlite db file in it.
I'll send a v3 patch to fix this.
Pierre