[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.
This commit is contained in:
Sławomir Nizio
2016-08-06 20:41:27 +02:00
parent e96db09ad7
commit 706d6bca55
2 changed files with 18 additions and 2 deletions

View File

@@ -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(

View File

@@ -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))