aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2021-04-13 21:03:04 +0200
committerMagnus Granberg <zorry@gentoo.org>2021-04-13 21:03:04 +0200
commit482017e7c399b4e97502617f0aa70ff50df54b7b (patch)
treefceccef1fda3057f3afcb78d96280c8b8bc24c28
parentRemove project_repository_uuid from db. use int for datetime in db. change mi... (diff)
downloadtinderbox-cluster-482017e7c399b4e97502617f0aa70ff50df54b7b.tar.gz
tinderbox-cluster-482017e7c399b4e97502617f0aa70ff50df54b7b.tar.bz2
tinderbox-cluster-482017e7c399b4e97502617f0aa70ff50df54b7b.zip
check repository_linkname symalink in LocalWorkers
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
-rw-r--r--buildbot_gentoo_ci/steps/portage.py8
1 files changed, 7 insertions, 1 deletions
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 = []