diff options
Diffstat (limited to 'meta/lib/oe/cve_check.py')
-rw-r--r-- | meta/lib/oe/cve_check.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/lib/oe/cve_check.py b/meta/lib/oe/cve_check.py index 0302beeb4a..e445b7a6ae 100644 --- a/meta/lib/oe/cve_check.py +++ b/meta/lib/oe/cve_check.py | |||
@@ -146,3 +146,19 @@ def get_cpe_ids(cve_product, version): | |||
146 | cpe_ids.append(cpe_id) | 146 | cpe_ids.append(cpe_id) |
147 | 147 | ||
148 | return cpe_ids | 148 | return cpe_ids |
149 | |||
150 | def cve_check_merge_jsons(output, data): | ||
151 | """ | ||
152 | Merge the data in the "package" property to the main data file | ||
153 | output | ||
154 | """ | ||
155 | if output["version"] != data["version"]: | ||
156 | bb.error("Version mismatch when merging JSON outputs") | ||
157 | return | ||
158 | |||
159 | for product in output["package"]: | ||
160 | if product["name"] == data["package"][0]["name"]: | ||
161 | bb.error("Error adding the same package twice") | ||
162 | return | ||
163 | |||
164 | output["package"].append(data["package"][0]) | ||