From 814103d87fd35172e2cb22eeb9a3b7fc26d87eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 4 Oct 2018 13:28:21 +0200 Subject: [PATCH] Try to be more conservative about memory usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- pungi/phases/gather/__init__.py | 3 +++ pungi/phases/gather/methods/method_deps.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pungi/phases/gather/__init__.py b/pungi/phases/gather/__init__.py index 7ed1619f..be7ebf74 100644 --- a/pungi/phases/gather/__init__.py +++ b/pungi/phases/gather/__init__.py @@ -448,6 +448,9 @@ def _gather_variants(result, compose, variant_type, package_sets, exclude_fulltr pkg_map = gather_packages(compose, arch, variant, package_sets, fulltree_excludes=fulltree_excludes) result.setdefault(arch, {})[variant.uid] = pkg_map + # Remove the module -> pkgset mapping to save memory + variant.nsvc_to_pkgset = None + def _trim_variants(result, compose, variant_type, remove_pkgs=None, move_to_parent=True): """Trim all varians of given type. diff --git a/pungi/phases/gather/methods/method_deps.py b/pungi/phases/gather/methods/method_deps.py index 44fb60b2..3c7b54fb 100644 --- a/pungi/phases/gather/methods/method_deps.py +++ b/pungi/phases/gather/methods/method_deps.py @@ -145,6 +145,9 @@ def write_pungi_config(compose, arch, variant, packages, groups, filter_packages package_whitelist.add( '{0.name}-{1}:{0.version}-{0.release}'.format(rpm_obj, rpm_obj.epoch or 0)) + # Drop the packageset to hopefully save some memory + variant.pkgset = None + pungi_wrapper.write_kickstart( ks_path=pungi_cfg, repos=repos, groups=groups, packages=packages_str, exclude_packages=filter_packages_str,