From b53e4a84d3eaf0d320ac030185b4c083e6202eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Mon, 16 Jan 2017 13:35:55 +0100 Subject: [PATCH] Fix fulltree when greedy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When greedy, fulltree should pull in all native and multilib packages. Signed-off-by: Lubomír Sedlář --- pungi/gather_dnf.py | 11 +++++++---- tests/test_gather.py | 8 -------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/pungi/gather_dnf.py b/pungi/gather_dnf.py index d7208391..7ddbaf4b 100644 --- a/pungi/gather_dnf.py +++ b/pungi/gather_dnf.py @@ -593,10 +593,13 @@ class Gather(GatherBase): # fallback / default pull_native = True - if pull_native: - fulltree_pkgs = native_fulltree_pkgs - else: - fulltree_pkgs = multilib_fulltree_pkgs + # We pull packages determined by `pull_native`, or everything + # if we're greedy + fulltree_pkgs = [] + if pull_native or self.opts.greedy_method == 'all': + fulltree_pkgs.extend(native_fulltree_pkgs) + if not pull_native or self.opts.greedy_method == 'all': + fulltree_pkgs.extend(multilib_fulltree_pkgs) # always pull all noarch subpackages fulltree_pkgs += noarch_fulltree_pkgs diff --git a/tests/test_gather.py b/tests/test_gather.py index f12023a3..634d6948 100644 --- a/tests/test_gather.py +++ b/tests/test_gather.py @@ -1688,18 +1688,10 @@ class DNFDepsolvingTestCase(DepsolvingBase, unittest.TestCase): dummy-bash-debuginfo.x86_64 as well. """ - @unittest.skip('Full does not pull in dummy-nscd.i686') - def test_bash_multilib_greedy(self): - pass - @unittest.skip('DNF code does not support NVR as input') def test_bash_older(self): pass - @unittest.skip('Misses dummy-nscd.i686') - def test_bash_multilib_filter_greedy(self): - pass - @unittest.skip('Not implemented yet') def test_smtpdaemon_greedy_all_explicit_sendmail(self): pass