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

Neal H. Walfield notifications at github.com
Thu Aug 18 11:41:13 UTC 2022


@nwalfield commented on this pull request.



> @@ -621,7 +621,11 @@ 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);
+            if ((rpmtsVSFlags(ts) & RPMVSF_NOLINT)) {
+                // Don't show lints when --nolint is provided.

I'm happy to make the change.  But, I just want to be clear what it means.

`pgpPubKeyLint` detects two types of things: hard errors and soft errors (things that look suspicious, but aren't necessarily wrong).  From [my documentation](https://gitlab.com/sequoia-pgp/rpm-sequoia/-/blob/main/src/lib.rs#L1092):

```
/// Lints the first certificate in pkts.
///
/// This function links the certificate according to the current
/// [policy].  It warns about things like unusable subkeys, because they
/// do not have a valid binding signature.  It will also generate a
/// warning if there are no valid, signing-capable keys.
///
/// There are four cases:
///
/// - The packets do not describe a certificate: returns an error and
///   sets `*explanation` to `NULL`.
///
/// - The packets describe a certificate and the certificate is
///   completely unusable: returns an error and sets `*explanation` to
///   a human readable explanation.
///
/// - The packets describe a certificate and some components are not
///   usable: returns success, and sets `*explanation` to a human
///   readable explanation.
///
/// - The packets describe a certificate and there are no lints:
///   returns success, and sets `*explanation` to `NULL`.
```

The change your are proposing would turn off detecting these hard errors.  Please ack that that is really what you want.

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

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


More information about the Rpm-maint mailing list