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 1QZ2qh-000610-Vq for garchives@archives.gentoo.org; Tue, 21 Jun 2011 15:26:44 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 30A361C027; Tue, 21 Jun 2011 15:26:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E20CF1C027 for ; Tue, 21 Jun 2011 15:26:35 +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 4CB3D2AC021 for ; Tue, 21 Jun 2011 15:26:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id A10A88003E for ; Tue, 21 Jun 2011 15:26:34 +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: <15bdcdd91a6a8a9cf0f94494c0e57ec0b3b7357f.mgorny@gentoo> Subject: [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/pm/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: PMSTestSuite/pm/pkgcorepm.py PMSTestSuite/pm/portagepm.py X-VCS-Directories: PMSTestSuite/pm/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 15bdcdd91a6a8a9cf0f94494c0e57ec0b3b7357f Date: Tue, 21 Jun 2011 15:26:34 +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: f830adfbe2aa649776f89b5e586c6279 commit: 15bdcdd91a6a8a9cf0f94494c0e57ec0b3b7357f Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Tue Jun 21 15:26:46 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Tue Jun 21 15:26:46 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3D15bdcdd9 Remove stupid +x checks and don't rely on abs paths to PMs. --- PMSTestSuite/pm/pkgcorepm.py | 12 +++--------- PMSTestSuite/pm/portagepm.py | 15 ++++----------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/PMSTestSuite/pm/pkgcorepm.py b/PMSTestSuite/pm/pkgcorepm.py index ba1b1a0..3497823 100644 --- a/PMSTestSuite/pm/pkgcorepm.py +++ b/PMSTestSuite/pm/pkgcorepm.py @@ -8,7 +8,7 @@ """ =20 -import os, os.path, subprocess +import subprocess =20 from PMSTestSuite.repository import EbuildRepository from PMSTestSuite.pm.portagepm import PortagePM @@ -24,8 +24,6 @@ class PkgCorePM(PortagePM): pkg =3D 'sys-apps/pkgcore' failure_nonfatal =3D False =20 - pmerge_path =3D '/usr/bin/pmerge' - common_pmerge_opts =3D ['--oneshot'] =20 @classmethod @@ -34,11 +32,7 @@ class PkgCorePM(PortagePM): import pkgcore except ImportError: return False - - ret =3D True - for prog in (cls.pmerge_path, cls.repoman_path): - ret &=3D os.access(prog, os.X_OK) - return ret + return True =20 @property def package_limit(self): @@ -49,7 +43,7 @@ class PkgCorePM(PortagePM): pass =20 def spawn_pmerge(self, cpvs, opts =3D []): - return subprocess.Popen([self.pmerge_path] + return subprocess.Popen(['pmerge'] + self.common_pmerge_opts + opts + self.pm_options + ['=3D%s' % cpv for cpv in cpvs]) =20 diff --git a/PMSTestSuite/pm/portagepm.py b/PMSTestSuite/pm/portagepm.py index 7d6c6a5..b681ce9 100644 --- a/PMSTestSuite/pm/portagepm.py +++ b/PMSTestSuite/pm/portagepm.py @@ -8,7 +8,7 @@ """ =20 -import copy, os, os.path, subprocess +import copy, os, subprocess =20 from PMSTestSuite.repository import EbuildRepository from PMSTestSuite.pm import PackageManager @@ -19,9 +19,6 @@ class PortagePM(PackageManager): pkg =3D 'sys-apps/portage' failure_nonfatal =3D True =20 - emerge_path =3D '/usr/bin/emerge' - repoman_path =3D '/usr/bin/repoman' - common_emerge_opts =3D ['--ask', 'n', '--keep-going', '--oneshot'] =20 repo_paths =3D [] @@ -32,17 +29,13 @@ class PortagePM(PackageManager): import portage except ImportError: return False - - ret =3D True - for prog in (cls.emerge_path, cls.repoman_path): - ret &=3D os.access(prog, os.X_OK) - return ret + return True =20 def remanifest(self, paths): startdir =3D os.getcwd() for path in paths: os.chdir(path) - subprocess.check_call([self.repoman_path, 'manifest']) + subprocess.check_call(['repoman', 'manifest']) os.chdir(startdir) =20 def spawn_emerge(self, cpvs, opts =3D []): @@ -52,7 +45,7 @@ class PortagePM(PackageManager): env['PORTDIR_OVERLAY'] =3D ' '.join(self.repo_paths) kwargs['env'] =3D env =20 - return subprocess.Popen([self.emerge_path] + return subprocess.Popen(['emerge'] + self.common_emerge_opts + opts + self.pm_options + ['=3D%s' % cpv for cpv in cpvs], **kwargs)