From adaed6345c54398ac10a76c92a37f71f2921a904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 3 Nov 2016 12:57:58 +0100 Subject: [PATCH] pungi: Fulltree should not apply for input multilib package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the input explicitly lists a package as multilib, we should not automatically add native version just because of fulltree. The tests for this use case are now enabled and passing. Signed-off-by: Lubomír Sedlář --- pungi/gather.py | 5 +++-- tests/test_pungi.py | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pungi/gather.py b/pungi/gather.py index 8d703cb1..eaf0864c 100644 --- a/pungi/gather.py +++ b/pungi/gather.py @@ -864,6 +864,7 @@ class Pungi(PungiBase): for name in searchlist: pattern = name multilib = False + orig_name = name if name.endswith(".+"): name = name[:-2] multilib = True @@ -898,7 +899,7 @@ class Pungi(PungiBase): # works for both "none" and "build" greedy methods packages = [self.ayum._bestPackageFromList(packages)] - if name in input_packages: + if orig_name in input_packages: self.input_packages.update(packages) if name in comps_package_names: self.comps_packages.update(packages) @@ -1104,7 +1105,7 @@ class Pungi(PungiBase): elif po.arch in self.valid_native_arches: has_native = True continue - if po.arch in self.valid_multilib_arches and self.greedy_method == "all": + if po.arch in self.valid_multilib_arches and (po in self.input_packages or self.greedy_method == "all"): include_multilib = True elif po.arch in self.valid_native_arches: include_native = True diff --git a/tests/test_pungi.py b/tests/test_pungi.py index 29fa6cbb..6ccf1aeb 100644 --- a/tests/test_pungi.py +++ b/tests/test_pungi.py @@ -664,7 +664,6 @@ class TestPungi(unittest.TestCase): "dummy-krb5-debuginfo-1.10-5.x86_64.rpm", ]) - @unittest.skip def test_bash_multilib(self): packages = [ "dummy-bash.+", @@ -698,7 +697,6 @@ class TestPungi(unittest.TestCase): "dummy-glibc-debuginfo-common-2.14-5.x86_64.rpm", ]) - @unittest.skip def test_bash_multilib_exclude(self): # test if excluding a package really works # NOTE: dummy-bash-doc would pull x86_64 bash in (we want noarch pulling 64bit deps in composes)