[Rpm-maint] [rpm-software-management/rpm] Issue %patchN deprecation warning just once (PR #2388)
Michal Domonkos
notifications at github.com
Wed Feb 8 14:08:38 UTC 2023
Avoid polluting the build log with this warning repeated as many times as there are %patchN lines. Once per build should be enough for the packager to notice (there's also a warning summary now).
Basically, make the warning context-independent, meaning that it doesn't matter which line caused it (so don't even print it), we just want to warn about such usage being present in the SPEC.
Suppressing duplicate log messages could be a useful feature on its own so we may eventually want to implement this in rpmlog() with something like a RPMLOG_NODUP flag (and perhaps print the number of suppressed messages in the summary, too) but until then, just keep it simple and use a static int.
Rather than adding another %patch to hello2-suid.spec which is also used elsewhere in the test suite, just make a simplified clone dedicated to %patch testing.
Fixes: #2383
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/2388
-- Commit Summary --
* Issue %patchN deprecation warning just once
-- File Changes --
M build/parsePrep.c (9)
A tests/data/SPECS/hello-patch.spec (22)
M tests/rpmbuild.at (5)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/2388.patch
https://github.com/rpm-software-management/rpm/pull/2388.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2388
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2388 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230208/932de5f3/attachment.html>
More information about the Rpm-maint
mailing list