summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan McRae <mcrae_allan@hotmail.com>2008-01-01 08:01:52 +0100
committerDan McGee <dan@archlinux.org>2008-01-13 19:21:36 +0100
commit47e8dd0670f14ae2a1efe25fc920d1d46cdec586 (patch)
tree58865743b22a6a3eeac786dc2613ffacac468fb0 /src
parent78e7342c1625f9cba399b89ab58a20599ae12c5a (diff)
downloadpacman-47e8dd0670f14ae2a1efe25fc920d1d46cdec586.tar.gz
pacman-47e8dd0670f14ae2a1efe25fc920d1d46cdec586.tar.xz
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>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/callback.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index dddbc275..9742d7f0 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -278,11 +278,19 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2,
*response = yesno(str);
break;
case PM_TRANS_CONV_REPLACE_PKG:
- snprintf(str, LOG_STR_LEN, _(":: Replace %s with %s/%s? [Y/n] "),
- alpm_pkg_get_name(data1),
- (char *)data3,
- alpm_pkg_get_name(data2));
- *response = yesno(str);
+ if(!config->noconfirm) {
+ snprintf(str, LOG_STR_LEN, _(":: Replace %s with %s/%s? [Y/n] "),
+ alpm_pkg_get_name(data1),
+ (char *)data3,
+ alpm_pkg_get_name(data2));
+ *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;
case PM_TRANS_CONV_CONFLICT_PKG:
snprintf(str, LOG_STR_LEN, _(":: %s conflicts with %s. Remove %s? [Y/n] "),