commit:     b7abeab6041247a0b5f9d750fb5c85e6f573f90c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 19 15:38:22 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 19 15:38:56 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b7abeab6

sync: git: don't log on OK signature with --quiet

No point in emitting a message if everything is fine when the user asks
for --quiet.

Bug: https://bugs.gentoo.org/673624
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                                | 2 ++
 lib/portage/sync/modules/git/git.py | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 74b45f488d..11879d7c58 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,8 @@ Bug fixes:
 * sync (inc. emerge-webrsync): Handle https_proxy to help users who only have 
it set
   - the expectation is to have http_proxy set (bug #691434, bug #835927, bug 
#911629)
 
+* sync: git: respect --quiet more for PGP verification (bug #673624).
+
 * emerge-webrsync: Explicitly pass http_proxy or https_proxy into gemato
   via --proxy (bug #911629).
 

diff --git a/lib/portage/sync/modules/git/git.py 
b/lib/portage/sync/modules/git/git.py
index b73b07e32a..ead276a98d 100644
--- a/lib/portage/sync/modules/git/git.py
+++ b/lib/portage/sync/modules/git/git.py
@@ -418,6 +418,7 @@ class GitSync(NewBase):
 
         opts = self.options.get("emerge_config").opts
         debug = "--debug" in opts
+        quiet = self.settings.get("PORTAGE_QUIET") == "1"
 
         openpgp_env = self._get_openpgp_env(self.repo.sync_openpgp_key_path, 
debug)
 
@@ -459,7 +460,8 @@ class GitSync(NewBase):
                 return False
 
             if status == "G":  # good signature is good
-                out.einfo("Trusted signature found on top commit")
+                if not quiet:
+                    out.einfo("Trusted signature found on top commit")
                 return True
             if status == "U":  # untrusted
                 out.ewarn("Top commit signature is valid but not trusted")

Reply via email to