diff options
| -rw-r--r-- | meta/classes/cve-check.bbclass | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index 01b3637469..74124364b2 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass | |||
| @@ -52,7 +52,10 @@ python do_cve_check () { | |||
| 52 | """ | 52 | """ |
| 53 | 53 | ||
| 54 | if os.path.exists(d.getVar("CVE_CHECK_DB_FILE")): | 54 | if os.path.exists(d.getVar("CVE_CHECK_DB_FILE")): |
| 55 | patched_cves = get_patches_cves(d) | 55 | try: |
| 56 | patched_cves = get_patches_cves(d) | ||
| 57 | except FileNotFoundError: | ||
| 58 | bb.fatal("Failure in searching patches") | ||
| 56 | patched, unpatched = check_cves(d, patched_cves) | 59 | patched, unpatched = check_cves(d, patched_cves) |
| 57 | if patched or unpatched: | 60 | if patched or unpatched: |
| 58 | cve_data = get_cve_info(d, patched + unpatched) | 61 | cve_data = get_cve_info(d, patched + unpatched) |
| @@ -129,6 +132,10 @@ def get_patches_cves(d): | |||
| 129 | for url in src_patches(d): | 132 | for url in src_patches(d): |
| 130 | patch_file = bb.fetch.decodeurl(url)[2] | 133 | patch_file = bb.fetch.decodeurl(url)[2] |
| 131 | 134 | ||
| 135 | if not os.path.isfile(patch_file): | ||
| 136 | bb.error("File Not found: %s" % patch_file) | ||
| 137 | raise FileNotFoundError | ||
| 138 | |||
| 132 | # Check patch file name for CVE ID | 139 | # Check patch file name for CVE ID |
| 133 | fname_match = cve_file_name_match.search(patch_file) | 140 | fname_match = cve_file_name_match.search(patch_file) |
| 134 | if fname_match: | 141 | if fname_match: |
