diff options
author | Nagy Gabor <ngaba@bibl.u-szeged.hu> | 2009-08-31 16:20:18 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-09-09 04:58:52 +0200 |
commit | 12b55958d8884bd6828e0888ab9dc10d38bcd72f (patch) | |
tree | 9d39d359eec670463a3b806aa6de61154b2059e3 /src/pacman/callback.c | |
parent | 902dfe5900c89461e76f03a3429a867cc93fd418 (diff) | |
download | pacman-12b55958d8884bd6828e0888ab9dc10d38bcd72f.tar.gz pacman-12b55958d8884bd6828e0888ab9dc10d38bcd72f.tar.xz |
Add a new reason field to pmconflict_t struct
Sometimes "foo conflicts with bar" information is not enough, see this
thread: http://bbs.archlinux.org/viewtopic.php?id=77647. That's why I added
a new reason field to our pmconflict_t struct that stores the packager-
defined conflict that induced the fact that package1 conflicts with
package2.
I modified the front-end (in callback.c, sync.c, upgrade.c) to print this
new information as well.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Diffstat (limited to 'src/pacman/callback.c')
-rw-r--r-- | src/pacman/callback.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 8b611f1a..9376ab6c 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -259,10 +259,20 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2, alpm_pkg_get_name(data2)); break; case PM_TRANS_CONV_CONFLICT_PKG: - *response = yesno(_(":: %s conflicts with %s. Remove %s?"), - (char *)data1, - (char *)data2, - (char *)data2); + /* data parameters: target package, local package, conflict (strings) */ + /* print conflict only if it contains new information */ + if(!strcmp(data1, data3) || !strcmp(data2, data3)) { + *response = yesno(_(":: %s and %s are in conflict. Remove %s?"), + (char *)data1, + (char *)data2, + (char *)data2); + } else { + *response = yesno(_(":: %s and %s are in conflict (%s). Remove %s?"), + (char *)data1, + (char *)data2, + (char *)data3, + (char *)data2); + } break; case PM_TRANS_CONV_REMOVE_PKGS: { |