public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Magnus Granberg" <zorry@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: buildbot_gentoo_ci/steps/
Date: Fri, 22 Apr 2022 12:34:49 +0000 (UTC)	[thread overview]
Message-ID: <1650630875.e09c9ab4e45d4a884ea6d2da386f5ea3c8f13c2c.zorry@gentoo> (raw)

commit:     e09c9ab4e45d4a884ea6d2da386f5ea3c8f13c2c
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 22 12:34:35 2022 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Fri Apr 22 12:34:35 2022 +0000
URL:        https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=e09c9ab4

Add support rootworkdir

Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>

 buildbot_gentoo_ci/steps/builders.py | 14 +++++++++-----
 buildbot_gentoo_ci/steps/portage.py  | 29 ++++++++++++++++++++++-------
 2 files changed, 31 insertions(+), 12 deletions(-)

diff --git a/buildbot_gentoo_ci/steps/builders.py b/buildbot_gentoo_ci/steps/builders.py
index 4ade33d..8ce6545 100644
--- a/buildbot_gentoo_ci/steps/builders.py
+++ b/buildbot_gentoo_ci/steps/builders.py
@@ -344,7 +344,8 @@ class UpdateRepos(BuildStep):
     haltOnFailure = True
     flunkOnFailure = True
 
-    def __init__(self, **kwargs):
+    def __init__(self, workdir=False, **kwargs):
+        self.rootworkdir = workdir
         super().__init__(**kwargs)
 
     @defer.inlineCallbacks
@@ -356,14 +357,17 @@ 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'])
-            repository_path = yield os.path.join(portage_repos_path, repository_data['name'])
+            if self.rootworkdir:
+                repository_path = os.path.join(self.rootworkdir, portage_repos_path[1:], repository_data['name'])
+            else:
+                repository_path = os.path.join(portage_repos_path, repository_data['name'], '')
             yield self.build.addStepsAfterCurrentStep([
                 steps.Git(repourl=repository_data['url'],
                             name = 'Git pull ' +  repository_data['name'],
                             mode='full',
                             submodules=True,
                             alwaysUseLatest=True,
-                            workdir=os.path.join(repository_path, ''))
+                            workdir=repository_path)
             ])
         return SUCCESS
 
@@ -798,8 +802,8 @@ class CheckEmergeLogs(BuildStep):
         print(cpv_build_dir)
         self.setProperty('cpv_build_dir', cpv_build_dir, 'cpv_build_dir')
         cpv_build_work_dir = yield os.path.join(cpv_build_dir, 'work')
-        #FIXME: take find pattern from db or config
-        find_pattern_list = ['meson-log.txt', 'CMakeCache.txt']
+        #FIXME: take find pattern from db
+        find_pattern_list = ['meson-log.txt', 'CMakeCache.txt', 'testlog.txt', '*.out', 'project-config.jam', 'testlog-x11.txt']
         shell_commad_list = []
         # we have *.log as default
         shell_commad_list.append('find')

diff --git a/buildbot_gentoo_ci/steps/portage.py b/buildbot_gentoo_ci/steps/portage.py
index 2332626..431fe9a 100644
--- a/buildbot_gentoo_ci/steps/portage.py
+++ b/buildbot_gentoo_ci/steps/portage.py
@@ -76,7 +76,8 @@ class SetMakeProfile(BuildStep):
     haltOnFailure = True
     flunkOnFailure = True
 
-    def __init__(self, **kwargs):
+    def __init__(self, workdir=False, **kwargs):
+        self.rootworkdir = workdir
         super().__init__(**kwargs)
 
     @defer.inlineCallbacks
@@ -104,8 +105,12 @@ class SetMakeProfile(BuildStep):
                     'ln',
                     '-s'
                     ]
+        if self.rootworkdir:
+            symlink_makeprofile_path = yield os.path.join(self.rootworkdir, 'etc/portage/make.profile')
+        else:
+            symlink_makeprofile_path = '/etc/portage/make.profile'
         shell_commad_list.append(makeprofile_path)
