[pacman-dev] [PATCH] Unify front and backend responses for --print
Connor Behan
connor.behan at gmail.com
Wed Apr 17 05:04:04 EDT 2013
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 at gmail.com>
---
src/pacman/callback.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 71d9d04..16d66df 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) {
--
1.8.2.1
More information about the pacman-dev
mailing list