From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6D24F1382C5 for ; Mon, 22 Feb 2021 20:28:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 849DEE081A; Mon, 22 Feb 2021 20:28:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 57039E081A for ; Mon, 22 Feb 2021 20:28:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0CC9B340E53 for ; Mon, 22 Feb 2021 20:28:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 186D24E1 for ; Mon, 22 Feb 2021 20:28:03 +0000 (UTC) From: "Magnus Granberg" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Magnus Granberg" Message-ID: <1614025634.4324b82edd9d69a27b1db9f4272564ddc51a75dd.zorry@gentoo> Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: buildbot_gentoo_ci/steps/, buildbot_gentoo_ci/config/, buildbot_gentoo_ci/db/ X-VCS-Repository: proj/tinderbox-cluster X-VCS-Files: buildbot_gentoo_ci/config/buildfactorys.py buildbot_gentoo_ci/db/model.py buildbot_gentoo_ci/db/projects.py buildbot_gentoo_ci/steps/builders.py X-VCS-Directories: buildbot_gentoo_ci/db/ buildbot_gentoo_ci/steps/ buildbot_gentoo_ci/config/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: 4324b82edd9d69a27b1db9f4272564ddc51a75dd X-VCS-Branch: master Date: Mon, 22 Feb 2021 20:28:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4a113846-e979-40e5-807f-0770c9e6f5e0 X-Archives-Hash: 8e171caaaedfa342ad6e4e153194e002 commit: 4324b82edd9d69a27b1db9f4272564ddc51a75dd Author: Magnus Granberg gentoo org> AuthorDate: Mon Feb 22 20:27:14 2021 +0000 Commit: Magnus Granberg gentoo org> CommitDate: Mon Feb 22 20:27:14 2021 +0000 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=4324b82e Add RunPkgCheck and CheckPkgCheckLogs Signed-off-by: Magnus Granberg gentoo.org> buildbot_gentoo_ci/config/buildfactorys.py | 11 ++- buildbot_gentoo_ci/db/model.py | 2 +- buildbot_gentoo_ci/db/projects.py | 6 +- buildbot_gentoo_ci/steps/builders.py | 120 +++++++++++++++++++++++++++-- 4 files changed, 129 insertions(+), 10 deletions(-) diff --git a/buildbot_gentoo_ci/config/buildfactorys.py b/buildbot_gentoo_ci/config/buildfactorys.py index 3c77762..cfe4131 100644 --- a/buildbot_gentoo_ci/config/buildfactorys.py +++ b/buildbot_gentoo_ci/config/buildfactorys.py @@ -92,13 +92,15 @@ def run_build_request(): # set needed Propertys f.addStep(builders.SetupPropertys()) # Clean and add new /etc/portage + #FIXME: Is don't like symlinks f.addStep(buildbot_steps.RemoveDirectory(dir="portage", workdir='/etc/')) f.addStep(buildbot_steps.MakeDirectory(dir="portage", workdir='/etc/')) # setup the profile - f.addStep(buildbot_steps.MakeDirectory(dir="make.profile", - workdir='/etc/portage/')) + #NOTE: pkgcheck do not support it as a dir + #f.addStep(buildbot_steps.MakeDirectory(dir="make.profile", + # workdir='/etc/portage/')) f.addStep(builders.SetMakeProfile()) # setup repos.conf dir f.addStep(buildbot_steps.MakeDirectory(dir="repos.conf", @@ -132,4 +134,9 @@ def run_build_request(): # check log # setup make.conf if build id has changes make.conf as dict from SetMakeConf # setup package.* env if build id has changes + # setup pkgcheck.conf if needed + #f.addStep(builders.SetPkgCheckConf()) + # run pkgcheck if wanted + # check log + f.addStep(builders.RunPkgCheck()) return f diff --git a/buildbot_gentoo_ci/db/model.py b/buildbot_gentoo_ci/db/model.py index 0a2c145..4d691ea 100644 --- a/buildbot_gentoo_ci/db/model.py +++ b/buildbot_gentoo_ci/db/model.py @@ -128,7 +128,7 @@ class Model(base.DBConnectorComponent): sa.ForeignKey('repositorys.uuid', ondelete='CASCADE'), nullable=False), sa.Column('auto', sa.Boolean, default=False), - sa.Column('pkgcheck', sa.Boolean, default=False), + sa.Column('pkgcheck', sa.Enum('package','full','none'), default='none'), ) # projects etc/portage settings diff --git a/buildbot_gentoo_ci/db/projects.py b/buildbot_gentoo_ci/db/projects.py index eb8f727..9aeca50 100644 --- a/buildbot_gentoo_ci/db/projects.py +++ b/buildbot_gentoo_ci/db/projects.py @@ -160,12 +160,16 @@ class ProjectsConnectorComponent(base.DBConnectorComponent): ) def _row2dict_projects_repositorys(self, conn, row): + if row.pkgcheck == 'none': + pkgcheck = False + else: + pkgcheck=row.pkgcheck return dict( id=row.id, project_uuid=row.project_uuid, repository_uuid=row.repository_uuid, auto=row.auto, - pkgcheck=row.pkgcheck + pkgcheck=pkgcheck ) def _row2dict_projects_portage(self, conn, row): diff --git a/buildbot_gentoo_ci/steps/builders.py b/buildbot_gentoo_ci/steps/builders.py index c0567c1..6d46ae6 100644 --- a/buildbot_gentoo_ci/steps/builders.py +++ b/buildbot_gentoo_ci/steps/builders.py @@ -4,6 +4,8 @@ import os import re +from portage.versions import catpkgsplit + from twisted.internet import defer from twisted.python import log @@ -75,6 +77,26 @@ def PersOutputOfEmerge(rc, stdout, stderr): 'emerge_output' : emerge_output } +def PersOutputOfPkgCheck(rc, stdout, stderr): + pkgcheck_output = {} + pkgcheck_output['rc'] = rc + #FIXME: Handling of stdout output + pkgcheck_xml_list = [] + # split the lines + for line in stdout.split('\n'): + # pkgcheck output list + if line.startswith('