]> code.ossystems Code Review - openembedded-core.git/commitdiff
cve-check: add lockfile to task
authorKonrad Weihmann <kweihmann@outlook.com>
Fri, 7 Jan 2022 09:48:51 +0000 (10:48 +0100)
committerAnuj Mittal <anuj.mittal@intel.com>
Fri, 14 Jan 2022 07:59:07 +0000 (15:59 +0800)
this should prevent running into the very rare error
sqlite3.OperationalError: attempt to write a readonly database

As highlighted by https://www.sqlite.org/faq.html#q5
it is likely that the adapter won't allow use multiple exec calls
at the same time.

So it's best to prevent multiple accesses at a time, by reusing
the already in place CVE_CHECK_DB_FILE_LOCK

YOCTO #14110

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 677f5741bd265be49d4a5bb933b3e8d8c4eec653)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
meta/classes/cve-check.bbclass

index 70d1988a7052d028e73de2498b55188c3e287e4d..6c04ff9f090197e85e3b0b37dd9b15fea92c382f 100644 (file)
@@ -111,6 +111,7 @@ python do_cve_check () {
 }
 
 addtask cve_check before do_build after do_fetch
+do_cve_check[lockfiles] += "${CVE_CHECK_DB_FILE_LOCK}"
 do_cve_check[depends] = "cve-update-db-native:do_fetch"
 do_cve_check[nostamp] = "1"