diff --git a/pungi/phases/createrepo.py b/pungi/phases/createrepo.py index 397c6a08..61821d92 100644 --- a/pungi/phases/createrepo.py +++ b/pungi/phases/createrepo.py @@ -196,7 +196,7 @@ def create_variant_repo(compose, arch, variant, pkg_type, modules_metadata=None) for module_id, mmd in variant.arch_mmds[arch].items(): # Create copy of architecture specific mmd to filter out packages # which are not part of this particular repo. - repo_mmd = Modulemd.Module.new_from_string(mmd.dumps()) + repo_mmd = mmd.copy() repo_mmd.set_arch(tree_arch_to_yum_arch(arch)) artifacts = repo_mmd.get_rpm_artifacts() diff --git a/pungi/phases/gather/sources/source_module.py b/pungi/phases/gather/sources/source_module.py index 89e87bed..99d41303 100644 --- a/pungi/phases/gather/sources/source_module.py +++ b/pungi/phases/gather/sources/source_module.py @@ -59,7 +59,7 @@ class GatherSourceModule(pungi.phases.gather.source.GatherSourceBase): for mmd in variant.mmds: mmd_id = "%s-%s" % (mmd.get_name(), mmd.get_stream()) if mmd_id not in variant.arch_mmds[arch]: - arch_mmd = Modulemd.Module.new_from_string(mmd.dumps()) + arch_mmd = mmd.copy() variant.arch_mmds[arch][mmd_id] = arch_mmd # Contains per-module RPMs added to variant.