[Rpm-maint] [rpm-software-management/rpm] %autopatch -m/-M fall through silently if no patches are in range (Issue #3093)
Panu Matilainen
notifications at github.com
Mon May 13 11:56:41 UTC 2024
hello-autopatch.spec in our testsuite has this:
```
%patchlist
hello-1.0-modernize.patch
hello-1.0-install.patch
%prep
%autosetup -N
%autopatch 1
%autopatch -m 2
```
Spot the error? Automatic patch numbers start from zero, so we're telling it to apply hello-1.0-install.patch and then any higher numbered patches, so the modernize patch is never applied.
There are legitimate reasons to conditionally skip patches, but having a ranged patch that doesn't actually do anything should at least emit a warning.
How did we find out? Fedora 40 introduced stricter, more modern C compilation settings (https://fedoraproject.org/wiki/Changes/PortingToModernC ) and suddenly we had a test-case go red because it wasn't applying a patch it's supposed to, to address this very issue.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3093
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3093 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240513/118fa71c/attachment.html>
More information about the Rpm-maint
mailing list