[pkgset] Print more detailed logs when rpm is not found
Fixes: #265 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
a696eb4f3a
commit
31d922692f
@ -225,12 +225,14 @@ class KojiPackageSet(PackageSetBase):
|
|||||||
rpm_path = None
|
rpm_path = None
|
||||||
found = False
|
found = False
|
||||||
pathinfo = self.koji_wrapper.koji_module.pathinfo
|
pathinfo = self.koji_wrapper.koji_module.pathinfo
|
||||||
|
paths = []
|
||||||
for sigkey in self.sigkey_ordering:
|
for sigkey in self.sigkey_ordering:
|
||||||
if sigkey is None:
|
if sigkey is None:
|
||||||
# we're looking for *signed* copies here
|
# we're looking for *signed* copies here
|
||||||
continue
|
continue
|
||||||
sigkey = sigkey.lower()
|
sigkey = sigkey.lower()
|
||||||
rpm_path = os.path.join(pathinfo.build(build_info), pathinfo.signed(rpm_info, sigkey))
|
rpm_path = os.path.join(pathinfo.build(build_info), pathinfo.signed(rpm_info, sigkey))
|
||||||
|
paths.append(rpm_path)
|
||||||
if os.path.isfile(rpm_path):
|
if os.path.isfile(rpm_path):
|
||||||
found = True
|
found = True
|
||||||
break
|
break
|
||||||
@ -239,14 +241,17 @@ class KojiPackageSet(PackageSetBase):
|
|||||||
if None in self.sigkey_ordering:
|
if None in self.sigkey_ordering:
|
||||||
# use an unsigned copy (if allowed)
|
# use an unsigned copy (if allowed)
|
||||||
rpm_path = os.path.join(pathinfo.build(build_info), pathinfo.rpm(rpm_info))
|
rpm_path = os.path.join(pathinfo.build(build_info), pathinfo.rpm(rpm_info))
|
||||||
|
paths.append(rpm_path)
|
||||||
if os.path.isfile(rpm_path):
|
if os.path.isfile(rpm_path):
|
||||||
found = True
|
found = True
|
||||||
else:
|
else:
|
||||||
# or raise an exception
|
# or raise an exception
|
||||||
raise RuntimeError("RPM %s not found for sigs: %s" % (rpm_info, self.sigkey_ordering))
|
raise RuntimeError("RPM %s not found for sigs: %s. Paths checked: %s"
|
||||||
|
% (rpm_info, self.sigkey_ordering, paths))
|
||||||
|
|
||||||
if not found:
|
if not found:
|
||||||
raise RuntimeError("Package not found: %s" % rpm_info)
|
raise RuntimeError("Package not found: %s. Paths checked: %s"
|
||||||
|
% (rpm_info, paths))
|
||||||
return rpm_path
|
return rpm_path
|
||||||
|
|
||||||
def populate(self, tag, event=None, inherit=True):
|
def populate(self, tag, event=None, inherit=True):
|
||||||
|
Loading…
Reference in New Issue
Block a user