gather: Log tag from which we pulled a package

For each tag we ask Koji about (there might be more than one in
modularity case), we create a log file with list of RPMs and details
about which tag they were pulled from. This makes it easier to find out
where the package is inherited from.

Fixes: #547
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-06-14 14:04:54 +02:00
parent d586368515
commit b2554ce663
4 changed files with 38 additions and 4 deletions

View file

@ -167,7 +167,7 @@ class TestKojiPkgset(PkgsetCompareMixin, helpers.PungiTestCase):
pkgset = pkgsets.KojiPackageSet(self.koji_wrapper, [None])
result = pkgset.populate('f25')
result = pkgset.populate('f25', logfile=self.topdir + '/pkgset.log')
self.assertEqual(
self.koji_wrapper.koji_proxy.mock_calls,
@ -182,6 +182,18 @@ class TestKojiPkgset(PkgsetCompareMixin, helpers.PungiTestCase):
'x86_64': ['rpms/bash@4.3.42@4.fc24@x86_64',
'rpms/bash-debuginfo@4.3.42@4.fc24@x86_64']})
self.maxDiff = None
with open(self.topdir + '/pkgset.log') as f:
self.assertEqual(
sorted(f.read().strip().splitlines()),
sorted(['pungi-0:4.1.3-3.fc25.noarch: f25 [335]',
'pungi-0:4.1.3-3.fc25.src: f25 [335]',
'bash-0:4.3.42-4.fc24.i686: f25 [335]',
'bash-0:4.3.42-4.fc24.x86_64: f25 [335]',
'bash-0:4.3.42-4.fc24.src: f25 [335]',
'bash-debuginfo-0:4.3.42-4.fc24.i686: f25 [335]',
'bash-debuginfo-0:4.3.42-4.fc24.x86_64: f25 [335]']))
def test_only_one_arch(self):
self._touch_files([
'rpms/bash@4.3.42@4.fc24@x86_64',