When only downloading a package that is in IgnorePkg, pacman
incorrectly asks about installing.

e.g. with <pkg> in IgnorePkg in pacman.conf:

> pacman -Sddw <pkg>
:: <pkg> is in IgnorePkg/IgnoreGroup. Install anyway? [Y/n]

This output is now silenced when downloading only.

Signed-off-by: Allan McRae <al...@archlinux.org>
---

This moves the hiding of the output to the pacman callback rather than doing it
in the libalpmm backend as previously submitted.  Note this is the same as how
the similar output issue with PM_TRANS_CONV_LOCAL_NEWER is handled.


 src/pacman/callback.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index f1c314f..4a02574 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -256,8 +256,12 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void 
*data2,
 {
        switch(event) {
                case PM_TRANS_CONV_INSTALL_IGNOREPKG:
-                       *response = yesno(_(":: %s is in IgnorePkg/IgnoreGroup. 
Install anyway?"),
-                                                         
alpm_pkg_get_name(data1));
+                       if(!config->op_s_downloadonly) {
+                               *response = yesno(_(":: %s is in 
IgnorePkg/IgnoreGroup. Install anyway?"),
+                                                                 
alpm_pkg_get_name(data1));
+                       } else {
+                               *response = 1;
+                       }
                        break;
                case PM_TRANS_CONV_REPLACE_PKG:
                        *response = yesno(_(":: Replace %s with %s/%s?"),
-- 
1.7.5.4


Reply via email to