Skip to contentSkip to conversation

cve-update-db: Skip recipe when cve-check class is not loaded.

PATCH Superseded Pierre Le Magourou 2 participants 3 messages Jul 8, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cve-update-db: Skip recipe when cve-check class is not loaded.

From: Pierre Le Magourou <[email protected]>

---
 meta/recipes-core/meta/cve-update-db.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta/recipes-core/meta/cve-update-db.bb +5 -0
index ae8f1a958b..cfeee91c2e 100644
@@ -13,6 +13,11 @@ deltask do_compile
 deltask do_install
 deltask do_populate_sysroot
 
+python () {
+    if not d.getVar("CVE_CHECK_DB_FILE"):
+        raise bb.parse.SkipRecipe("Skip recipe when cve-check class is not loaded.")
+}
+
 python do_populate_cve_db() {
     """
     Update NVD database with json data feed
Signature · 1 line
2.11.0
#1 lore raw

Great, the "bitbake universe --runall=fetch" works now.

// Robert

Quoted 24 lines · Pierre Le Magourou

From: Pierre Le Magourou <[email protected]>

---
  meta/recipes-core/meta/cve-update-db.bb | 5 +++++
  1 file changed, 5 insertions(+)
meta/recipes-core/meta/cve-update-db.bb +5 -0
index ae8f1a958b..cfeee91c2e 100644
@@ -13,6 +13,11 @@ deltask do_compile
  deltask do_install
  deltask do_populate_sysroot
 
+python () {
+    if not d.getVar("CVE_CHECK_DB_FILE"):
+        raise bb.parse.SkipRecipe("Skip recipe when cve-check class is not loaded.")
+}
+
  python do_populate_cve_db() {
      """
      Update NVD database with json data feed
#2 lore raw
Quoted 3 lines

Great, the "bitbake universe --runall=fetch" works now.

I just forgot to rebase this patch on the previous ones that are in master-next, I sent a rebased v2.

Pierre