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 1QT8Tf-0002HR-NY for garchives@archives.gentoo.org; Sun, 05 Jun 2011 08:14:31 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 169771C005; Sun, 5 Jun 2011 08:14:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id CCAF91C005 for ; Sun, 5 Jun 2011 08:14:21 +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 3B84F1B4044 for ; Sun, 5 Jun 2011 08:14:21 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 9E2858003C for ; Sun, 5 Jun 2011 08:14:20 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/__init__.py pym/portage/dbapi/porttree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: d51baaba0d5cad0fc7941bd593915b1fc7f42f94 Date: Sun, 5 Jun 2011 08:14:20 +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: 74139bc1971ac9ca4d2600f1cc5496a3 commit: d51baaba0d5cad0fc7941bd593915b1fc7f42f94 Author: Zac Medico gentoo org> AuthorDate: Sun Jun 5 08:14:07 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Jun 5 08:14:07 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dd51baaba dbapi._iter_match: remove redundant myrepo args The myrepo arguments are redundant since the Atom.repo attribute carries the same information. --- pym/portage/dbapi/__init__.py | 20 ++++++++++---------- pym/portage/dbapi/porttree.py | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.p= y index 40631e0..e386faa 100644 --- a/pym/portage/dbapi/__init__.py +++ b/pym/portage/dbapi/__init__.py @@ -123,33 +123,33 @@ class dbapi(object): return list(self._iter_match(mydep, self.cp_list(mydep.cp, use_cache=3Duse_cache))) =20 - def _iter_match(self, atom, cpv_iter, myrepo=3DNone): + def _iter_match(self, atom, cpv_iter): cpv_iter =3D iter(match_from_list(atom, cpv_iter)) if atom.slot: - cpv_iter =3D self._iter_match_slot(atom, cpv_iter, myrepo) + cpv_iter =3D self._iter_match_slot(atom, cpv_iter) if atom.unevaluated_atom.use: - cpv_iter =3D self._iter_match_use(atom, cpv_iter, myrepo) + cpv_iter =3D self._iter_match_use(atom, cpv_iter) if atom.repo: - cpv_iter =3D self._iter_match_repo(atom, cpv_iter, myrepo) + cpv_iter =3D self._iter_match_repo(atom, cpv_iter) return cpv_iter =20 - def _iter_match_repo(self, atom, cpv_iter, myrepo=3DNone): + def _iter_match_repo(self, atom, cpv_iter): for cpv in cpv_iter: try: - if self.aux_get(cpv, ["repository"], myrepo=3Dmyrepo)[0] =3D=3D atom= .repo: + if self.aux_get(cpv, ["repository"], myrepo=3Datom.repo)[0] =3D=3D a= tom.repo: yield cpv except KeyError: continue =20 - def _iter_match_slot(self, atom, cpv_iter, myrepo=3DNone): + def _iter_match_slot(self, atom, cpv_iter): for cpv in cpv_iter: try: - if self.aux_get(cpv, ["SLOT"], myrepo=3Dmyrepo)[0] =3D=3D atom.slot: + if self.aux_get(cpv, ["SLOT"], myrepo=3Datom.repo)[0] =3D=3D atom.sl= ot: yield cpv except KeyError: continue =20 - def _iter_match_use(self, atom, cpv_iter, myrepo =3D None): + def _iter_match_use(self, atom, cpv_iter): """ 1) Check for required IUSE intersection (need implicit IUSE here). 2) Check enabled/disabled flag states. @@ -158,7 +158,7 @@ class dbapi(object): iuse_implicit_match =3D self.settings._iuse_implicit_match for cpv in cpv_iter: try: - iuse, slot, use =3D self.aux_get(cpv, ["IUSE", "SLOT", "USE"], myrep= o=3Dmyrepo) + iuse, slot, use =3D self.aux_get(cpv, ["IUSE", "SLOT", "USE"], myrep= o=3Datom.repo) except KeyError: continue iuse =3D frozenset(x.lstrip('+-') for x in iuse.split()) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.p= y index a30c9d7..f971468 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -904,13 +904,13 @@ class portdbapi(dbapi): #dep match -- find all visible matches #get all visible packages, then get the matching ones myval =3D list(self._iter_match(mydep, - self.xmatch("list-visible", mykey, mydep=3Dmykey, mykey=3Dmykey), my= repo=3Dmydep.repo)) + self.xmatch("list-visible", mykey, mydep=3Dmykey, mykey=3Dmykey))) elif level =3D=3D "match-all": #match *all* visible *and* masked packages if mydep =3D=3D mykey: myval =3D self.cp_list(mykey) else: - myval =3D list(self._iter_match(mydep, self.cp_list(mykey), myrepo =3D= mydep.repo)) + myval =3D list(self._iter_match(mydep, self.cp_list(mykey))) else: raise AssertionError( "Invalid level argument: '%s'" % level)