summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-06-05 01:14:07 -0700
committerZac Medico <zmedico@gentoo.org>2011-06-05 01:14:07 -0700
commitd51baaba0d5cad0fc7941bd593915b1fc7f42f94 (patch)
treee885911f3d0697d8c977ea96884f703e5ca5efa2
parent5bf2b111e23a60b60d307a56a833575c3d514125 (diff)
downloadportage-d51baaba0d5cad0fc7941bd593915b1fc7f42f94.tar.gz
portage-d51baaba0d5cad0fc7941bd593915b1fc7f42f94.tar.bz2
portage-d51baaba0d5cad0fc7941bd593915b1fc7f42f94.zip
dbapi._iter_match: remove redundant myrepo args
The myrepo arguments are redundant since the Atom.repo attribute carries the same information.
-rw-r--r--pym/portage/dbapi/__init__.py20
-rw-r--r--pym/portage/dbapi/porttree.py4
2 files changed, 12 insertions, 12 deletions
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py
index 40631e0bd..e386faae5 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=use_cache)))
- def _iter_match(self, atom, cpv_iter, myrepo=None):
+ def _iter_match(self, atom, cpv_iter):
cpv_iter = iter(match_from_list(atom, cpv_iter))
if atom.slot:
- cpv_iter = self._iter_match_slot(atom, cpv_iter, myrepo)
+ cpv_iter = self._iter_match_slot(atom, cpv_iter)
if atom.unevaluated_atom.use:
- cpv_iter = self._iter_match_use(atom, cpv_iter, myrepo)
+ cpv_iter = self._iter_match_use(atom, cpv_iter)
if atom.repo:
- cpv_iter = self._iter_match_repo(atom, cpv_iter, myrepo)
+ cpv_iter = self._iter_match_repo(atom, cpv_iter)
return cpv_iter
- def _iter_match_repo(self, atom, cpv_iter, myrepo=None):
+ def _iter_match_repo(self, atom, cpv_iter):
for cpv in cpv_iter:
try:
- if self.aux_get(cpv, ["repository"], myrepo=myrepo)[0] == atom.repo:
+ if self.aux_get(cpv, ["repository"], myrepo=atom.repo)[0] == atom.repo:
yield cpv
except KeyError:
continue
- def _iter_match_slot(self, atom, cpv_iter, myrepo=None):
+ def _iter_match_slot(self, atom, cpv_iter):
for cpv in cpv_iter:
try:
- if self.aux_get(cpv, ["SLOT"], myrepo=myrepo)[0] == atom.slot:
+ if self.aux_get(cpv, ["SLOT"], myrepo=atom.repo)[0] == atom.slot:
yield cpv
except KeyError:
continue
- def _iter_match_use(self, atom, cpv_iter, myrepo = 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 = self.settings._iuse_implicit_match
for cpv in cpv_iter:
try:
- iuse, slot, use = self.aux_get(cpv, ["IUSE", "SLOT", "USE"], myrepo=myrepo)
+ iuse, slot, use = self.aux_get(cpv, ["IUSE", "SLOT", "USE"], myrepo=atom.repo)
except KeyError:
continue
iuse = frozenset(x.lstrip('+-') for x in iuse.split())
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index a30c9d7b4..f971468a6 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 = list(self._iter_match(mydep,
- self.xmatch("list-visible", mykey, mydep=mykey, mykey=mykey), myrepo=mydep.repo))
+ self.xmatch("list-visible", mykey, mydep=mykey, mykey=mykey)))
elif level == "match-all":
#match *all* visible *and* masked packages
if mydep == mykey:
myval = self.cp_list(mykey)
else:
- myval = list(self._iter_match(mydep, self.cp_list(mykey), myrepo = mydep.repo))
+ myval = list(self._iter_match(mydep, self.cp_list(mykey)))
else:
raise AssertionError(
"Invalid level argument: '%s'" % level)