diff --git a/container_workflow_tool/main.py b/container_workflow_tool/main.py index d691929..3830a54 100755 --- a/container_workflow_tool/main.py +++ b/container_workflow_tool/main.py @@ -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 @@ -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] @@ -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) @@ -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)