From 04baa2a4db0a9ba267191d22cb03d1d18ce69467 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Jul 11 2019 12:25:42 +0000 Subject: Stop storing modulemd without arch Historically each variant had a list of modules. This is no longer needed and can be dropped. We can also stop logging the modulemd since we know it was retrieved from Koji and not modified locally. Signed-off-by: Lubomír Sedlář --- diff --git a/pungi/phases/pkgset/sources/source_koji.py b/pungi/phases/pkgset/sources/source_koji.py index 8e79837..f95ade0 100644 --- a/pungi/phases/pkgset/sources/source_koji.py +++ b/pungi/phases/pkgset/sources/source_koji.py @@ -249,7 +249,6 @@ def _add_module_to_variant(koji_wrapper, variant, build, add_to_variant_modules= source_mmd.set_name(build["extra"]["typeinfo"]["module"]["name"]) nsvc = source_mmd.dup_nsvc() - variant.mmds.append(source_mmd) for arch in variant.arches: try: variant.arch_mmds.setdefault(arch, {})[nsvc] = mmds["modulemd.%s.txt" % arch] @@ -564,9 +563,6 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event): "modules.") if modular_koji_tags or (compose.conf["pkgset_koji_module_tag"] and variant.modules): - included_modules_file = os.path.join( - compose.paths.work.topdir(arch="global"), - "koji-tag-module-%s.yaml" % variant.uid) _get_modules_from_koji_tags( compose, koji_wrapper, @@ -575,9 +571,6 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event): variant_tags, ) elif variant.modules: - included_modules_file = os.path.join( - compose.paths.work.topdir(arch="global"), - "koji-module-%s.yaml" % variant.uid) _get_modules_from_koji( compose, koji_wrapper, @@ -592,8 +585,6 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event): if variant_tag not in compose_tags: compose_tags.append(variant_tag) - if variant.mmds: - Modulemd.Module.dump_all(variant.mmds, included_modules_file) if not variant_tags[variant] and variant.modules is None: variant_tags[variant].extend(force_list(compose.conf["pkgset_koji_tag"])) diff --git a/pungi/wrappers/variants.py b/pungi/wrappers/variants.py index 5689d34..a7fa799 100755 --- a/pungi/wrappers/variants.py +++ b/pungi/wrappers/variants.py @@ -264,7 +264,6 @@ class Variant(object): self.is_empty = is_empty self.pkgset = None - self.mmds = [] self.arch_mmds = {} self.module_uid_to_koji_tag = {} self.nsvc_to_pkgset = {}