From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6A38C138A1A for ; Sun, 18 Jan 2015 18:49:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 52EFCE08C0; Sun, 18 Jan 2015 18:49:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 02B92E08C0 for ; Sun, 18 Jan 2015 18:49:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2C5353406CD for ; Sun, 18 Jan 2015 18:49:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D65EBFDC3 for ; Sun, 18 Jan 2015 18:49:35 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1421606685.0b85e54ce3de54d8b1dfaf2c3f3b23b5326d4c44.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/depgraph.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 0b85e54ce3de54d8b1dfaf2c3f3b23b5326d4c44 X-VCS-Branch: master Date: Sun, 18 Jan 2015 18:49:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5d4a4aa7-7293-46bd-998a-eeab3be3cd9d X-Archives-Hash: 1d9a6f6433827f0f61aac207d94502e2 commit: 0b85e54ce3de54d8b1dfaf2c3f3b23b5326d4c44 Author: Zac Medico gentoo org> AuthorDate: Sun Jan 18 07:11:54 2015 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Jan 18 18:44:45 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0b85e54c More >= atoms for autounmask USE changes (536392) 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 Acked-by: Brian Dolbec gentoo.org> --- 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():