[PATCH] Show 'public key already present' warning only in verbose mode

Christian Aistleitner christian at quelltextlich.at
Tue Dec 18 18:51:37 CET 2012


* g10/pkclist.c (find_and_check_key): Show 'public key already present'
warning only in verbose mode.
(build_pk_list): Ditto.
---
 g10/pkclist.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/g10/pkclist.c b/g10/pkclist.c
index f805da8..baa15ab 100644
--- a/g10/pkclist.c
+++ b/g10/pkclist.c
@@ -837,7 +837,10 @@ find_and_check_key (ctrl_t ctrl, const char *name, unsigned int use,
      list.  */
   if (!key_present_in_pk_list (*pk_list_addr, pk))
     {
-      log_info (_("%s: skipped: public key already present\n"), name);
+      if (opt.verbose)
+      {
+        log_info (_("%s: skipped: public key already present\n"), name);
+      }
       free_public_key (pk);
     }
   else
@@ -945,8 +948,11 @@ build_pk_list (ctrl_t ctrl,
               if (key_present_in_pk_list(pk_list, pk) == 0)
                 {
                   free_public_key (pk); pk = NULL;
-                  log_info (_("%s: skipped: public key already present\n"),
-                            rov->d);
+                  if (opt.verbose)
+                  {
+                    log_info (_("%s: skipped: public key already present\n"),
+                              rov->d);
+                  }
                 }
               else
                 {
-- 
1.7.8.6

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: </pipermail/attachments/20121218/4c042490/attachment.pgp>


More information about the Gnupg-devel mailing list