diff options
author | 2010-04-27 14:51:12 -0700 | |
---|---|---|
committer | 2010-04-27 14:51:12 -0700 | |
commit | 15a6152d2f7ca70565c3a2eacacad632b6f7b66b (patch) | |
tree | c80a61a1cfcea5cd4cf70a360e39a8117e967444 | |
parent | Add a comment about special USE deps handling which is required in order to (diff) | |
download | portage-idfetch-15a6152d2f7ca70565c3a2eacacad632b6f7b66b.tar.gz portage-idfetch-15a6152d2f7ca70565c3a2eacacad632b6f7b66b.tar.bz2 portage-idfetch-15a6152d2f7ca70565c3a2eacacad632b6f7b66b.zip |
Check USE deps all in one place (and fix some bugs).
-rw-r--r-- | pym/_emerge/depgraph.py | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 566cd246..05558a3c 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2462,17 +2462,6 @@ class depgraph(object): if higher_version_rejected: continue - if atom.use: - for x in atom.use.required: - if x not in pkg.iuse.all and \ - pkg.root_config.settings._iuse_implicit_re.match(x) is None: - missing_iuse = True - break - if missing_iuse: - if not pkg.installed: - packages_with_invalid_use_config.append(pkg) - continue - cpv = pkg.cpv # Make --noreplace take precedence over --newuse. if not pkg.installed and noreplace and \ @@ -2546,14 +2535,26 @@ class depgraph(object): if not installed and myarg: found_available_arg = True - if atom.use and not pkg.built: - use = pkg.use.enabled - if atom.use.enabled.difference(use): - packages_with_invalid_use_config.append(pkg) + if atom.use: + for x in atom.use.required: + if x not in pkg.iuse.all and \ + pkg.root_config.settings._iuse_implicit_re.match(x) is None: + missing_iuse = True + break + if missing_iuse: + if not pkg.installed: + packages_with_invalid_use_config.append(pkg) continue - if atom.use.disabled.intersection(use): - packages_with_invalid_use_config.append(pkg) + + if atom.use.enabled.difference(pkg.use.enabled): + if not pkg.installed: + packages_with_invalid_use_config.append(pkg) + continue + if atom.use.disabled.intersection(pkg.use.enabled): + if not pkg.installed: + packages_with_invalid_use_config.append(pkg) continue + if pkg.cp == atom_cp: if highest_version is None: highest_version = pkg |