Notify of package replacements when using noconfirm
Fixes FS#5179. Prints a notification of package replacements when updating the packages using the --noconfirm flag. Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
78e7342c16
commit
47e8dd0670
1 changed files with 13 additions and 5 deletions
|
@ -278,11 +278,19 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2,
|
||||||
*response = yesno(str);
|
*response = yesno(str);
|
||||||
break;
|
break;
|
||||||
case PM_TRANS_CONV_REPLACE_PKG:
|
case PM_TRANS_CONV_REPLACE_PKG:
|
||||||
|
if(!config->noconfirm) {
|
||||||
snprintf(str, LOG_STR_LEN, _(":: Replace %s with %s/%s? [Y/n] "),
|
snprintf(str, LOG_STR_LEN, _(":: Replace %s with %s/%s? [Y/n] "),
|
||||||
alpm_pkg_get_name(data1),
|
alpm_pkg_get_name(data1),
|
||||||
(char *)data3,
|
(char *)data3,
|
||||||
alpm_pkg_get_name(data2));
|
alpm_pkg_get_name(data2));
|
||||||
*response = yesno(str);
|
*response = yesno(str);
|
||||||
|
} else {
|
||||||
|
printf(_("Replacing %s with %s/%s\n."),
|
||||||
|
alpm_pkg_get_name(data1),
|
||||||
|
(char *)data3,
|
||||||
|
alpm_pkg_get_name(data2));
|
||||||
|
*response = 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case PM_TRANS_CONV_CONFLICT_PKG:
|
case PM_TRANS_CONV_CONFLICT_PKG:
|
||||||
snprintf(str, LOG_STR_LEN, _(":: %s conflicts with %s. Remove %s? [Y/n] "),
|
snprintf(str, LOG_STR_LEN, _(":: %s conflicts with %s. Remove %s? [Y/n] "),
|
||||||
|
|
Loading…
Add table
Reference in a new issue