summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/meta/cve-update-db-native.bb6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb
index 594bf947c8..a49f446a53 100644
--- a/meta/recipes-core/meta/cve-update-db-native.bb
+++ b/meta/recipes-core/meta/cve-update-db-native.bb
@@ -14,6 +14,7 @@ deltask do_populate_sysroot
14 14
15# CVE database update interval, in seconds. By default: once a day (24*60*60). 15# CVE database update interval, in seconds. By default: once a day (24*60*60).
16# Use 0 to force the update 16# Use 0 to force the update
17# Use a negative value to skip the update
17CVE_DB_UPDATE_INTERVAL ?= "86400" 18CVE_DB_UPDATE_INTERVAL ?= "86400"
18 19
19python () { 20python () {
@@ -51,8 +52,9 @@ python do_fetch() {
51 try: 52 try:
52 import time 53 import time
53 update_interval = int(d.getVar("CVE_DB_UPDATE_INTERVAL")) 54 update_interval = int(d.getVar("CVE_DB_UPDATE_INTERVAL"))
54 if (update_interval < 0): 55 if update_interval < 0:
55 update_interval = 0 56 bb.note("CVE database update skipped")
57 return
56 if time.time() - os.path.getmtime(db_file) < update_interval: 58 if time.time() - os.path.getmtime(db_file) < update_interval:
57 return 59 return
58 60