-        shell_commad_list.append('/etc/portage/make.profile')
+        shell_commad_list.append(symlink_makeprofile_path)
         yield self.build.addStepsAfterCurrentStep([
             steps.ShellCommand(
                         command=shell_commad_list,
@@ -125,7 +130,8 @@ class SetReposConf(BuildStep):
     haltOnFailure = True
     flunkOnFailure = True
 
-    def __init__(self, **kwargs):
+    def __init__(self, workdir=False, **kwargs):
+        self.rootworkdir = workdir
         super().__init__(**kwargs)
 
     @defer.inlineCallbacks
@@ -133,6 +139,10 @@ class SetReposConf(BuildStep):
         self.gentooci = self.master.namedServices['services'].namedServices['gentooci']
         portage_repos_path = self.getProperty('portage_repos_path')
         project_data = self.getProperty('project_data')
+        if self.rootworkdir:
+            portage_etc_path = yield os.path.join(self.rootworkdir, 'etc/portage/')
+        else:
+            portage_etc_path = '/etc/portage/'
         # setup the default.conf
         repos_conf_data = yield self.gentooci.db.projects.getProjectPortageByUuidAndDirectory(project_data['uuid'], 'repos.conf')
         if repos_conf_data is None:
@@ -149,7 +159,7 @@ class SetReposConf(BuildStep):
         yield self.build.addStepsAfterCurrentStep([
             steps.StringDownload(default_conf_string + separator,
                                 workerdest="repos.conf/default.conf",
-                                workdir='/etc/portage/')
+                                workdir=portage_etc_path)
             ])
         # display the default.conf
         yield log.addStdout('File: ' + 'default.conf' + '\n')
@@ -171,7 +181,7 @@ class SetReposConf(BuildStep):
             yield self.build.addStepsAfterCurrentStep([
                 steps.StringDownload(repository_conf_string + separator,
                                 workerdest='repos.conf/' + filename,
-                                workdir='/etc/portage/')
+                                workdir=portage_etc_path)
                 ])
             yield log.addStdout('File: ' + filename + '\n')
             for line in repository_conf:
@@ -187,7 +197,8 @@ class SetMakeConf(BuildStep):
     haltOnFailure = True
     flunkOnFailure = True
 
-    def __init__(self, **kwargs):
+    def __init__(self, workdir=False, **kwargs):
+        self.rootworkdir = workdir
         super().__init__(**kwargs)
 
     @defer.inlineCallbacks
@@ -196,6 +207,10 @@ class SetMakeConf(BuildStep):
         self.gentooci = self.master.namedServices['services'].namedServices['gentooci']
         project_data = self.getProperty('project_data')
         makeconf_variables_data = yield self.gentooci.db.portages.getVariables()
+        if self.rootworkdir:
+            portage_etc_path = yield os.path.join(self.rootworkdir, 'etc/portage/')
+        else:
+            portage_etc_path = '/etc/portage/'
         separator1 = '\n'
         separator2 = ' '
         makeconf_list = []
@@ -248,7 +263,7 @@ class SetMakeConf(BuildStep):
         yield self.build.addStepsAfterCurrentStep([
             steps.StringDownload(makeconf_string + separator1,
                                 workerdest="make.conf",
-                                workdir='/etc/portage/')
+                                workdir=portage_etc_path)
             ])
         # display the make.conf
         for line in makeconf_list:


             reply	other threads:[~2022-04-22 12:34 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 12:34 Magnus Granberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-16 20:50 [gentoo-commits] proj/tinderbox-cluster:master commit in: buildbot_gentoo_ci/steps/ Magnus Granberg
2024-03-31 19:40 Magnus Granberg
2024-03-31 19:40 Magnus Granberg
2024-03-23 14:13 Magnus Granberg
2024-03-21 16:56 Magnus Granberg
2024-03-19 17:19 Magnus Granberg
2024-03-17 20:40 Magnus Granberg
2024-03-16  8:49 Magnus Granberg
2024-02-05 18:54 Magnus Granberg
2024-02-04 11:32 Magnus Granberg
2024-02-04  9:49 Magnus Granberg
2024-02-03 10:02 Magnus Granberg
2023-07-26  9:23 Magnus Granberg
2023-06-10 10:08 Magnus Granberg
2023-06-05  8:09 Magnus Granberg
2023-06-05  8:09 Magnus Granberg
2023-05-08 20:19 Magnus Granberg
2023-03-10 22:36 Magnus Granberg
2023-03-10 22:36 Magnus Granberg
2023-03-10  1:47 Magnus Granberg
2023-02-28 21:41 Magnus Granberg
2023-02-28 21:41 Magnus Granberg
2022-09-25 11:46 Magnus Granberg
2022-08-10 21:51 Magnus Granberg
2022-08-05 18:32 Magnus Granberg
2022-07-30 22:40 Magnus Granberg
2022-07-27 11:02 Magnus Granberg
2022-07-27 11:02 Magnus Granberg
2022-07-27 11:02 Magnus Granberg
2022-07-27 11:02 Magnus Granberg
2022-07-26 11:54 Magnus Granberg
2022-07-13 20:01 Magnus Granberg
2022-07-08 21:54 Magnus Granberg
2022-07-06 18:44 Magnus Granberg
2022-07-04 17:44 Magnus Granberg
2022-06-28 23:26 Magnus Granberg
2022-06-01  0:19 Magnus Granberg
2022-01-28 10:09 Magnus Granberg
2022-01-24  8:41 Magnus Granberg
2022-01-24  0:42 Magnus Granberg
2022-01-22 20:50 Magnus Granberg
2022-01-18 20:20 Magnus Granberg
2022-01-18 19:38 Magnus Granberg
2022-01-18 19:16 Magnus Granberg
2022-01-08 17:25 Magnus Granberg
2021-11-01  2:22 Magnus Granberg
2021-10-23 22:26 Magnus Granberg
2021-10-23 22:24 Magnus Granberg
2021-10-06  1:35 Magnus Granberg
2021-10-02 20:52 Magnus Granberg
2021-09-28 22:16 Magnus Granberg
2021-09-22  0:04 Magnus Granberg
2021-09-21  1:29 Magnus Granberg
2021-09-20 23:28 Magnus Granberg
2021-09-07  0:46 Magnus Granberg
2021-07-17  8:14 Magnus Granberg
2021-05-18  8:55 Magnus Granberg
2021-04-26 20:26 Magnus Granberg
2021-04-20  7:05 Magnus Granberg
2021-04-13 19:03 Magnus Granberg
2021-04-02 22:12 Magnus Granberg
2021-04-02 22:12 Magnus Granberg
2021-04-02 22:12 Magnus Granberg
2021-04-02 22:12 Magnus Granberg
2021-03-29  0:34 Magnus Granberg
2021-03-29  0:34 Magnus Granberg
2021-03-20 13:42 Magnus Granberg
2021-03-20 13:42 Magnus Granberg
2021-03-20 13:42 Magnus Granberg
2021-02-28 18:48 Magnus Granberg
2021-02-24 21:27 Magnus Granberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1650630875.e09c9ab4e45d4a884ea6d2da386f5ea3c8f13c2c.zorry@gentoo \
    --to=zorry@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox