Don't filter USE for binary packages with IUSE (bug 485920)
authorSebastian Luther <SebastianLuther@gmx.de>
Thu, 5 Dec 2013 13:36:51 +0000 (14:36 +0100)
committerBrian Dolbec <dolsen@gentoo.org>
Thu, 5 Dec 2013 15:16:47 +0000 (07:16 -0800)
USE may contain values that aren't present in IUSE for any
supported EAPI. This for example breaks use dependencies on
USE_EXPAND-values.

The behavior for binary packages is now in line with what is
done for installed packages.

Note that this filtering was not active during merge.

URL: https://bugs.gentoo.org/485920

pym/portage/dbapi/bintree.py

index 61ac6b54cf8d5b00e5a3432747611e408c491529..b1f67aeb2347104c02f491af79f271706e334062 100644 (file)
@@ -1283,11 +1283,6 @@ class binarytree(object):
 
        def _eval_use_flags(self, cpv, metadata):
                use = frozenset(metadata["USE"].split())
-               raw_use = use
-               iuse = set(f.lstrip("-+") for f in metadata["IUSE"].split())
-               use = [f for f in use if f in iuse]
-               use.sort()
-               metadata["USE"] = " ".join(use)
                for k in self._pkgindex_use_evaluated_keys:
                        if k.endswith('DEPEND'):
                                token_class = Atom
@@ -1296,7 +1291,7 @@ class binarytree(object):
 
                        try:
                                deps = metadata[k]
-                               deps = use_reduce(deps, uselist=raw_use, token_class=token_class)
+                               deps = use_reduce(deps, uselist=use, token_class=token_class)
                                deps = paren_enclose(deps)
                        except portage.exception.InvalidDependString as e:
                                writemsg("%s: %s\n" % (k, str(e)),