[Rpm-maint] [rpm-software-management/rpm] Fix expected test output when using Sequoia. (PR #2063)

Panu Matilainen notifications at github.com
Mon Jun 27 06:06:43 UTC 2022


@pmatilai commented on this pull request.



> @@ -621,7 +621,14 @@ rpmRC rpmtsImportPubkey(const rpmts ts, const unsigned char * pkt, size_t pktlen
         if (krc != RPMRC_OK) {
             rpmlog(RPMLOG_ERR, "%s\n", lints);
         } else {
-            rpmlog(RPMLOG_WARNING, "%s\n", lints);
+            // Don't show the warning if --quiet was provided.  With
+            // --quiet, RPMLOG_WARNING messages are still shown, but
+            // RPMLOG_NOTICE are not.  We can't use RPMLOG_NOTICE
+            // here, as the output needs to go to stdderr.  So, we
+            // check the warning level explicitly.
+            if (rpmIsNormal()) {
+                rpmlog(RPMLOG_WARNING, "%s\n", lints);

After way too much time and pondering (sorry about that):

This would set a bad precedent, nak. Either it's a warning and needs to be output on all normal verbosity levels, or it's something else, in which case it must not use RPMLOG_WARNING. That the other non-error levels output to stdout is a general rpm limitation (see #962) that we'll just have to live with.

One possible way around this would be adding a separate --nolint or such option which would make pgpPubkeyLint() not called at all, which would then suppress the warning. Only I'm not sure where to stick such a flag, rpmVSFlags_e maybe :thinking: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2063#pullrequestreview-1019649051
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2063/review/1019649051 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220626/5187c4d7/attachment-0001.html>


More information about the Rpm-maint mailing list