summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorChee Yang Lee <chee.yang.lee@intel.com>2020-03-09 12:57:03 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-16 16:44:54 +0000
commitc6f99b055ef6f47bedea0c1cf040e5fb69523eb9 (patch)
tree07a48b543f0b7d0e77aefc8cdb0215ec2d5f9d73 /meta/classes
parent8b1eccc311640190a590510e338f6631ecc59392 (diff)
downloadpoky-c6f99b055ef6f47bedea0c1cf040e5fb69523eb9.tar.gz
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) (From OE-Core rev: d8cfc309f9dd0dc8904ab18e5898770502ee2540) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 64a362bd2dd0b4f3165d5162adbc600826af66f8) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/cve-check.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 7f98da60f1..5d84b93d71 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -179,13 +179,13 @@ def check_cves(d, patched_cves):
179 products = d.getVar("CVE_PRODUCT").split() 179 products = d.getVar("CVE_PRODUCT").split()
180 # If this has been unset then we're not scanning for CVEs here (for example, image recipes) 180 # If this has been unset then we're not scanning for CVEs here (for example, image recipes)
181 if not products: 181 if not products:
182 return ([], []) 182 return ([], [], [])
183 pv = d.getVar("CVE_VERSION").split("+git")[0] 183 pv = d.getVar("CVE_VERSION").split("+git")[0]
184 184
185 # If the recipe has been whitlisted we return empty lists 185 # If the recipe has been whitlisted we return empty lists
186 if d.getVar("PN") in d.getVar("CVE_CHECK_PN_WHITELIST").split(): 186 if d.getVar("PN") in d.getVar("CVE_CHECK_PN_WHITELIST").split():
187 bb.note("Recipe has been whitelisted, skipping check") 187 bb.note("Recipe has been whitelisted, skipping check")
188 return ([], []) 188 return ([], [], [])
189 189
190 old_cve_whitelist = d.getVar("CVE_CHECK_CVE_WHITELIST") 190 old_cve_whitelist = d.getVar("CVE_CHECK_CVE_WHITELIST")
191 if old_cve_whitelist: 191 if old_cve_whitelist: