diff --git a/apollo/publishing_tools/apollo_tree.py b/apollo/publishing_tools/apollo_tree.py index 90cb63b..2a6dcdf 100644 --- a/apollo/publishing_tools/apollo_tree.py +++ b/apollo/publishing_tools/apollo_tree.py @@ -268,8 +268,8 @@ async def update_repomd_xml(repomd_xml_path: str, updateinfo: dict): with open(repomd_xml_path, "w", encoding="utf-8") as f: f.write(xml_str) - # Delete old updateinfo file - if existing_updateinfo_path: + # Delete old updateinfo file if not the same as the new one + if existing_updateinfo_path and existing_updateinfo_path != updateinfo_path: try: logger.info("Deleting %s", existing_updateinfo_path) os.remove(existing_updateinfo_path)