cve-update-db-native: fix DB file version for '-'

fix logic for CVE DB update so that when the CPE version is '-',
it keeps the version as '-' in the DB file too and leave other
operation as blank.

(From OE-Core rev: 0ec35b00d65c70485eb1efe602d9fca53e926811)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Lee Chee Yang
2020-04-02 19:48:55 +08:00
committed by Richard Purdie
parent 4c9cfe61a5
commit cae5e155a8

View File

@@ -138,6 +138,9 @@ def parse_node_and_insert(c, node, cveId):
if version != '*' and version != '-':
# Version is defined, this is a '=' match
yield [cveId, vendor, product, version, '=', '', '']
elif version == '-':
# no version information is available
yield [cveId, vendor, product, version, '', '', '']
else:
# Parse start version, end version and operators
op_start = ''