From 7cf28a75959eac03a12c471a01f0a6111fbbd0ce Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Wed, 21 Nov 2007 01:03:08 +0100 Subject: Improved 'dependency cycle' warning From now on libalpm informs user about packages which will be installed/removed in wrong order. Signed-off-by: Nagy Gabor Signed-off-by: Dan McGee --- lib/libalpm/deps.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 0c79a25b..ac07c0b7 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -187,7 +187,14 @@ alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode) vertex = nextchild; } else if(nextchild->state == -1) { - _alpm_log(PM_LOG_WARNING, _("dependency cycle detected\n")); + pmpkg_t *vertexpkg = vertex->data; + pmpkg_t *childpkg = nextchild->data; + _alpm_log(PM_LOG_WARNING, _("dependency cycle detected:\n")); + if(mode == PM_TRANS_TYPE_REMOVE) { + _alpm_log(PM_LOG_WARNING, _("%s will be removed after its %s dependency\n"), vertexpkg->name, childpkg->name); + } else { + _alpm_log(PM_LOG_WARNING, _("%s will be installed before its %s dependency\n"), vertexpkg->name, childpkg->name); + } } } if(!found) { -- cgit v1.2.3-24-g4f1b