From ee3b70c4a9f3564a6ec4bf9823189e217ab66dc9 Mon Sep 17 00:00:00 2001 From: Connor Behan Date: Wed, 17 Apr 2013 02:04:04 -0700 Subject: 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 Signed-off-by: Allan McRae --- src/pacman/callback.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3-24-g4f1b