From 706d6bca554febbd28d74518e38bf8ce502f2480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Nizio?= Date: Sat, 6 Aug 2016 20:41:27 +0200 Subject: [PATCH] [solo.commands,lib] improve message about conflicted packages Don't show the package itself. If there are no revdeps, nothing would be shown so a custom "(no reverse dependencies)" message will appear, which is clearer. --- client/solo/commands/_manage.py | 16 +++++++++++++++- lib/entropy/client/interfaces/dep.py | 4 +++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/client/solo/commands/_manage.py b/client/solo/commands/_manage.py index bf0609804..199daaa92 100644 --- a/client/solo/commands/_manage.py +++ b/client/solo/commands/_manage.py @@ -518,9 +518,22 @@ class SoloManage(SoloCommand): header=brown(" # "), level="warning") + if not pkg_revdeps[pkg_match]: + entropy_client.output( + "(%s: %s)" % ( + green(_("required by")), + # Conflicting dependencies could have been + # specified by user, in which case they were + # not pulled in by anything. + teal(_("(no reverse dependencies)")),), + header=blue(" "), + level="info") + continue + for pkg_revdep in pkg_revdeps[pkg_match]: pkg_revdep_id, pkg_revdep_repo = pkg_revdep - revdep_repo = entropy_client.open_repository(pkg_revdep_repo) + revdep_repo = \ + entropy_client.open_repository(pkg_revdep_repo) entropy_client.output( "(%s: %s%s%s)" % ( @@ -530,6 +543,7 @@ class SoloManage(SoloCommand): purple(pkg_revdep_repo),), header=blue(" "), level="info") + entropy_client.output("", level="warning") entropy_client.output( diff --git a/lib/entropy/client/interfaces/dep.py b/lib/entropy/client/interfaces/dep.py index 4e467b68e..52bc611c1 100644 --- a/lib/entropy/client/interfaces/dep.py +++ b/lib/entropy/client/interfaces/dep.py @@ -2302,7 +2302,9 @@ class CalculatorsMixin: for _pkg_matches in _colliding_deps: for _pkg_match in _pkg_matches: _pkg_node = graph.get_node(_pkg_match) - _pkg_revdeps[_pkg_match] = [x.origin().item() for x in _pkg_node.arches()] + _pkg_revdeps[_pkg_match] = [x.origin().item() for \ + x in _pkg_node.arches() if \ + not _pkg_node.is_arch_outgoing(x)] graph.destroy() raise DependenciesCollision((_colliding_deps, _pkg_revdeps))