gpg: Suppress "public key already present" in quiet mode.
authorWerner Koch <wk@gnupg.org>
Wed, 19 Dec 2012 10:21:26 +0000 (11:21 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 19 Dec 2012 10:21:26 +0000 (11:21 +0100)
* g10/pkclist.c (find_and_check_key, build_pk_list): Print a
diagnostic only in non-quiet mode.

g10/pkclist.c

index f805da8..e1a4428 100644 (file)
@@ -837,7 +837,8 @@ 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.quiet)
+        log_info (_("%s: skipped: public key already present\n"), name);
       free_public_key (pk);
     }
   else
@@ -945,8 +946,9 @@ 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.quiet)
+                    log_info (_("%s: skipped: public key already present\n"),
+                              rov->d);
                 }
               else
                 {