pkgset: Allow unsigned packages by empty key
Currently `None` has to be included to allow using unsigned packages. ODCS has trouble with including non-string value in the list though, so we can treat empty string the same way (it's not a valid key ID anyway). Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
b79ff7d8dd
commit
68fdef451c
@ -435,7 +435,8 @@ Options
|
||||
-------
|
||||
|
||||
**sigkeys**
|
||||
([*str* or None]) -- priority list of sigkeys, *None* means unsigned
|
||||
([*str* or None]) -- priority list of sigkeys; if the list includes an
|
||||
empty string or *None*, unsigned packages will be allowed
|
||||
|
||||
**pkgset_source** [mandatory]
|
||||
(*str*) -- "koji" (any koji instance) or "repos" (arbitrary yum repositories)
|
||||
|
@ -238,7 +238,7 @@ class KojiPackageSet(PackageSetBase):
|
||||
pathinfo = self.koji_wrapper.koji_module.pathinfo
|
||||
paths = []
|
||||
for sigkey in self.sigkey_ordering:
|
||||
if sigkey is None:
|
||||
if not sigkey:
|
||||
# we're looking for *signed* copies here
|
||||
continue
|
||||
sigkey = sigkey.lower()
|
||||
@ -247,7 +247,7 @@ class KojiPackageSet(PackageSetBase):
|
||||
if os.path.isfile(rpm_path):
|
||||
return rpm_path
|
||||
|
||||
if None in self.sigkey_ordering:
|
||||
if None in self.sigkey_ordering or '' in self.sigkey_ordering:
|
||||
# use an unsigned copy (if allowed)
|
||||
rpm_path = os.path.join(pathinfo.build(build_info), pathinfo.rpm(rpm_info))
|
||||
paths.append(rpm_path)
|
||||
|
Loading…
Reference in New Issue
Block a user