commit: 8ab6bf127155a3bddca43767fb7aa208a3ea4fe7 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org> AuthorDate: Tue Jul 26 12:59:19 2022 +0000 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org> CommitDate: Tue Jul 26 12:59:19 2022 +0000 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=8ab6bf12
Add support for use of rootworkdir Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org> buildbot_gentoo_ci/steps/builders.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/buildbot_gentoo_ci/steps/builders.py b/buildbot_gentoo_ci/steps/builders.py index 38dfa79..383ae60 100644 --- a/buildbot_gentoo_ci/steps/builders.py +++ b/buildbot_gentoo_ci/steps/builders.py @@ -314,6 +314,7 @@ class SetupPropertys(BuildStep): self.gentooci = self.master.namedServices['services'].namedServices['gentooci'] print('build this %s' % self.getProperty("cpv")) self.setProperty('portage_repos_path', self.gentooci.config.project['project']['worker_portage_repos_path'], 'portage_repos_path') + self.setProperty('rootworkdir', False, 'rootworkdir') projectrepository_data = self.getProperty('projectrepository_data') print(projectrepository_data) project_data = yield self.gentooci.db.projects.getProjectByUuid(projectrepository_data['project_uuid']) @@ -342,6 +343,7 @@ class SetupPropertys(BuildStep): self.descriptionDone = ' '.join([self.getProperty("cpv"), 'for project', self.getProperty('project_data')['name']]) return SUCCESS +# Should be moved to repos.py class UpdateRepos(BuildStep): name = 'UpdateRepos' @@ -351,8 +353,7 @@ class UpdateRepos(BuildStep): haltOnFailure = True flunkOnFailure = True - def __init__(self, workdir=False, **kwargs): - self.rootworkdir = workdir + def __init__(self, **kwargs): super().__init__(**kwargs) @defer.inlineCallbacks @@ -364,8 +365,8 @@ class UpdateRepos(BuildStep): projects_repositorys_data = yield self.gentooci.db.projects.getRepositorysByProjectUuid(project_data['uuid']) for project_repository_data in projects_repositorys_data: repository_data = yield self.gentooci.db.repositorys.getRepositoryByUuid(project_repository_data['repository_uuid']) - if self.rootworkdir: - repository_path = os.path.join(self.rootworkdir, portage_repos_path[1:], repository_data['name']) + if self.getProperty('rootworkdir'): + repository_path = os.path.join(self.getProperty('rootworkdir'), portage_repos_path[1:], repository_data['name']) else: repository_path = os.path.join(portage_repos_path, repository_data['name'], '') yield self.build.addStepsAfterCurrentStep([