Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
class Package:
- all_licenses = list()
+ all_licenses = dict()
all_license_files = list()
all_versions = dict()
all_ignored_cves = dict()
self.name = name
self.path = path
self.infras = None
+ self.license = None
self.has_license = False
self.has_license_files = False
self.has_hash = False
var = self.pkgvar()
if var in self.all_licenses:
self.has_license = True
+ self.license = self.all_licenses[var]
if var in self.all_license_files:
self.has_license_files = True
if value == "unknown":
continue
pkgvar = pkgvar[:-8]
- Package.all_licenses.append(pkgvar)
+ Package.all_licenses[pkgvar] = value
elif pkgvar.endswith("_LICENSE_FILES"):
if pkgvar.endswith("_MANIFEST_LICENSE_FILES"):