summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-01-13 12:27:17 -0600
committerDan McGee <dan@archlinux.org>2008-01-13 12:27:17 -0600
commit521de7ceedc6e4f5df52c0380f536a6f13a7f578 (patch)
tree1b6d86158a19b3156c23cb81ee90f291ca85f9b3 /src
parent4f267017936471c8248a85f8d86aabb96e66c7e8 (diff)
parentbbe02ec57fd56670dfe0bc08d981ce8a1aa31370 (diff)
downloadpacman-521de7ceedc6e4f5df52c0380f536a6f13a7f578.tar.xz
Merge branch 'maint'
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] "),