var had incorrect name for extra files

This commit is contained in:
Louis Abel 2022-06-21 23:51:00 -07:00
parent 08f7a44cc1
commit 9463f96381
Signed by untrusted user: label
GPG Key ID: B37E62D143879B36

View File

@ -120,7 +120,7 @@ class RepoSync:
"work/logs" "work/logs"
) )
self.compose_global_work_dir = os.path.join( self.compose_global_work_root = os.path.join(
self.compose_latest_dir, self.compose_latest_dir,
"work/global" "work/global"
) )
@ -203,7 +203,7 @@ class RepoSync:
self.log.error('Dry Runs are not supported just yet. Sorry!') self.log.error('Dry Runs are not supported just yet. Sorry!')
raise SystemExit() raise SystemExit()
self.sync(self.repo, sync_root, work_root, log_root, self.arch) self.sync(self.repo, sync_root, work_root, log_root, global_work_root, self.arch)
if self.fullrun: if self.fullrun:
self.deploy_extra_files(global_work_root) self.deploy_extra_files(global_work_root)
@ -219,7 +219,7 @@ class RepoSync:
self.log.info('Compose logs: %s' % log_root) self.log.info('Compose logs: %s' % log_root)
self.log.info('Compose completed.') self.log.info('Compose completed.')
def sync(self, repo, sync_root, work_root, log_root, arch=None): def sync(self, repo, sync_root, work_root, log_root, global_work_root, arch=None):
""" """
Calls out syncing of the repos. We generally sync each component of a Calls out syncing of the repos. We generally sync each component of a
repo: repo:
@ -230,7 +230,7 @@ class RepoSync:
If parallel is true, we will run in podman. If parallel is true, we will run in podman.
""" """
if self.parallel: if self.parallel:
self.podman_sync(repo, sync_root, work_root, log_root, arch) self.podman_sync(repo, sync_root, work_root, log_root, global_work_root, arch)
else: else:
self.dnf_sync(repo, sync_root, work_root, arch) self.dnf_sync(repo, sync_root, work_root, arch)
@ -242,7 +242,15 @@ class RepoSync:
self.log.error('Please install podman and enable parallel') self.log.error('Please install podman and enable parallel')
raise SystemExit() raise SystemExit()
def podman_sync(self, repo, sync_root, work_root, log_root, arch): def podman_sync(
self,
repo,
sync_root,
work_root,
log_root,
global_work_root,
arch
):
""" """
This is for podman syncs This is for podman syncs
@ -256,7 +264,6 @@ class RepoSync:
bad_exit_list = [] bad_exit_list = []
self.log.info('Generating container entries') self.log.info('Generating container entries')
entries_dir = os.path.join(work_root, "entries") entries_dir = os.path.join(work_root, "entries")
global_work_root = os.path.join(work_root, "global")
if not os.path.exists(entries_dir): if not os.path.exists(entries_dir):
os.makedirs(entries_dir, exist_ok=True) os.makedirs(entries_dir, exist_ok=True)
@ -842,7 +849,7 @@ class RepoSync:
for issue in bad_exit_list: for issue in bad_exit_list:
self.log.error(issue) self.log.error(issue)
def deploy_extra_files(self, global_work_dir): def deploy_extra_files(self, global_work_root):
""" """
deploys extra files based on info of rlvars including a deploys extra files based on info of rlvars including a
extra_files.json extra_files.json
@ -853,7 +860,7 @@ class RepoSync:
cmd = self.git_cmd() cmd = self.git_cmd()
tmpclone = '/tmp/clone' tmpclone = '/tmp/clone'
extra_files_dir = os.path.join( extra_files_dir = os.path.join(
global_work_dir, global_work_root,
'extra-files' 'extra-files'
) )
self.log.info( self.log.info(
@ -861,8 +868,8 @@ class RepoSync:
'Deploying extra files to work directory ...' 'Deploying extra files to work directory ...'
) )
if not os.path.exists(global_work_dir): if not os.path.exists(extra_files_dir):
os.makedirs(global_work_dir, exist_ok=True) os.makedirs(extra_files_dir, exist_ok=True)
clonecmd = '{} clone {} -b {} -q {}'.format( clonecmd = '{} clone {} -b {} -q {}'.format(
cmd, cmd,
@ -984,7 +991,7 @@ class SigRepoSync:
"work/logs" "work/logs"
) )
self.compose_global_work_dir = os.path.join( self.compose_global_work_root = os.path.join(
self.compose_latest_dir, self.compose_latest_dir,
"work/global" "work/global"
) )