pkgset: Update Koji source to create multiple pkgsets

With this patch, there should be a separate package set for each tag
that is consumed.

Generally each module will create a separate package set, with the
exception of -devel modules that will be in the same set as their
non-devel version.

Variants no longer need to keep their own package set objects. Instead
they now include a set of package set names that should be used for the
variant. This can replace the whitelist mechanism of deps gather method.

JIRA: COMPOSE-3620
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2019-07-26 16:06:53 +02:00
parent eed2aa2753
commit a446593698
10 changed files with 92 additions and 181 deletions

View file

@ -169,7 +169,7 @@ class TestKojiPkgset(PkgsetCompareMixin, helpers.PungiTestCase):
pkgset = pkgsets.KojiPackageSet("pkgset", self.koji_wrapper, [None])
result = pkgset.populate('f25', logfile=self.topdir + '/pkgset.log')
result = pkgset.populate('f25')
self.assertEqual(
self.koji_wrapper.koji_proxy.mock_calls,
@ -184,18 +184,6 @@ 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',
@ -332,7 +320,7 @@ class TestKojiPkgset(PkgsetCompareMixin, helpers.PungiTestCase):
populate_only_packages=True,
)
result = pkgset.populate('f25', logfile=self.topdir + '/pkgset.log')
result = pkgset.populate('f25')
self.assertEqual(
self.koji_wrapper.koji_proxy.mock_calls,
@ -430,7 +418,7 @@ class TestKojiPkgset(PkgsetCompareMixin, helpers.PungiTestCase):
"pkgset", self.koji_wrapper, [None], extra_builds=["pungi-4.1.3-3.fc25"]
)
result = pkgset.populate('f25', logfile=self.topdir + '/pkgset.log')
result = pkgset.populate('f25')
self.assertEqual(
self.koji_wrapper.koji_proxy.mock_calls,