depgraph: check unevaluated USE dep IUSE earlier
authorZac Medico <zmedico@gentoo.org>
Sat, 27 Nov 2010 06:30:19 +0000 (22:30 -0800)
committerZac Medico <zmedico@gentoo.org>
Sat, 27 Nov 2010 06:35:40 +0000 (22:35 -0800)
pym/_emerge/depgraph.py

index fecadd3c1e7ace00c70c05cf8ec9eca2a578b56a..7472682fc46059c340920dc6d8b408d2c5a141a9 100644 (file)
@@ -2934,6 +2934,13 @@ class depgraph(object):
                                        if not installed and myarg:
                                                found_available_arg = True
 
+                                       if atom.unevaluated_atom.use:
+                                               #Make sure we don't miss a 'missing IUSE'.
+                                               if pkg.iuse.get_missing_iuse(atom.unevaluated_atom.use.required):
+                                                       # Don't add this to packages_with_invalid_use_config
+                                                       # since IUSE cannot be adjusted by the user.
+                                                       continue
+
                                        if atom.use:
                                                if pkg.iuse.get_missing_iuse(atom.use.required):
                                                        # Don't add this to packages_with_invalid_use_config
@@ -2987,13 +2994,6 @@ class depgraph(object):
                                                if not use_match:
                                                        continue
 
-                                       elif atom.unevaluated_atom.use:
-                                               #Make sure we don't miss a 'missing IUSE'.
-                                               if pkg.iuse.get_missing_iuse(atom.unevaluated_atom.use.required):
-                                                       # Don't add this to packages_with_invalid_use_config
-                                                       # since IUSE cannot be adjusted by the user.
-                                                       continue
-
                                        #check REQUIRED_USE constraints
                                        if not pkg.built and pkg.metadata["REQUIRED_USE"] and \
                                                eapi_has_required_use(pkg.metadata["EAPI"]):