commit: 482017e7c399b4e97502617f0aa70ff50df54b7b
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 13 19:03:04 2021 +0000
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Tue Apr 13 19:03:04 2021 +0000
URL:
https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=482017e7
check repository_linkname symalink in LocalWorkers
Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>
buildbot_gentoo_ci/steps/portage.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/buildbot_gentoo_ci/steps/portage.py
b/buildbot_gentoo_ci/steps/portage.py
index c1a4d90..c7e82ce 100644
--- a/buildbot_gentoo_ci/steps/portage.py
+++ b/buildbot_gentoo_ci/steps/portage.py
@@ -18,6 +18,7 @@ from twisted.python import log
from buildbot.process.buildstep import BuildStep
from buildbot.process.results import SUCCESS
from buildbot.process.results import FAILURE
+from buildbot.process.results import SKIPPED
from buildbot.plugins import steps
from buildbot_gentoo_ci.steps import master as master_steps
@@ -367,6 +368,9 @@ class CheckPathLocal(BuildStep):
@defer.inlineCallbacks
def run(self):
+ self.gentooci =
self.master.namedServices['services'].namedServices['gentooci']
+ self.repository_linkname =
self.gentooci.config.project['repository_basedir']
+ self.repository_basedir2 = '/home/repos2/'
self.portage_path = yield os.path.join('etc', 'portage')
self.profile_path = yield os.path.join(self.portage_path,
'make.profile')
self.repos_path = yield os.path.join(self.portage_path, 'repos.conf')
@@ -381,6 +385,8 @@ class CheckPathLocal(BuildStep):
]:
if not os.path.isdir(x):
os.makedirs(x)
+ if not os.path.islink(self.repository_linkname):
+ os.symlink(self.repository_basedir2, self.repository_linkname)
return SUCCESS
class SetMakeProfileLocal(BuildStep):
@@ -399,7 +405,7 @@ class SetMakeProfileLocal(BuildStep):
def run(self):
parent_path = yield os.path.join('etc','portage', 'make.profile',
'parent')
if os.path.isfile(parent_path):
- return SUCCESS
+ return SKIPPED
self.gentooci =
self.master.namedServices['services'].namedServices['gentooci']
self.repository_basedir =
self.gentooci.config.project['repository_basedir']
makeprofiles_paths = []