1 |
Since commit 9ba4f2aa6a2755a73fb652b4557919047d649fd1, _pkg_use_enabled |
2 |
needs to consistently return a frozenset, so that the result is |
3 |
hashable. |
4 |
|
5 |
Fixes: 9ba4f2aa6a27 ("_slot_operator_update_probe: memoize use_reduce (529660)") |
6 |
X-Gentoo-Bug: 531112 |
7 |
X-Gentoo-Url: https://bugs.gentoo.org/show_bug.cgi?id=531112 |
8 |
--- |
9 |
pym/_emerge/depgraph.py | 7 +++++++ |
10 |
1 file changed, 7 insertions(+) |
11 |
|
12 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
13 |
index a0169ff..3455b6b 100644 |
14 |
--- a/pym/_emerge/depgraph.py |
15 |
+++ b/pym/_emerge/depgraph.py |
16 |
@@ -5321,6 +5321,9 @@ class depgraph(object): |
17 |
If target_use is given, the need changes are computed to make the package useable. |
18 |
Example: target_use = { "foo": True, "bar": False } |
19 |
The flags target_use must be in the pkg's IUSE. |
20 |
+ @rtype: frozenset |
21 |
+ @return: set of effectively enabled USE flags, including changes |
22 |
+ made by autounmask |
23 |
""" |
24 |
if pkg.built: |
25 |
return pkg.use.enabled |
26 |
@@ -5387,6 +5390,10 @@ class depgraph(object): |
27 |
|
28 |
return False |
29 |
|
30 |
+ # Always return frozenset since the result needs to be |
31 |
+ # hashable (see bug #531112). |
32 |
+ new_use = frozenset(new_use) |
33 |
+ |
34 |
if new_changes != old_changes: |
35 |
#Don't do the change if it violates REQUIRED_USE. |
36 |
required_use = pkg._metadata.get("REQUIRED_USE") |
37 |
-- |
38 |
2.0.4 |