From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D4EC8139085 for ; Mon, 19 Dec 2016 05:15:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1ACC5E0E0E; Mon, 19 Dec 2016 05:15:49 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DE2E0E0E0E for ; Mon, 19 Dec 2016 05:15:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 80B8C340E7B for ; Mon, 19 Dec 2016 05:15:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7D0F624BA for ; Mon, 19 Dec 2016 05:15:45 +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: <1482123207.ddbe020d9385f8b70e4ec6f085d3afa7271949d7.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/resolver/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/resolver/slot_collision.py X-VCS-Directories: pym/_emerge/resolver/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: ddbe020d9385f8b70e4ec6f085d3afa7271949d7 X-VCS-Branch: master Date: Mon, 19 Dec 2016 05:15:45 +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: 762c5ebf-4b14-4dd4-8f96-56f9325200b5 X-Archives-Hash: 667b315191f90c380d806fb5d4841698 commit: ddbe020d9385f8b70e4ec6f085d3afa7271949d7 Author: Zac Medico gentoo org> AuthorDate: Sun Dec 18 12:39:59 2016 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Dec 19 04:53:27 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ddbe020d slot_conflict_handler: report packages that can't be rebuilt (bug 602964) Report packages that need to be rebuilt in order to solve slot conflicts, but cannot be rebuilt for some reason. The following reasons will be detected: * matched by --exclude argument * matched by --useoldpkg-atoms argument * ebuild is masked or unavailable Example output: !!! The slot conflict(s) shown above involve package(s) which may need to !!! be rebuilt in order to solve the conflict(s). However, the following !!! package(s) cannot be rebuilt for the reasons shown: (sys-apps/less-480:0/0::gentoo, installed): ebuild is masked or unavailable X-Gentoo-bug: 602964 X-Gentoo-bug-url: https://bugs.gentoo.org/602964 Acked-by: Brian Dolbec gentoo.org> pym/_emerge/resolver/slot_collision.py | 37 ++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/resolver/slot_collision.py b/pym/_emerge/resolver/slot_collision.py index cfb5885..f676b38 100644 --- a/pym/_emerge/resolver/slot_collision.py +++ b/pym/_emerge/resolver/slot_collision.py @@ -241,6 +241,8 @@ class slot_conflict_handler(object): Print all slot conflicts in a human readable way. """ _pkg_use_enabled = self.depgraph._pkg_use_enabled + usepkgonly = "--usepkgonly" in self.myopts + need_rebuild = {} verboseconflicts = "--verbose-conflicts" in self.myopts any_omitted_parents = False msg = self.conflict_msg @@ -394,6 +396,29 @@ class slot_conflict_handler(object): selected_for_display.update( best_matches.values()) elif type in ("soname", "slot"): + # Check for packages that might need to + # be rebuilt, but cannot be rebuilt for + # some reason. + for ppkg, atom, other_pkg in parents: + if not (isinstance(ppkg, Package) and ppkg.installed): + continue + if not (atom.soname or atom.slot_operator_built): + continue + if self.depgraph._frozen_config.excluded_pkgs.findAtomForPackage(ppkg, + modified_use=self.depgraph._pkg_use_enabled(ppkg)): + selected_for_display.add((ppkg, atom)) + need_rebuild[ppkg] = 'matched by --exclude argument' + elif self.depgraph._frozen_config.useoldpkg_atoms.findAtomForPackage(ppkg, + modified_use=self.depgraph._pkg_use_enabled(ppkg)): + selected_for_display.add((ppkg, atom)) + need_rebuild[ppkg] = 'matched by --useoldpkg-atoms argument' + elif usepkgonly: + # This case is tricky, so keep quiet in order to avoid false-positives. + pass + elif not self.depgraph._equiv_ebuild_visible(ppkg): + selected_for_display.add((ppkg, atom)) + need_rebuild[ppkg] = 'ebuild is masked or unavailable' + for ppkg, atom, other_pkg in parents: selected_for_display.add((ppkg, atom)) if not verboseconflicts: @@ -611,10 +636,18 @@ class slot_conflict_handler(object): msg.append(colorize("INFORM", "NOTE: Use the '--verbose-conflicts'" " option to display parents omitted above")) - msg.append("\n\n") - else: msg.append("\n") + if need_rebuild: + msg.append("\n!!! The slot conflict(s) shown above involve package(s) which may need to\n") + msg.append("!!! be rebuilt in order to solve the conflict(s). However, the following\n") + msg.append("!!! package(s) cannot be rebuilt for the reason(s) shown:\n\n") + for ppkg, reason in need_rebuild.items(): + msg.append("%s%s: %s\n" % (indent, ppkg, reason)) + msg.append("\n") + + msg.append("\n") + def get_explanation(self): msg = ""