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:29:37 +0000 (11:29 +0100)
* g10/pkclist.c (build_pk_list): Print two diagnostics only in
non-quiet mode.
--

(back-ported from commit 8325d616593187ff227853de0295e3269b96edcb)

g10/pkclist.c

index c1f5333..85a8eeb 100644 (file)
@@ -842,8 +842,9 @@ build_pk_list( strlist_t rcpts, PK_LIST *ret_pk_list, unsigned int use )
               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
                 {
@@ -1122,8 +1123,9 @@ build_pk_list( strlist_t rcpts, PK_LIST *ret_pk_list, unsigned int use )
                   if (!key_present_in_pk_list(pk_list, pk))
                     {
                       free_public_key(pk); pk = NULL;
-                      log_info(_("%s: skipped: public key already present\n"),
-                               remusr->d);
+                      if (!opt.quiet)
+                        log_info(_("%s: skipped: public key already present\n"),
+                                 remusr->d);
                     }
                   else
                     {