Commit dc9cfff fix pungi vs pungi_wrapper namespacing in method_deps.py

1 file Authored and Committed by Adam Miller 2 years ago
fix pungi vs pungi_wrapper namespacing in method_deps.py

    
 1 @@ -69,7 +69,7 @@
 2   
 3   def write_pungi_config(compose, arch, variant, packages, groups, filter_packages, multilib_whitelist, multilib_blacklist, repos=None, comps_repo=None, package_set=None, fulltree_excludes=None, prepopulate=None):
 4       """write pungi config (kickstart) for arch/variant"""
 5 -     pungi = PungiWrapper()
 6 +     pungi_wrapper = PungiWrapper()
 7       pungi_cfg = compose.paths.work.pungi_conf(variant=variant, arch=arch)
 8       msg = "Writing pungi config (arch: %s, variant: %s): %s" % (arch, variant, pungi_cfg)
 9   
10 @@ -101,17 +101,17 @@
11           else:
12               filter_packages_str.append(pkg_name)
13   
14 -     pungi.write_kickstart(ks_path=pungi_cfg, repos=repos, groups=groups, packages=packages_str, exclude_packages=filter_packages_str, comps_repo=comps_repo, lookaside_repos=lookaside_repos, fulltree_excludes=fulltree_excludes, multilib_whitelist=multilib_whitelist, multilib_blacklist=multilib_blacklist, prepopulate=prepopulate)
15 +     pungi_wrapper.write_kickstart(ks_path=pungi_cfg, repos=repos, groups=groups, packages=packages_str, exclude_packages=filter_packages_str, comps_repo=comps_repo, lookaside_repos=lookaside_repos, fulltree_excludes=fulltree_excludes, multilib_whitelist=multilib_whitelist, multilib_blacklist=multilib_blacklist, prepopulate=prepopulate)
16   
17   
18   def resolve_deps(compose, arch, variant):
19 -     pungi = PungiWrapper()
20 +     pungi_wrapper = PungiWrapper()
21       pungi_log = compose.paths.work.pungi_log(arch, variant)
22   
23       msg = "Running pungi (arch: %s, variant: %s)" % (arch, variant)
24       if compose.DEBUG and os.path.exists(pungi_log):
25           compose.log_warning("[SKIP ] %s" % msg)
26 -         return pungi.get_packages(open(pungi_log, "r").read())
27 +         return pungi_wrapper.get_packages(open(pungi_log, "r").read())
28   
29       compose.log_info("[BEGIN] %s" % msg)
30       pungi_conf = compose.paths.work.pungi_conf(arch, variant)
31 @@ -146,7 +146,7 @@
32       yum_arch = tree_arch_to_yum_arch(arch)
33       tmp_dir = compose.paths.work.tmp_dir(arch, variant)
34       cache_dir = compose.paths.work.pungi_cache_dir(arch, variant)
35 -     cmd = pungi.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)
36 +     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)
37       # Use temp working directory directory as workaround for
38       # https://bugzilla.redhat.com/show_bug.cgi?id=795137
39       tmp_dir = tempfile.mkdtemp(prefix="pungi_")
40 @@ -154,7 +154,7 @@
41           run(cmd, logfile=pungi_log, show_cmd=True, workdir=tmp_dir)
42       finally:
43           rmtree(tmp_dir)
44 -     result = pungi.get_packages(open(pungi_log, "r").read())
45 +     result = pungi_wrapper.get_packages(open(pungi_log, "r").read())
46   
47       compose.log_info("[DONE ] %s" % msg)
48       return result
49 @@ -165,9 +165,9 @@
50       if not check_deps:
51           return
52   
53 -     pungi = PungiWrapper()
54 +     pungi_wrapper = PungiWrapper()
55       pungi_log = compose.paths.work.pungi_log(arch, variant)
56 -     missing_deps = pungi.get_missing_deps(open(pungi_log, "r").read())
57 +     missing_deps = pungi_wrapper.get_missing_deps(open(pungi_log, "r").read())
58       if missing_deps:
59           for pkg in sorted(missing_deps):
60               compose.log_error("Unresolved dependencies in package %s: %s" % (pkg, sorted(missing_deps[pkg])))