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 7B5B5138A1A for ; Sun, 18 Jan 2015 07:13:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1D9CFE08EA; Sun, 18 Jan 2015 07:13:53 +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 A8CD5E08DC for ; Sun, 18 Jan 2015 07:13:52 +0000 (UTC) Received: from localhost.localdomain (ip174-67-205-96.oc.oc.cox.net [174.67.205.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 374573406CA; Sun, 18 Jan 2015 07:13:51 +0000 (UTC) From: Zac Medico To: gentoo-portage-dev@lists.gentoo.org Cc: Zac Medico Subject: [gentoo-portage-dev] [PATCH] More >= atoms for autounmask USE changes (536392) Date: Sat, 17 Jan 2015 23:13:20 -0800 Message-Id: <1421565200-23147-1-git-send-email-zmedico@gentoo.org> X-Mailer: git-send-email 2.0.5 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: ea48b56a-1537-4e42-934e-e5fa7c4ff657 X-Archives-Hash: f46aad2cab9c695b66cbde67853f65a3 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