summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-08 03:54:22 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-08 03:54:22 +0000
commit75556755c21f78bb3aa66e0ab777bd739fa3b425 (patch)
tree65a842dd84b216a6a2c727497f0fe32950b64eee
parent91397dc1eb573b95209680fd48bb965294a6d690 (diff)
downloadportage-75556755c21f78bb3aa66e0ab777bd739fa3b425.tar.gz
portage-75556755c21f78bb3aa66e0ab777bd739fa3b425.tar.bz2
portage-75556755c21f78bb3aa66e0ab777bd739fa3b425.zip
Remove the depgraph._get_arg_for_pkg() method since _iter_atoms_for_pkg()
does the job. svn path=/main/trunk/; revision=9745
-rw-r--r--pym/_emerge/__init__.py19
1 files changed, 3 insertions, 16 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 86f09af39..ed0b8aafa 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1734,7 +1734,9 @@ class depgraph(object):
myarg = None
if dep.root == self.target_root:
try:
- myarg = self._get_arg_for_pkg(dep_pkg)
+ myarg = self._iter_atoms_for_pkg(dep_pkg).next()
+ except StopIteration:
+ pass
except portage.exception.InvalidDependString:
if not dep_pkg.installed:
# This shouldn't happen since the package
@@ -2026,21 +2028,6 @@ class depgraph(object):
continue
yield arg, atom
- def _get_arg_for_pkg(self, pkg):
- """
- Return a matching DependencyArg instance for the given Package if
- any exist, otherwise None. An attempt will be made to return the most
- specific match (PackageArg type is the most specific).
-
- This will raise an InvalidDependString exception if PROVIDE is invalid.
- """
- any_arg = None
- for arg, atom in self._iter_atoms_for_pkg(pkg):
- if isinstance(arg, PackageArg):
- return arg
- any_arg = arg
- return any_arg
-
def select_files(self, myfiles):
"""Given a list of .tbz2s, .ebuilds sets, and deps, create the
appropriate depgraph and return a favorite list."""