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>
This commit is contained in:
parent
9f9cf95692
commit
ee3b70c4a9
1 changed files with 5 additions and 0 deletions
|
@ -309,6 +309,11 @@ void cb_question(alpm_question_t event, void *data1, void *data2,
|
||||||
void *data3, int *response)
|
void *data3, int *response)
|
||||||
{
|
{
|
||||||
if(config->print) {
|
if(config->print) {
|
||||||
|
if(event == ALPM_QUESTION_INSTALL_IGNOREPKG) {
|
||||||
|
*response = 1;
|
||||||
|
} else {
|
||||||
|
*response = 0;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch(event) {
|
switch(event) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue