pungi/0002-pkgset-Print-more-detailed-logs-when-rpm-is-not-foun.patch
Dennis Gilmore 16b5af4640 add patch to print more info for missing rpms
- add patch to clone repo with extra lorax templates for ostree_installer

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-04-11 12:27:19 -05:00

57 lines
2.3 KiB
Diff

From 31d922692f20e67a08e51b0cb8e6840e1db547a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Mon, 11 Apr 2016 15:34:26 +0200
Subject: [PATCH 2/2] [pkgset] Print more detailed logs when rpm is not found
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes: #265
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
pungi/phases/pkgset/pkgsets.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/pungi/phases/pkgset/pkgsets.py b/pungi/phases/pkgset/pkgsets.py
index 834fe31..adc2d07 100644
--- a/pungi/phases/pkgset/pkgsets.py
+++ b/pungi/phases/pkgset/pkgsets.py
@@ -225,12 +225,14 @@ class KojiPackageSet(PackageSetBase):
rpm_path = None
found = False
pathinfo = self.koji_wrapper.koji_module.pathinfo
+ paths = []
for sigkey in self.sigkey_ordering:
if sigkey is None:
# we're looking for *signed* copies here
continue
sigkey = sigkey.lower()
rpm_path = os.path.join(pathinfo.build(build_info), pathinfo.signed(rpm_info, sigkey))
+ paths.append(rpm_path)
if os.path.isfile(rpm_path):
found = True
break
@@ -239,14 +241,17 @@ class KojiPackageSet(PackageSetBase):
if None 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)
if os.path.isfile(rpm_path):
found = True
else:
# 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:
- raise RuntimeError("Package not found: %s" % rpm_info)
+ raise RuntimeError("Package not found: %s. Paths checked: %s"
+ % (rpm_info, paths))
return rpm_path
def populate(self, tag, event=None, inherit=True):
--
2.7.3