diff --git a/builder/kojid b/builder/kojid index b52619ff..76001fad 100755 --- a/builder/kojid +++ b/builder/kojid @@ -5725,6 +5725,15 @@ class NewRepoTask(BaseTaskHandler): def handler(self, tag, event=None, src=False, debuginfo=False, separate_src=False): tinfo = self.session.getTag(tag, strict=True, event=event) + + # check for fs access before we try calling repoInit + top_repos_dir = joinpath(self.options.topdir, "repos") + if not os.path.isdir(top_repos_dir): + # missing or incorrect mount? + # refuse and let another host try + self.session.refuseTask(self.id, msg="No access to repos dir %s" % top_repos_dir) + + # call repoInit kwargs = {} if event is not None: kwargs['event'] = event @@ -5736,6 +5745,7 @@ class NewRepoTask(BaseTaskHandler): if debuginfo or tinfo['extra'].get('with_debuginfo'): kwargs['with_debuginfo'] = True repo_id, event_id = self.session.host.repoInit(tinfo['id'], task_id=self.id, **kwargs) + path = koji.pathinfo.repo(repo_id, tinfo['name']) if not os.path.isdir(path): raise koji.GenericError("Repo directory missing: %s" % path)