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 C0E061382C5 for ; Tue, 20 Apr 2021 07:06:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 120AAE0849; Tue, 20 Apr 2021 07:06:01 +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 D7AE8E0849 for ; Tue, 20 Apr 2021 07:06:00 +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 A5D4A335C67 for ; Tue, 20 Apr 2021 07:05:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4331D59C for ; Tue, 20 Apr 2021 07:05:58 +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: <1618902333.c059e969ff0e106823e0bed4729d4c04db02eee8.zorry@gentoo> Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: buildbot_gentoo_ci/steps/ X-VCS-Repository: proj/tinderbox-cluster X-VCS-Files: buildbot_gentoo_ci/steps/builders.py X-VCS-Directories: buildbot_gentoo_ci/steps/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: c059e969ff0e106823e0bed4729d4c04db02eee8 X-VCS-Branch: master Date: Tue, 20 Apr 2021 07:05:58 +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: a6846e9e-51ad-46c5-bb93-d2d1f4aca198 X-Archives-Hash: eb306db0dab35a3c9a37ac3fdddb2cfc commit: c059e969ff0e106823e0bed4729d4c04db02eee8 Author: Magnus Granberg gentoo org> AuthorDate: Tue Apr 20 07:05:33 2021 +0000 Commit: Magnus Granberg gentoo org> CommitDate: Tue Apr 20 07:05:33 2021 +0000 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=c059e969 Support more then one Chaange USE Signed-off-by: Magnus Granberg gentoo.org> buildbot_gentoo_ci/steps/builders.py | 48 ++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/buildbot_gentoo_ci/steps/builders.py b/buildbot_gentoo_ci/steps/builders.py index d9817d8..50f924d 100644 --- a/buildbot_gentoo_ci/steps/builders.py +++ b/buildbot_gentoo_ci/steps/builders.py @@ -86,21 +86,35 @@ def PersOutputOfEmerge(rc, stdout, stderr): # split the lines #FIXME: Handling of stderr output stderr_line_list = [] + emerge_output['change_use'] = False for line in stderr.split('\n'): if 'Change USE:' in line: line_list = line.split(' ') change_use_list = [] # get cpv cpv_split = line_list[1].split(':') - change_use_list.append(cpv_split[0]) + change_use = {} # add use flags if line_list[4].startswith('+') or line_list[4].startswith('-'): - # we only support one for now + # we only support tre for now if line_list[4].endswith(')'): change_use_list.append(line_list[4].replace(')', '')) + elif line_list[5].endswith(')'): + change_use_list.append(line_list[4]) + change_use_list.append(line_list[5].replace(')', '')) + elif line_list[6].endswith(')'): + change_use_list.append(line_list[4]) + change_use_list.append(line_list[5]) + change_use_list.append(line_list[6].replace(')', '')) + elif not line_list[6].endswith(')'): + change_use_list.append(line_list[4]) + change_use_list.append(line_list[5]) + change_use_list.append(line_list[6]) else: change_use_list = False - emerge_output['change_use'] = change_use_list + if change_use_list: + change_use[cpv_split[0]] = change_use_list + emerge_output['change_use'] = change_use err_line_list = [] if line.startswith(' * '): if line.endswith('.log.gz'): @@ -226,7 +240,7 @@ class SetupPropertys(BuildStep): name = 'SetupPropertys' description = 'Running' - descriptionDone = 'Ran' + #descriptionDone = 'Ran' descriptionSuffix = None haltOnFailure = True flunkOnFailure = True @@ -240,6 +254,7 @@ class SetupPropertys(BuildStep): def run(self): self.gentooci = self.master.namedServices['services'].namedServices['gentooci'] print('build this %s' % self.getProperty("cpv")) + self.descriptionDone = 'Building this %s' % self.getProperty("cpv") self.setProperty('portage_repos_path', self.portage_repos_path, 'portage_repos_path') projectrepository_data = self.getProperty('projectrepository_data') print(projectrepository_data) @@ -550,6 +565,7 @@ class CheckEmergeLogs(BuildStep): # update package.* if needed and rerun pre-build max 3 times if self.step == 'pre-build': print(emerge_output) + # this should be set in the config if self.getProperty('rerun') <= 3: # when we need to change use. we could rerun pre-build with # --autounmask-use=y --autounmask-write=y --autounmask-only=y @@ -560,21 +576,21 @@ class CheckEmergeLogs(BuildStep): separator = '\n' separator2 = ' ' change_use_list = [] - cpv = emerge_output['change_use'][0] - c = yield catpkgsplit(cpv)[0] - p = yield catpkgsplit(cpv)[1] - change_use_list.append(c + '/' + p) - # we only support one use - use_flag = emerge_output['change_use'][1] - if use_flag.startswith('+'): - change_use_list.append(use_flag.replace('+', '')) - else: - change_use_list.append(use_flag) + for cpv, v in emerge_output['change_use'].items(): + c = yield catpkgsplit(cpv)[0] + p = yield catpkgsplit(cpv)[1] + change_use_list.append(c + '/' + p) + for use_flag in v: + if use_flag.startswith('+'): + change_use_list.append(use_flag.replace('+', '')) + else: + change_use_list.append(use_flag) change_use_string = separator2.join(change_use_list) self.aftersteps_list.append( steps.StringDownload(change_use_string + separator, - workerdest='zz_autouse' + str(self.getProperty('rerun')), - workdir='/etc/portage/package.use/') + workerdest='zz_autouse' + str(self.getProperty('rerun')), + workdir='/etc/portage/package.use/' + ) ) # rerun self.aftersteps_list.append(RunEmerge(step='pre-build'))