From 001347cd46337213de1ab445c7dc789f6ab55133 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Tue, 15 Feb 2022 14:31:42 +0000 Subject: Allow merge-cve-files to let RESERVED through Avoid merge-cve-files stumbling over FlagAnnotations like RESERVED and REJECTED. Also add code to tidy up the .xpck files that can be generated by the merge process. --- bin/merge-cve-files | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/merge-cve-files b/bin/merge-cve-files index 55f487e2d5..36dee7acd5 100755 --- a/bin/merge-cve-files +++ b/bin/merge-cve-files @@ -6,7 +6,7 @@ # Copyright © 2020 Emilio Pozuelo Monfort # Copyright (c) 2021-2022 Neil Williams -import os.path +import os import sys import setup_paths # noqa @@ -129,6 +129,8 @@ for extra_bug in extra_data: notes = {} new_annotations = bug.annotations for extra_annotation in extra_bug.annotations: + if isinstance(extra_annotation, FlagAnnotation): + continue if isinstance(extra_annotation, StringAnnotation): cve = f"{extra_bug.header.name}" note_tag = notes.setdefault(cve, []) @@ -142,3 +144,8 @@ for extra_bug in extra_data: with open(main_list, 'w') as f: writecvelist(data, f) + +# check for and erase an .xpck file built from the merge +xpck = f"{extra_list}.xpck" +if os.path.exists(xpck): + os.unlink(xpck) -- cgit v1.2.3