Match packages against arguments earlier in
authorZac Medico <zmedico@gentoo.org>
Tue, 23 Oct 2007 22:58:53 +0000 (22:58 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 23 Oct 2007 22:58:53 +0000 (22:58 -0000)
depgraph._select_package() so that corrupt
PROVIDE is detected sooner.

svn path=/main/trunk/; revision=8261

pym/_emerge/__init__.py

index e2044718210f6b7face9d111ba45fcc6b7946886..4cea918908b213b0bfd2a8e4fd58fc3e046b59af 100644 (file)
@@ -2007,6 +2007,15 @@ class depgraph(object):
                                                        metadata["USE"] = pkgsettings.get("USE","")
                                                else:
                                                        metadata["USE"] = ""
+                                       myarg = None
+                                       if root == self.target_root:
+                                               try:
+                                                       myarg = self._set_atoms.findAtomForPackage(
+                                                               cpv, metadata)
+                                               except portage.exception.InvalidDependString:
+                                                       if not installed:
+                                                               # masked by corruption
+                                                               continue
                                        if not installed:
                                                try:
                                                        if not visible(pkgsettings, cpv, metadata,
@@ -2090,15 +2099,6 @@ class depgraph(object):
                                                        self._reinstall_for_flags(
                                                        forced_flags, old_use, old_iuse,
                                                        cur_use, cur_iuse)
-                                       myarg = None
-                                       if root == self.target_root:
-                                               try:
-                                                       myarg = self._set_atoms.findAtomForPackage(
-                                                               cpv, metadata)
-                                               except portage.exception.InvalidDependString:
-                                                       if not installed:
-                                                               # masked by corruption
-                                                               continue
                                        if not installed:
                                                if myarg:
                                                        found_available_arg = True