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