summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConnor Behan <connor.behan@gmail.com>2013-04-17 02:04:04 -0700
committerAllan McRae <allan@archlinux.org>2013-04-18 13:26:16 +1000
commitee3b70c4a9f3564a6ec4bf9823189e217ab66dc9 (patch)
tree538ea8a3292ec8155305c4527af47f903cac5592 /src
parent9f9cf95692d9399d1528635a70ce873cd0518449 (diff)
downloadpacman-ee3b70c4a9f3564a6ec4bf9823189e217ab66dc9.tar.xz
Unify front and backend responses for --print
When libalpm asks the user a question, there are two possible defaults. One default for pacman (used when the user presses enter without typing and for --noconfirm) and the libalpm default. Currently the libalpm default gets used for the pacman "--print" option. This affects the printing of ignored packages since the defaults differ for "ALPM_QUESTION_INSTALL_IGNOREPKG". Adjust the response of this case when using --print so pacman acts consistently. Signed-off-by: Connor Behan <connor.behan@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/callback.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 71d9d04d..16d66df7 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -309,6 +309,11 @@ void cb_question(alpm_question_t event, void *data1, void *data2,
void *data3, int *response)
{
if(config->print) {
+ if(event == ALPM_QUESTION_INSTALL_IGNOREPKG) {
+ *response = 1;
+ } else {
+ *response = 0;
+ }
return;
}
switch(event) {