From b89ebe777a057cdd7220d2300a45fc176de6ff19 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Mon, 4 Jul 2022 12:36:15 -0700 Subject: [PATCH] Finish and resolve RLBT#0000134 --- iso/empanadas/empanadas/util/dnf_utils.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/iso/empanadas/empanadas/util/dnf_utils.py b/iso/empanadas/empanadas/util/dnf_utils.py index 7e9c9df..c7ced10 100644 --- a/iso/empanadas/empanadas/util/dnf_utils.py +++ b/iso/empanadas/empanadas/util/dnf_utils.py @@ -1356,6 +1356,11 @@ class RepoSync: "live" ) + sync_live_root = os.path.join( + sync_root, + 'live' + ) + global_work_root = os.path.join( work_root, "global", @@ -1397,9 +1402,9 @@ class RepoSync: ) if os.path.exists('/usr/bin/fpsync'): - message, ret = Shared.fpsync_method(iso_root, sync_iso_root, tmp_dir) + message, ret = Shared.fpsync_method(live_root, sync_live_root, tmp_dir) elif os.path.exists('/usr/bin/parallel') and os.path.exists('/usr/bin/rsync'): - message, ret = Shared.rsync_method(iso_root, sync_iso_root) + message, ret = Shared.rsync_method(live_root, sync_live_root) if ret != 0: self.log.error( @@ -1421,8 +1426,20 @@ class RepoSync: with open(check, 'r', encoding='utf-8') as sum: for line in sum: fp.write(line) + sum.close() fp.close() + if arch == 'x86_64' and os.path.exists(sync_live_root): + live_arch_root = os.path.join(sync_live_root, arch) + live_arch_checksum = os.path.join(live_arch_root, 'CHECKSUM') + with open(live_arch_checksum, 'w+', encoding='utf-8') as lp: + for lcheck in glob.iglob(iso_arch_root + '/*.CHECKSUM'): + with open(lcheck, 'r', encoding='utf-8') as sum: + for line in sum: + lp.write(line) + sum.close() + lp.close() + # Deploy final metadata for a close out self.deploy_metadata(sync_root)