From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QVHpv-0000FM-8e for garchives@archives.gentoo.org; Sat, 11 Jun 2011 06:38:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F45A1C0A2; Sat, 11 Jun 2011 06:38:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id F41A21C0A2 for ; Sat, 11 Jun 2011 06:38:14 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8069F1B402D for ; Sat, 11 Jun 2011 06:38:14 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id C44658003E for ; Sat, 11 Jun 2011 06:32:00 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: Subject: [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/pm/, PMSTestSuite/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: PMSTestSuite/cli.py PMSTestSuite/pm/__init__.py PMSTestSuite/pm/pkgcorepm.py PMSTestSuite/pm/portagepm.py X-VCS-Directories: PMSTestSuite/pm/ PMSTestSuite/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: d6b74a481606215a20933f177b2d0f8ec633a49d Date: Sat, 11 Jun 2011 06:32:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 84989d397695736dd03d2434ccf6cbda commit: d6b74a481606215a20933f177b2d0f8ec633a49d Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Sat Jun 11 06:31:36 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Sat Jun 11 06:31:36 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3Dd6b74a48 Limit the number of packages merged at once if PM is fatal. If the Package Manager treats merge failures as fatal for the whole merge process, merge at most a single package at once. --- PMSTestSuite/cli.py | 4 ++++ PMSTestSuite/pm/__init__.py | 9 +++++++++ PMSTestSuite/pm/pkgcorepm.py | 1 + PMSTestSuite/pm/portagepm.py | 1 + 4 files changed, 15 insertions(+), 0 deletions(-) diff --git a/PMSTestSuite/cli.py b/PMSTestSuite/cli.py index b50960b..2798831 100644 --- a/PMSTestSuite/cli.py +++ b/PMSTestSuite/cli.py @@ -172,6 +172,10 @@ class PMSTestSuiteCLI(object): return 1 =20 print('-> Running PM...') + # if failures are fatal to PM, we can merge at most one package at onc= e + if not self.pm.failure_nonfatal: + self.limit_packages =3D 1 + self.loop =3D gobject.MainLoop() self.package_queue =3D list(self.cpvs) self.start_pm() diff --git a/PMSTestSuite/pm/__init__.py b/PMSTestSuite/pm/__init__.py index 7a9256e..c58deaa 100644 --- a/PMSTestSuite/pm/__init__.py +++ b/PMSTestSuite/pm/__init__.py @@ -32,6 +32,15 @@ class PackageManager(object): """ raise NotImplementedError('Please override the pkg property.') =20 + @property + def failure_nonfatal(self): + """ + A bool stating whether the package manager will treat failures + as non-fatal to the overall merge process (if it will continue merging + when one of the ebuilds fail, aka --keep-going). + """ + return False + @classmethod def is_available(cls): """ diff --git a/PMSTestSuite/pm/pkgcorepm.py b/PMSTestSuite/pm/pkgcorepm.py index 0d64cd7..7e85cc1 100644 --- a/PMSTestSuite/pm/pkgcorepm.py +++ b/PMSTestSuite/pm/pkgcorepm.py @@ -22,6 +22,7 @@ class PkgCorePM(PortagePM): """ name =3D 'pkgcore' pkg =3D 'sys-apps/pkgcore' + failure_nonfatal =3D False =20 pmerge_path =3D '/usr/bin/pmerge' =20 diff --git a/PMSTestSuite/pm/portagepm.py b/PMSTestSuite/pm/portagepm.py index bfc7fbf..19f3f8a 100644 --- a/PMSTestSuite/pm/portagepm.py +++ b/PMSTestSuite/pm/portagepm.py @@ -17,6 +17,7 @@ class PortagePM(PackageManager): """ A class implementing the interfaces to the Portage PM. """ name =3D 'portage' pkg =3D 'sys-apps/portage' + failure_nonfatal =3D True =20 emerge_path =3D '/usr/bin/emerge' repoman_path =3D '/usr/bin/repoman'