From fc21962707e05320a089c5ed75ceaf298baff1b7 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Thu, 9 Feb 2023 21:37:50 -0700 Subject: [PATCH] change core sync to use the shared symlink --- iso/empanadas/empanadas/util/dnf_utils.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/iso/empanadas/empanadas/util/dnf_utils.py b/iso/empanadas/empanadas/util/dnf_utils.py index 055fc0f..f334e3d 100644 --- a/iso/empanadas/empanadas/util/dnf_utils.py +++ b/iso/empanadas/empanadas/util/dnf_utils.py @@ -289,7 +289,9 @@ class RepoSync: Shared.deploy_extra_files(self.extra_files, sync_root, global_work_root, self.log) self.deploy_treeinfo(self.repo, sync_root, self.arch) self.tweak_treeinfo(self.repo, sync_root, self.arch) - self.symlink_to_latest(generated_dir) + #self.symlink_to_latest(generated_dir) + Shared.symlink_to_latest(self.shortname, self.major_version, + generated_dir, self.compose_latest_dir, self.log) if self.repoclosure: self.repoclosure_work(sync_root, work_root, log_root) @@ -709,22 +711,6 @@ class RepoSync: 'No issues detected.' ) - def symlink_to_latest(self, generated_dir): - """ - Emulates pungi and symlinks latest-Rocky-X - - This link will be what is updated in full runs. Whatever is in this - 'latest' directory is what is rsynced on to staging after completion. - This link should not change often. - """ - try: - os.remove(self.compose_latest_dir) - except: - pass - - self.log.info('Symlinking to latest-{}-{}...'.format(self.shortname, self.major_version)) - os.symlink(generated_dir, self.compose_latest_dir) - def repoclosure_work(self, sync_root, work_root, log_root): """ This is where we run repoclosures, based on the configuration of each