[PATCH] g10: support --quiet for --send-key

Robin H. Johnson robbat2 at gentoo.org
Tue Apr 9 19:48:16 CEST 2019


The --recv-key command supports --quiet, but --send-key does not.
Add support for it for parity and better scripting.

Signed-off-by: Robin H. Johnson <robbat2 at gentoo.org>
---
 g10/keyserver.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/g10/keyserver.c b/g10/keyserver.c
index 66900f7a9..e5fc011c0 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -1814,9 +1814,10 @@ keyserver_put (ctrl_t ctrl, strlist_t keyspecs)
         log_error (_("skipped \"%s\": %s\n"), kspec->d, gpg_strerror (err));
       else
         {
-          log_info (_("sending key %s to %s\n"),
-                    keystr (keyblock->pkt->pkt.public_key->keyid),
-                    ksurl?ksurl:"[?]");
+	  if (!opt.quiet)
+            log_info (_("sending key %s to %s\n"),
+                      keystr (keyblock->pkt->pkt.public_key->keyid),
+                      ksurl?ksurl:"[?]");
 
           err = gpg_dirmngr_ks_put (ctrl, data, datalen, keyblock);
           release_kbnode (keyblock);
-- 
2.21.0




More information about the Gnupg-devel mailing list