Skip to content

Commit

Permalink
Merge pull request #76 from sclorg/fix_tmpdir
Browse files Browse the repository at this point in the history
git: fix not setting up tmp structure
  • Loading branch information
phracek authored Jul 17, 2023
2 parents 302971e + 182f175 commit e85c55b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions container_workflow_tool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def pull_downstream(self):
Additionally runs a script against each repository if check_script is set,
checking its exit value.
"""
tmp, images = self.preparation()
tmp, images = self.preparation(setup_dir=True)
for image in images:
self.distgit._clone_downstream(image["component"], image["git_branch"])
# If check script is set, run the script provided for each config entry
Expand All @@ -516,7 +516,7 @@ def pull_upstream(self):
Additionally runs a script against each repository if check_script is set,
checking its exit value.
"""
tmp, images = self.preparation()
tmp, images = self.preparation(setup_dir=True)
for image in images:
# Use unversioned name as a path for the repository
ups_name = image["name"].split('-')[0]
Expand All @@ -528,10 +528,10 @@ def pull_upstream(self):
self.distgit.check_script(image["component"], self.check_script,
os.path.join(ups_name, image["git_path"]))

def preparation(self):
def preparation(self, setup_dir=False):
# Check for kerberos ticket
self._check_kerb_ticket()
tmp = self._get_tmp_workdir(setup_dir=False)
tmp = self._get_tmp_workdir(setup_dir=setup_dir)
if not tmp:
msg = "Temporary directory structure does not exist. Pull upstream/rebase first."
raise RebuilderError(msg)
Expand Down Expand Up @@ -573,7 +573,7 @@ def dist_git_merge_changes(self, rebase: bool = False):
Args:
rebase (bool, optional): Specifies whether a rebase should be done instead.
"""
tmp, images = self.preparation()
tmp, images = self.preparation(setup_dir=True)
self.distgit.dist_git_merge_changes(images, rebase)
self.git_changes_report(tmp=tmp)

Expand Down

0 comments on commit e85c55b

Please sign in to comment.