summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-11-20 19:17:49 -0800
committerZac Medico <zmedico@gentoo.org>2010-11-23 18:07:23 -0800
commit35465e6dd2d0961df871db3bbceff44818768738 (patch)
tree7671c1756ba971d47a4ff6f4f35d92f1d6ac0181
parent814a379f0800b4c001d2853b6a4ec71a6595f5c5 (diff)
downloadportage-35465e6dd2d0961df871db3bbceff44818768738.tar.gz
portage-35465e6dd2d0961df871db3bbceff44818768738.tar.bz2
portage-35465e6dd2d0961df871db3bbceff44818768738.zip
Use Package.use.force/mask attributes.
-rw-r--r--pym/_emerge/depgraph.py19
-rw-r--r--pym/_emerge/resolver/circular_dependency.py4
2 files changed, 7 insertions, 16 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index b51acf942..8a645235e 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2289,10 +2289,8 @@ 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))
+ frozenset(chain(pkg.use.mask, pkg.use.force))
if untouchable_flags.intersection(
chain(need_enable, need_disable)):
continue
@@ -2340,10 +2338,8 @@ 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))
+ frozenset(chain(myparent.use.mask, myparent.use.force))
if untouchable_flags.intersection(involved_flags):
continue
@@ -3066,10 +3062,9 @@ class depgraph(object):
("--newuse" in self._frozen_config.myopts or \
"--reinstall" in self._frozen_config.myopts) and \
cpv in vardb.match(atom):
- pkgsettings.setcpv(pkg)
forced_flags = set()
- forced_flags.update(pkgsettings.useforce)
- forced_flags.update(pkgsettings.usemask)
+ forced_flags.update(pkg.use.force)
+ forced_flags.update(pkg.use.mask)
old_use = vardb.aux_get(cpv, ["USE"])[0].split()
old_iuse = set(filter_iuse_defaults(
vardb.aux_get(cpv, ["IUSE"])[0].split()))
@@ -4753,10 +4748,8 @@ class depgraph(object):
affecting_use.update(extract_affecting_use(dep_str, atom))
#Don't show flags as 'affecting' if the user can't change them,
- pkgsettings = self._frozen_config.pkgsettings[node.root]
- pkgsettings.setcpv(node)
- affecting_use.difference_update(pkgsettings.usemask, \
- pkgsettings.useforce)
+ affecting_use.difference_update(node.use.mask, \
+ node.use.force)
pkg_name = node.cpv
if affecting_use:
diff --git a/pym/_emerge/resolver/circular_dependency.py b/pym/_emerge/resolver/circular_dependency.py
index 78c5bebc7..9d3f5c68d 100644
--- a/pym/_emerge/resolver/circular_dependency.py
+++ b/pym/_emerge/resolver/circular_dependency.py
@@ -79,9 +79,7 @@ class circular_dependency_handler(object):
return "\n".join(msg)
def _get_use_mask_and_force(self, pkg):
- pkgsettings = self.depgraph._frozen_config.pkgsettings[pkg.root]
- pkgsettings.setcpv(pkg)
- return frozenset(pkgsettings.usemask), frozenset(pkgsettings.useforce)
+ return pkg.use.mask, pkg.use.force
def _get_autounmask_changes(self, pkg):
needed_use_config_change = self.depgraph._dynamic_config._needed_use_config_changes.get(pkg)