summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-08-25 11:25:24 +0300
committerPanu Matilainen <pmatilai@redhat.com>2022-08-30 09:48:57 +0300
commit6a91d392b99498fc54e9f292399c4e2e6beefe87 (patch)
tree427381ffbd49b4818149b0e04e3cbf056f80c773
parent3bb7120d685f048107f5f7b2da6a8116c0e8857c (diff)
downloadrpm-6a91d392b99498fc54e9f292399c4e2e6beefe87.tar.gz
Allow suppressing key import lint warnings
Hack to allow suppressing key import lint warning messages. Emitting warning messages depending on verbosity level is ugly but for the case at hand (different output between PGP backends on CI) it's probably the lesser evil here. Initial patch by Neal H. Walfield. (cherry pick of 866a23544114112eaee70ea3fed8d7dbb3e65059.)
-rw-r--r--lib/rpmts.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rpmts.c b/lib/rpmts.c
index 0b6b7ac6b..c17ac7950 100644
--- a/lib/rpmts.c
+++ b/lib/rpmts.c
@@ -621,7 +621,9 @@ 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);
+ /* XXX Hack to ease testing between different backends */
+ if (rpmIsNormal())
+ rpmlog(RPMLOG_WARNING, "%s\n", lints);
}
free(lints);
}