pungi: Fulltree should not apply for input multilib package

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ář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-11-03 12:57:58 +01:00
parent 8e5b197e3f
commit adaed6345c
2 changed files with 3 additions and 4 deletions

View File

@ -864,6 +864,7 @@ class Pungi(PungiBase):
for name in searchlist: for name in searchlist:
pattern = name pattern = name
multilib = False multilib = False
orig_name = name
if name.endswith(".+"): if name.endswith(".+"):
name = name[:-2] name = name[:-2]
multilib = True multilib = True
@ -898,7 +899,7 @@ class Pungi(PungiBase):
# works for both "none" and "build" greedy methods # works for both "none" and "build" greedy methods
packages = [self.ayum._bestPackageFromList(packages)] packages = [self.ayum._bestPackageFromList(packages)]
if name in input_packages: if orig_name in input_packages:
self.input_packages.update(packages) self.input_packages.update(packages)
if name in comps_package_names: if name in comps_package_names:
self.comps_packages.update(packages) self.comps_packages.update(packages)
@ -1104,7 +1105,7 @@ class Pungi(PungiBase):
elif po.arch in self.valid_native_arches: elif po.arch in self.valid_native_arches:
has_native = True has_native = True
continue 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 include_multilib = True
elif po.arch in self.valid_native_arches: elif po.arch in self.valid_native_arches:
include_native = True include_native = True

View File

@ -664,7 +664,6 @@ class TestPungi(unittest.TestCase):
"dummy-krb5-debuginfo-1.10-5.x86_64.rpm", "dummy-krb5-debuginfo-1.10-5.x86_64.rpm",
]) ])
@unittest.skip
def test_bash_multilib(self): def test_bash_multilib(self):
packages = [ packages = [
"dummy-bash.+", "dummy-bash.+",
@ -698,7 +697,6 @@ class TestPungi(unittest.TestCase):
"dummy-glibc-debuginfo-common-2.14-5.x86_64.rpm", "dummy-glibc-debuginfo-common-2.14-5.x86_64.rpm",
]) ])
@unittest.skip
def test_bash_multilib_exclude(self): def test_bash_multilib_exclude(self):
# test if excluding a package really works # 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) # NOTE: dummy-bash-doc would pull x86_64 bash in (we want noarch pulling 64bit deps in composes)