From d5e6639a6dd08658a46850266782e778d23f46e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 18 Jan 2017 09:30:46 +0100 Subject: [PATCH] Reduce duplication in code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- pungi/phases/gather/methods/method_deps.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pungi/phases/gather/methods/method_deps.py b/pungi/phases/gather/methods/method_deps.py index e1249daf..50f82357 100644 --- a/pungi/phases/gather/methods/method_deps.py +++ b/pungi/phases/gather/methods/method_deps.py @@ -120,9 +120,13 @@ def resolve_deps(compose, arch, variant): cache_dir = compose.paths.work.pungi_cache_dir(arch, variant) # TODO: remove YUM code, fully migrate to DNF if compose.conf.get("dnf_gather", False): - cmd = pungi_wrapper.get_pungi_cmd_dnf(pungi_conf, destdir=tmp_dir, name=variant.uid, selfhosting=selfhosting, fulltree=fulltree, arch=yum_arch, full_archlist=True, greedy=greedy_method, cache_dir=cache_dir, lookaside_repos=lookaside_repos, multilib_methods=multilib_methods) + get_cmd = pungi_wrapper.get_pungi_cmd_dnf else: - cmd = pungi_wrapper.get_pungi_cmd(pungi_conf, destdir=tmp_dir, name=variant.uid, selfhosting=selfhosting, fulltree=fulltree, arch=yum_arch, full_archlist=True, greedy=greedy_method, cache_dir=cache_dir, lookaside_repos=lookaside_repos, multilib_methods=multilib_methods) + get_cmd = pungi_wrapper.get_pungi_cmd + cmd = get_cmd(pungi_conf, destdir=tmp_dir, name=variant.uid, + selfhosting=selfhosting, fulltree=fulltree, arch=yum_arch, + full_archlist=True, greedy=greedy_method, cache_dir=cache_dir, + lookaside_repos=lookaside_repos, multilib_methods=multilib_methods) # Use temp working directory directory as workaround for # https://bugzilla.redhat.com/show_bug.cgi?id=795137 tmp_dir = compose.mkdtemp(prefix="pungi_")