Try to be more conservative about memory usage

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2018-10-04 13:28:21 +02:00
parent 3fea217b9c
commit 814103d87f
2 changed files with 6 additions and 0 deletions

View File

@ -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.

View File

@ -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,