[Rpm-maint] [rpm-software-management/rpm] Pass patch path and ordinal as 1st and 2nd arguments to %autopatch backends (1d7b45e)
proyvind
notifications at github.com
Sun Jan 29 13:43:18 UTC 2017
Actually, we ended up solving this different in cooker, where in stead of patching rpm for support, but rather by adding support for %{_specfile}, we got the patch numbers differently:
%apply_patches %{lua:\
f = io.open(rpm.expand("%{_specfile}"))\
if f then\
for l in f:lines() do\
match,b,num = string.find(string.lower(l), "^%s*patch(%d+)%s*:.*$")\
if match then print(rpm.expand("%patch"..num.." -p1 -b "..string.format(".%04d~",num).." \\\n")); end\
end\
f:close()\
end\
}
(Notice that we also made sure to reuse the traditional %patch macro to fully achieve same functionality of without maintaining two sets of different patch macros.
IMO. this is the cleanest, least complex and easiest way to maintain it..
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/commit/1d7b45e484883f3a340f40610b060cc100f62caa#commitcomment-20654362
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170129/a4daca53/attachment.html>
More information about the Rpm-maint
mailing list