forked from sig_core/toolkit
add live root logic before sign off
This commit is contained in:
parent
b78c4a774d
commit
d84a686102
@ -1234,6 +1234,13 @@ class RepoSync:
|
|||||||
if r in self.iso_map['images']:
|
if r in self.iso_map['images']:
|
||||||
variants_to_tweak.append(r)
|
variants_to_tweak.append(r)
|
||||||
|
|
||||||
|
if not len(variants_to_tweak) > 0:
|
||||||
|
self.log.info(
|
||||||
|
'[' + Color.BOLD + Color.GREEN + 'INFO' + Color.END + '] ' +
|
||||||
|
'No treeinfo to tweak.'
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
for a in arches_to_tree:
|
for a in arches_to_tree:
|
||||||
for v in variants_to_tweak:
|
for v in variants_to_tweak:
|
||||||
self.log.info(
|
self.log.info(
|
||||||
@ -1289,10 +1296,9 @@ class RepoSync:
|
|||||||
|
|
||||||
def run_compose_closeout(self):
|
def run_compose_closeout(self):
|
||||||
"""
|
"""
|
||||||
Closes out a compose as file. This ensures kickstart repositories are
|
Closes out a compose. This ensures the ISO's are synced from work/isos
|
||||||
made, the treeinfo is modifed for the primary repository, syncs
|
to compose/isos, checks for live media and syncs as well from work/live
|
||||||
work/isos to compose/isos, and combines all checksum files per arch
|
to compose/live, deploys final metadata.
|
||||||
into a final CHECKSUM file.
|
|
||||||
"""
|
"""
|
||||||
# latest-X-Y should exist at all times for this to work.
|
# latest-X-Y should exist at all times for this to work.
|
||||||
work_root = os.path.join(
|
work_root = os.path.join(
|
||||||
@ -1332,6 +1338,11 @@ class RepoSync:
|
|||||||
"isos"
|
"isos"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
live_root = os.path.join(
|
||||||
|
work_root,
|
||||||
|
"live"
|
||||||
|
)
|
||||||
|
|
||||||
global_work_root = os.path.join(
|
global_work_root = os.path.join(
|
||||||
work_root,
|
work_root,
|
||||||
"global",
|
"global",
|
||||||
@ -1366,6 +1377,32 @@ class RepoSync:
|
|||||||
message
|
message
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if os.path.exists(live_root):
|
||||||
|
self.log.info(
|
||||||
|
'[' + Color.BOLD + Color.GREEN + 'INFO' + Color.END + '] ' +
|
||||||
|
'Starting to sync live images to compose'
|
||||||
|
)
|
||||||
|
|
||||||
|
if os.path.exists('/usr/bin/fpsync'):
|
||||||
|
message, ret = Shared.fpsync_method(iso_root, sync_iso_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)
|
||||||
|
|
||||||
|
if ret != 0:
|
||||||
|
self.log.error(
|
||||||
|
'[' + Color.BOLD + Color.RED + 'FAIL' + Color.END + '] ' +
|
||||||
|
message
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
self.log.info(
|
||||||
|
'[' + Color.BOLD + Color.GREEN + 'INFO' + Color.END + '] ' +
|
||||||
|
message
|
||||||
|
)
|
||||||
|
|
||||||
|
# Combine all checksums here
|
||||||
|
# Deploy final metadata for a close out
|
||||||
|
self.deploy_metadata(sync_root)
|
||||||
|
|
||||||
class SigRepoSync:
|
class SigRepoSync:
|
||||||
"""
|
"""
|
||||||
This helps us do reposync operations for SIG's. Do not use this for the
|
This helps us do reposync operations for SIG's. Do not use this for the
|
||||||
|
@ -505,3 +505,5 @@ class Shared:
|
|||||||
switches = '-av --chown=10004:10005 --progress --relative --human-readable'
|
switches = '-av --chown=10004:10005 --progress --relative --human-readable'
|
||||||
|
|
||||||
os.makedirs(dest, exist_ok=True)
|
os.makedirs(dest, exist_ok=True)
|
||||||
|
|
||||||
|
return 'Not available', 1
|
||||||
|
Loading…
Reference in New Issue
Block a user