From d53e0d939d16e9d8ba6cf0303f7f5267760b1e04 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Wed, 13 Nov 2024 15:06:50 -0700 Subject: [PATCH] refresh treeinfo should NOT overwrite by default --- iso/empanadas/empanadas/scripts/refresh_all_treeinfo.py | 2 ++ iso/empanadas/empanadas/util/dnf_utils.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/iso/empanadas/empanadas/scripts/refresh_all_treeinfo.py b/iso/empanadas/empanadas/scripts/refresh_all_treeinfo.py index 1756532..4418a75 100755 --- a/iso/empanadas/empanadas/scripts/refresh_all_treeinfo.py +++ b/iso/empanadas/empanadas/scripts/refresh_all_treeinfo.py @@ -11,6 +11,7 @@ parser = argparse.ArgumentParser(description="Peridot Sync and Compose") # All of our options parser.add_argument('--release', type=str, help="Major Release Version or major-type (eg 9-beta)", required=True) +parser.add_argument('--overwrite', action='store_true', help="Overwrites current treeinfo and discinfo files") parser.add_argument('--logger', type=str) # Parse them @@ -26,6 +27,7 @@ a = RepoSync( rlvars, config, major=major, + refresh_treeinfo=results.overwrite, logger=results.logger, ) diff --git a/iso/empanadas/empanadas/util/dnf_utils.py b/iso/empanadas/empanadas/util/dnf_utils.py index 9c3fdea..9eb63a2 100644 --- a/iso/empanadas/empanadas/util/dnf_utils.py +++ b/iso/empanadas/empanadas/util/dnf_utils.py @@ -1243,7 +1243,7 @@ class RepoSync: It is rare that this should be called. """ sync_root = self.compose_latest_sync - self.deploy_treeinfo(self.repo, sync_root, self.arch, refresh=True) + self.deploy_treeinfo(self.repo, sync_root, self.arch, refresh=self.refresh_treeinfo) self.tweak_treeinfo(self.repo, sync_root, self.arch) def run_compose_closeout(self):