Use Package.use.force/mask attributes.
authorZac Medico <zmedico@gentoo.org>
Sun, 21 Nov 2010 03:05:10 +0000 (19:05 -0800)
committerZac Medico <zmedico@gentoo.org>
Wed, 24 Nov 2010 02:07:10 +0000 (18:07 -0800)
This optimizes the fix for bug #345979.

pym/_emerge/depgraph.py

index 935b51849eb0ed9d40609e89caab443458fb1eed..b51acf942cf8c653fef253b6aa199db467bbfa3f 100644 (file)
@@ -2960,8 +2960,7 @@ class depgraph(object):
                                                                        atom.use.missing_enabled.difference(pkg.iuse.all))
                                                                if need_enabled:
                                                                        if not pkg.built:
-                                                                               pkgsettings.setcpv(pkg)
-                                                                               if not pkgsettings.usemask.intersection(need_enabled):
+                                                                               if not pkg.use.mask.intersection(need_enabled):
                                                                                        # Be careful about masked flags, since they
                                                                                        # typically aren't adjustable by the user.
                                                                                        packages_with_invalid_use_config.append(pkg)
@@ -2971,9 +2970,8 @@ class depgraph(object):
                                                        need_disabled = atom.use.disabled.intersection(use)
                                                        if need_disabled:
                                                                if not pkg.built:
-                                                                       pkgsettings.setcpv(pkg)
-                                                                       if not pkgsettings.useforce.difference(
-                                                                               pkgsettings.usemask).intersection(need_disabled):
+                                                                       if not pkg.use.force.difference(
+                                                                               pkg.use.mask).intersection(need_disabled):
                                                                                # Be careful about forced flags, since they
                                                                                # typically aren't adjustable by the user.
                                                                                packages_with_invalid_use_config.append(pkg)