From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: Zac Medico <zmedico@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH] _pkg_use_enabled: return frozenset (531112)
Date: Sat, 29 Nov 2014 08:02:18 -0800 [thread overview]
Message-ID: <1417276938-22026-1-git-send-email-zmedico@gentoo.org> (raw)
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
---
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")
--
2.0.4
next reply other threads:[~2014-11-29 16:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-29 16:02 Zac Medico [this message]
2014-12-02 13:10 ` [gentoo-portage-dev] [PATCH] _pkg_use_enabled: return frozenset (531112) Alexander Berntsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417276938-22026-1-git-send-email-zmedico@gentoo.org \
--to=zmedico@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox