From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: Zac Medico <zmedico@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH] More >= atoms for autounmask USE changes (536392)
Date: Sat, 17 Jan 2015 23:13:20 -0800 [thread overview]
Message-ID: <1421565200-23147-1-git-send-email-zmedico@gentoo.org> (raw)
When checking for packages that will be matched by an autounmask USE
change, account for package visibility (masking), so that we can
generate more >= atoms (as opposed to = atoms that only match very
specific versions). Don't do this for keyword or mask changes, since
that may cause undesired versions to be unmasked!
X-Gentoo-Bug: 536392
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=536392
---
pym/_emerge/depgraph.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 1431779..3e9bfdd 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -7741,7 +7741,7 @@ class depgraph(object):
pretend = "--pretend" in self._frozen_config.myopts
enter_invalid = '--ask-enter-invalid' in self._frozen_config.myopts
- def check_if_latest(pkg):
+ def check_if_latest(pkg, check_visibility=False):
is_latest = True
is_latest_in_slot = True
dbs = self._dynamic_config._filtered_trees[pkg.root]["dbs"]
@@ -7749,6 +7749,9 @@ class depgraph(object):
for db, pkg_type, built, installed, db_keys in dbs:
for other_pkg in self._iter_match_pkgs(root_config, pkg_type, Atom(pkg.cp)):
+ if (check_visibility and
+ not self._pkg_visibility_check(other_pkg)):
+ continue
if other_pkg.cp != pkg.cp:
# old-style PROVIDE virtual means there are no
# normal matches for this pkg_type
@@ -7848,7 +7851,13 @@ class depgraph(object):
root = pkg.root
roots.add(root)
use_changes_msg.setdefault(root, [])
- is_latest, is_latest_in_slot = check_if_latest(pkg)
+ # NOTE: For USE changes, call check_if_latest with
+ # check_visibility=True, since we want to generate
+ # a >= atom if possible. Don't do this for keyword
+ # or mask changes, since that may cause undesired
+ # versions to be unmasked! See bug #536392.
+ is_latest, is_latest_in_slot = check_if_latest(
+ pkg, check_visibility=True)
changes = needed_use_config_change[1]
adjustments = []
for flag, state in changes.items():
--
2.0.5
next reply other threads:[~2015-01-18 7:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-18 7:13 Zac Medico [this message]
2015-01-18 17:05 ` [gentoo-portage-dev] [PATCH] More >= atoms for autounmask USE changes (536392) Brian Dolbec
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=1421565200-23147-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