[oe-commits] [openembedded-core] 05/11: cve-check: fix ValueError

git at git.openembedded.org git at git.openembedded.org
Wed Mar 11 01:13:58 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 64a362bd2dd0b4f3165d5162adbc600826af66f8
Author: Chee Yang Lee <chee.yang.lee at intel.com>
AuthorDate: Mon Mar 9 12:57:03 2020 +0800

    cve-check: fix ValueError
    
    fix below error for whitelisted recipe and recipe skip cve check.
    
    Error:
    The stack trace of python calls that resulted in this exception/failure was:
    File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
         0001:
     *** 0002:do_cve_check(d)
         0003:
    File: '/poky-master/meta/classes/cve-check.bbclass', lineno: 59, function: do_cve_check
         0055:        try:
         0056:            patched_cves = get_patches_cves(d)
         0057:        except FileNotFoundError:
         0058:            bb.fatal("Failure in searching patches")
     *** 0059:        whitelisted, patched, unpatched = check_cves(d, patched_cves)
         0060:        if patched or unpatched:
         0061:            cve_data = get_cve_info(d, patched + unpatched)
         0062:            cve_write_data(d, patched, unpatched, whitelisted, cve_data)
         0063:    else:
    Exception: ValueError: not enough values to unpack (expected 3, got 2)
    
    Signed-off-by: Chee Yang Lee <chee.yang.lee at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/cve-check.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 7f98da6..5d84b93 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -179,13 +179,13 @@ def check_cves(d, patched_cves):
     products = d.getVar("CVE_PRODUCT").split()
     # If this has been unset then we're not scanning for CVEs here (for example, image recipes)
     if not products:
-        return ([], [])
+        return ([], [], [])
     pv = d.getVar("CVE_VERSION").split("+git")[0]
 
     # If the recipe has been whitlisted we return empty lists
     if d.getVar("PN") in d.getVar("CVE_CHECK_PN_WHITELIST").split():
         bb.note("Recipe has been whitelisted, skipping check")
-        return ([], [])
+        return ([], [], [])
 
     old_cve_whitelist =  d.getVar("CVE_CHECK_CVE_WHITELIST")
     if old_cve_whitelist:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list