[Rpm-maint] [rpm-software-management/rpm] Fix sinfoCmp to order signatures correctly (PR #3194)
Panu Matilainen
notifications at github.com
Tue Jul 30 09:46:35 UTC 2024
@pmatilai commented on this pull request.
> /* Take care not to override a previous failure with success */
- if (res > vd->type[sinfo->type])
- vd->type[sinfo->type] = res;
+ if (severity > vd->type[sinfo->type]) {
+ vd->type[sinfo->type] = severity;
Don't. Don't abuse a completely unrelated field when there's no reason to do so, just because you think you might get away with it. This is an internal struct, if you need a severity field then add it. And since it can then be used to aid sorting these items, maybe it'll all fall into place more naturally that way. For one, using a nicer data structure (now that we have plenty available) might make it all much saner.
This verification callback fubar was written under RHEL deadline pressure six years ago and isn't exactly one of my pridest moments...
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3194#pullrequestreview-2207210910
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3194/review/2207210910 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240730/5c2b7ca3/attachment.html>
More information about the Rpm-maint
mailing list