* [gentoo-portage-dev] [PATCH] slot_conflict_handler: report packages that can't be rebuilt (bug 602964)
@ 2016-12-18 13:58 99% Zac Medico
0 siblings, 0 replies; 1+ results
From: Zac Medico @ 2016-12-18 13:58 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Zac Medico
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
---
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..64147c9 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 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 = ""
--
2.7.4
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-12-18 13:58 99% [gentoo-portage-dev] [PATCH] slot_conflict_handler: report packages that can't be rebuilt (bug 602964) Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox