Ensure that depgraph._show_unsatisfied_dep() doesn't suggest changes
authorZac Medico <zmedico@gentoo.org>
Fri, 10 Sep 2010 17:32:04 +0000 (10:32 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 10 Sep 2010 17:32:04 +0000 (10:32 -0700)
to masked or forced USE flags.

pym/_emerge/depgraph.py

index 33fed5082434f70bbaf69608d6a2a03cbee998d0..dce1041e977277b91a3487421f3280ed568a1f08 100644 (file)
@@ -2151,6 +2151,14 @@ class depgraph(object):
                                need_enable = sorted(atom.use.enabled.difference(use).intersection(pkg.iuse.all))
                                need_disable = sorted(atom.use.disabled.intersection(use).intersection(pkg.iuse.all))
 
+                               pkgsettings = self._frozen_config.pkgsettings[pkg.root]
+                               pkgsettings.setcpv(pkg)
+                               untouchable_flags = \
+                                       frozenset(chain(pkgsettings.usemask, pkgsettings.useforce))
+                               if untouchable_flags.intersection(
+                                       chain(need_enable, need_disable)):
+                                       continue
+
                                required_use = pkg.metadata["REQUIRED_USE"]
                                required_use_warning = ""
                                if required_use:
@@ -2194,6 +2202,13 @@ class depgraph(object):
                                        involved_flags = set(chain(conditional.equal, conditional.not_equal, \
                                                conditional.enabled, conditional.disabled))
 
+                                       pkgsettings = self._frozen_config.pkgsettings[myparent.root]
+                                       pkgsettings.setcpv(myparent)
+                                       untouchable_flags = \
+                                               frozenset(chain(pkgsettings.usemask, pkgsettings.useforce))
+                                       if untouchable_flags.intersection(involved_flags):
+                                               continue
+
                                        required_use = myparent.metadata["REQUIRED_USE"]
                                        required_use_warning = ""
                                        if required_use: