summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-11-20 08:58:28 -0800
committerZac Medico <zmedico@gentoo.org>2010-11-20 08:58:28 -0800
commit31edc4fcbb9138e523d09db2844c5835577a831b (patch)
tree8da5277938519a46100c754e640469f08b9cdf76
parentb20c1f019a32b50e95f6fa40cd78021d62249d4b (diff)
downloadportage-31edc4fcbb9138e523d09db2844c5835577a831b.tar.gz
portage-31edc4fcbb9138e523d09db2844c5835577a831b.tar.bz2
portage-31edc4fcbb9138e523d09db2844c5835577a831b.zip
Fix interaction of use.mask/force with use deps.
This should fix the package selection issue bug #345979 which triggers invalid "masked by: [nothing]" messages.
-rw-r--r--pym/_emerge/depgraph.py44
1 files changed, 34 insertions, 10 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index f21d66d2b..cf1addf6a 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2983,16 +2983,40 @@ class depgraph(object):
else:
use = self._pkg_use_enabled(pkg)
- if atom.use.enabled.difference(use) and \
- atom.use.enabled.difference(use).difference(atom.use.missing_enabled.difference(pkg.iuse.all)):
- if not pkg.built:
- packages_with_invalid_use_config.append(pkg)
- continue
- if atom.use.disabled.intersection(use) or \
- atom.use.disabled.difference(pkg.iuse.all).difference(atom.use.missing_disabled):
- if not pkg.built:
- packages_with_invalid_use_config.append(pkg)
- continue
+ if atom.use.enabled:
+ need_enabled = atom.use.enabled.difference(use)
+ if need_enabled:
+ need_enabled = need_enabled.difference(
+ atom.use.missing_enabled.difference(pkg.iuse.all))
+ if need_enabled:
+ if not pkg.built:
+ pkgsettings.setcpv(pkg)
+ if not pkgsettings.usemask.difference(need_enabled):
+ # Be careful about masked flags, since they
+ # typically aren't adjustable by the user.
+ packages_with_invalid_use_config.append(pkg)
+ continue
+
+ if atom.use.disabled:
+ 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):
+ # Be careful about forced flags, since they
+ # typically aren't adjustable by the user.
+ packages_with_invalid_use_config.append(pkg)
+ continue
+
+ need_disabled = atom.use.disabled.difference(
+ pkg.iuse.all).difference(atom.use.missing_disabled)
+ if need_disabled:
+ # Don't add this to packages_with_invalid_use_config
+ # since missing_disabled indicates an IUSE issue, and
+ # IUSE cannot be adjusted by the user.
+ 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):