diff options
author | 2010-05-25 13:22:09 +0200 | |
---|---|---|
committer | 2010-05-25 04:43:46 -0700 | |
commit | ebe5811272f6eecb3532b45471ba7f1cfef20ba2 (patch) | |
tree | 3911ea275bc9cb0f2fc4b1c540563b44d0b2cafd | |
parent | _emerge.Package.iuse.is_valid_flags should return a list of flags missing fro... (diff) | |
download | portage-idfetch-ebe5811272f6eecb3532b45471ba7f1cfef20ba2.tar.gz portage-idfetch-ebe5811272f6eecb3532b45471ba7f1cfef20ba2.tar.bz2 portage-idfetch-ebe5811272f6eecb3532b45471ba7f1cfef20ba2.zip |
_emerge.depgraph._show_unsatisfied_dep(): Do an ealier missing IUSE check and simplify some related code
-rw-r--r-- | pym/_emerge/depgraph.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index d4f70d03..ec3da77d 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2224,10 +2224,12 @@ class depgraph(object): mreasons = ["exclude option"] if mreasons: masked_pkg_instances.add(pkg) - if atom.violated_conditionals(pkg.use.enabled).use: - missing_use.append(pkg) - if not mreasons: - continue + if atom.unevaluated_atom.use: + if not pkg.iuse.is_valid_flag(atom.unevaluated_atom.use.required) \ + or atom.violated_conditionals(pkg.use.enabled).use: + missing_use.append(pkg) + if not mreasons: + continue if pkg.built and not mreasons: mreasons = ["use flag configuration mismatch"] masked_packages.append( @@ -2243,12 +2245,7 @@ class depgraph(object): missing_iuse_reasons = [] for pkg in missing_use: use = pkg.use.enabled - iuse = implicit_iuse.union(re.escape(x) for x in pkg.iuse.all) - iuse_re = re.compile("^(%s)$" % "|".join(iuse)) - missing_iuse = [] - for x in atom.use.required: - if iuse_re.match(x) is None: - missing_iuse.append(x) + missing_iuse = pkg.iuse.is_valid_flag(atom.use.required) mreasons = [] if missing_iuse: mreasons.append("Missing IUSE: %s" % " ".join(missing_iuse)) |