From 4fc3f849e173582493bbc892a6063106c48e424c Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Sun, 3 Sep 2023 01:51:08 -0700 Subject: [PATCH] hotfix: make sure modulemd.src.txt is original --- pv2/importer/operation.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pv2/importer/operation.py b/pv2/importer/operation.py index 978734d..64eaf1f 100644 --- a/pv2/importer/operation.py +++ b/pv2/importer/operation.py @@ -1080,10 +1080,11 @@ class ModuleImport(Import): module_yaml.write(content_new) module_yaml.close() - # Write to the sources, should be the same content - with open(f'{dest_git_repo_path}/SOURCES/modulemd.src.txt', 'w') as module_yaml: - module_yaml.write(content_new) - module_yaml.close() + # Write to the sources. It needs to be the original content. + shutil.copy(modulemd_file, f'{dest_git_repo_path}/SOURCES/modulemd.src.txt') + #with open(f'{dest_git_repo_path}/SOURCES/modulemd.src.txt', 'w') as module_yaml: + # module_yaml.write(content_new) + # module_yaml.close() self.generate_metadata(dest_git_repo_path, self.module_name, {}) gitutil.add_all(dest_repo)