diff options
Diffstat (limited to 'src/pacman/callback.c')
-rw-r--r-- | src/pacman/callback.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index e83a97d2..1dd3ffba 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 = noyes(_(":: %s and %s are in conflict. Remove %s?"), + (char *)data1, + (char *)data2, + (char *)data2); + } else { + *response = noyes(_(":: %s and %s are in conflict (%s). Remove %s?"), + (char *)data1, + (char *)data2, + (char *)data3, + (char *)data2); + } break; case PM_TRANS_CONV_REMOVE_PKGS: { @@ -275,7 +285,7 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2, printf(_(":: the following package(s) cannot be upgraded due to " "unresolvable dependencies:\n")); list_display(" ", namelist); - *response = yesno(_("\nDo you want to skip the above " + *response = noyes(_("\nDo you want to skip the above " "package(s) for this upgrade?")); alpm_list_free(namelist); } @@ -294,6 +304,12 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2, (char *)data1); break; } + if(config->noask) { + if(config->ask & event) { + /* inverse the default answer */ + *response = !*response; + } + } } /* callback to handle display of transaction progress */ |