commit: 161b85f3d4f5ba460ddb99d43c9475e160fa25f3
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 29 16:01:38 2014 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Nov 29 17:49:58 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=161b85f3
_pkg_use_enabled: return frozenset (531112)
Since commit 9ba4f2aa6a2755a73fb652b4557919047d649fd1, _pkg_use_enabled
needs to consistently return a frozenset, so that the result is
hashable.
Fixes: 9ba4f2aa6a27 ("_slot_operator_update_probe: memoize use_reduce (529660)")
X-Gentoo-Bug: 531112
X-Gentoo-Url: https://bugs.gentoo.org/show_bug.cgi?id=531112
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>
---
pym/_emerge/depgraph.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index a0169ff..3455b6b 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -5321,6 +5321,9 @@ class depgraph(object):
If target_use is given, the need changes are computed to make
the package useable.
Example: target_use = { "foo": True, "bar": False }
The flags target_use must be in the pkg's IUSE.
+ @rtype: frozenset
+ @return: set of effectively enabled USE flags, including changes
+ made by autounmask
"""
if pkg.built:
return pkg.use.enabled
@@ -5387,6 +5390,10 @@ class depgraph(object):
return False
+ # Always return frozenset since the result needs to be
+ # hashable (see bug #531112).
+ new_use = frozenset(new_use)
+
if new_changes != old_changes:
#Don't do the change if it violates REQUIRED_USE.
required_use = pkg._metadata.get("REQUIRED_USE")