cycle-finder: Don't try to change flags that are in use.{make,focrce}
authorSebastian Luther <SebastianLuther@gmx.de>
Thu, 19 Aug 2010 13:10:40 +0000 (15:10 +0200)
committerZac Medico <zmedico@gentoo.org>
Thu, 19 Aug 2010 13:13:29 +0000 (06:13 -0700)
pym/_emerge/depgraph.py

index b68058af7014676a80c57cad04e8de72a648d4a5..004534dbed3a83056bc2f5fe4531385e227cce1e 100644 (file)
@@ -4157,6 +4157,11 @@ class depgraph(object):
                                                break
                                affecting_use = portage.dep.extract_affecting_use(dep, parent_atom)
                                
+                               # Make sure we don't want to change a flag that is in use.mask or use.force.
+                               pkgsettings = self._frozen_config.pkgsettings[parent.root]
+                               pkgsettings.setcpv(parent)
+                               affecting_use.difference_update(pkgsettings.usemask, pkgsettings.useforce)
+                               
                                if affecting_use:
                                        affecting_use = list(affecting_use)
                                        #We iterate over all possible settings of these use flags and gather
@@ -4237,22 +4242,6 @@ class depgraph(object):
                                                if ignore_solution:
                                                        continue
 
-                                               # Check for conflicts with use.mask and use.force.
-                                               pkgsettings = self._frozen_config.pkgsettings[parent.root]
-                                               pkgsettings.setcpv(parent)
-                                               for flag in solution:
-                                                       if flag.startswith("+"):
-                                                               if flag[1:] in pkgsettings.usemask:
-                                                                       ignore_solution = True
-                                                                       break
-                                                       else:
-                                                               if flag[1:] in pkgsettings.useforce:
-                                                                       ignore_solution = True
-                                                                       break
-
-                                               if ignore_solution:
-                                                       continue
-
                                                changes = []
                                                for flag in solution:
                                                        if flag.startswith("+"):