New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add deprecated %apply_patch, provide an alternative #1668
Add deprecated %apply_patch, provide an alternative #1668
Conversation
31a317c
to
d3bde71
Compare
d3bde71
to
ae82e01
Compare
Adding -n is fine (funny how such obvious things don't get noticed), but I don't want %apply_patch back, and testing for the error seems over the top, just document -n to override -m and -M. |
What about this: I'll finally shut up about |
Sorry but I'm finding the level of noise and bargaining quite excessive for the case. For an immediately backwards compatible version (for rpm >= 4.15), use |
I am just trying to make my life easier here, nothing more. Removals have negative impact on others :( I'll open a PR with just |
FWIW, I think that deprecation+eventual removal is the way to go in this case. If the macro was exposed, but not actually used, it'd be OK to quickly yank it out. But clearly it is in use, and we know that the removal breaks packages that are out there. I appreciate the desire to make a clean break, but rpm is a foundational package that needs to preserve backwards compatibility. |
As usual, a bit of AFK gave some helpful perspective: -n is actually a rather strange corner-case to be considering. What makes more sense is have %autopatch accept arguments, that way it's not limited to one-at-a-time special fubar and can be made to handle both paths and numbers. I'll try to supply a PR implementing that tomorrow. |
So... it all ends up being rather cumbersome because -m and -M are a cumbersome way of specifying ranges, but now we're kinda stuck with them. Me thinks it'd make a whole lot more sense to have ranges expressable in All of which is to say, I don't have that PR yet, but working on it. |
I wonder if |
That's a good point, it'd require "escaping" with |
Note that Python ranges don't include the ending number. If you use them please keep the semantics to avoid confusion for Pythonistas. |
Um? Maybe "range" in Python has some special meaning I'm not aware of, I guess in Python lingo what I meant is slice syntax, which can have all three variants: |
Hmm, but then we can nowadays have macros opt out of option processing. Already forgotten that... (f951643) |
Sorry, I've meant that ranges/slices include start but not the end. I.e.
Yes, but that way, no backports would be possible. |
Oh, that. Yeah I ran into it in Python just recently, caused some head-scratching before realizing that's how it's supposed to work. So we'd confuse somebody no matter which behavior was used... |
The %apply_patch ship sailed already and resurrecting it at this point would only add to the mess, closing. Thanks for the feedback + ideas though! |
This is how I'd deal with the removal of %apply_patch.
I opened it as draft, because I have not tested the implementation yet, it also needs tests and documentation. But before I dive into that, I'd like to know if this is acceptable.