diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-26 11:29:37 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-26 11:29:37 -0700 |
commit | 944c1d7a84f8d27781dd7769ba0b324fbd4d3290 (patch) | |
tree | 259c07081a515513b9ba6a1db7920f4338919a65 | |
parent | 5c19bcd1e4d306a6482d598f51d35605cee76708 (diff) | |
download | portage-944c1d7a84f8d27781dd7769ba0b324fbd4d3290.tar.gz portage-944c1d7a84f8d27781dd7769ba0b324fbd4d3290.tar.bz2 portage-944c1d7a84f8d27781dd7769ba0b324fbd4d3290.zip |
Fix breakage in use_reduce() calls where token_class=Atom is incorrect.
-rw-r--r-- | pym/portage/dbapi/bintree.py | 7 | ||||
-rw-r--r-- | pym/portage/package/ebuild/doebuild.py | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index b4e240783..8cb59255d 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -1085,9 +1085,14 @@ class binarytree(object): use.sort() metadata["USE"] = " ".join(use) for k in self._pkgindex_use_evaluated_keys: + if k.endswith('DEPEND'): + token_class = Atom + else: + token_class = None + try: deps = metadata[k] - deps = use_reduce(deps, uselist=raw_use, token_class=Atom) + deps = use_reduce(deps, uselist=raw_use, token_class=token_class) deps = paren_enclose(deps) except portage.exception.InvalidDependString as e: writemsg("%s: %s\n" % (k, str(e)), diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 9b2e3e8e7..fa8d8b139 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -1463,7 +1463,13 @@ def _post_src_install_uid_fix(mysettings, out): v = mysettings.configdict['pkg'].get(k) if v is None: continue - v = use_reduce(v, uselist=use, token_class=Atom) + + if k.endswith('DEPEND'): + token_class = Atom + else: + token_class = None + + v = use_reduce(v, uselist=use, token_class=token_class) v = paren_enclose(v) if not v: continue |