Skip to content
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

Support individual patch application in %autopatch #1697

Merged
merged 3 commits into from Jun 18, 2021

Conversation

pmatilai
Copy link
Member

@pmatilai pmatilai commented Jun 4, 2021

There are cases where "apply 'em all" doesn't cut it, and passing
-m and -M is cumbersome for individual patches. Add support for
applying individual patches by passing their numbers as arguments,
update documentation.

@hroncok
Copy link
Contributor

hroncok commented Jun 4, 2021

So, no ranges after all?

I think the documentation would benefit form some examples. I'll write some down.

@hroncok
Copy link
Contributor

hroncok commented Jun 4, 2021

%autopatch                -- applies all patches defined in the spec file, in the definition order
%autopatch -m 100         -- applies all patches numbered 100 or higher, in the definition order
%autopatch -M 99          -- applies all patches numbered 99 or lower, in the definition order
%autopatch -m 200 -M 299  -- applies all patches numbered 2xx, in the definition order
%autopatch 1              -- applies patch number 1
%autopatch 4 5 2 3 6      -- applies specified patches in the order of the arguments

Also, I've noticed the commit message should probably say %autopatch, not %autosetup (unless %autosetup also supports the arguments).

@pmatilai pmatilai changed the title Support individual patch application in %autosetup Support individual patch application in %autopatch Jun 4, 2021
@pmatilai
Copy link
Member Author

pmatilai commented Jun 4, 2021

Doh, should say "%autopatch" of course, not setup. That's what you get for writing commit messages in a hurry. Will fix, thanks for spotting. Further docs and examples in particular probably belong to manual/autosetup.md rather than the macro file.

And yeah I was getting stuck with the ranges so thought we can always add them later.

There are cases where "apply 'em all" doesn't cut it, and passing
-m and -M is cumbersome for individual patches. Add support for
applying individual patches by passing their numbers as arguments,
update documentation.
@pmatilai
Copy link
Member Author

Docs added, polished the autosetup page a little while at it.

@pmatilai
Copy link
Member Author

No further comments in two weeks, I guess we're sufficiently done here...

@pmatilai pmatilai merged commit f101c8c into rpm-software-management:master Jun 18, 2021
@hroncok
Copy link
Contributor

hroncok commented Jun 18, 2021

No further comments in two weeks, I guess we're sufficiently done here...

Well, it was 1 day since you posted the recent update, not 2 weeks.

@pmatilai
Copy link
Member Author

Sure but that was just for the docs. I'm in a bit of a hurry to wrap things up for a beta before my vacation...

@pmatilai pmatilai deleted the autopatch-args-pr branch June 21, 2021 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants