GNU patch 2.7.6 always needs a strip option#57205
Open
OrangeDog wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
@terminalmage wrote this version of the state originally. |
Contributor
|
re-run all full |
cmcmarrow
previously approved these changes
Jul 17, 2020
Contributor
|
@waynew this is a good one for the Test Clinic |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #57205 +/- ##
==========================================
+ Coverage 70.69% 70.70% +0.01%
==========================================
Files 2232 2232
Lines 311250 311250
Branches 67176 67176
==========================================
+ Hits 220012 220040 +28
+ Misses 79193 79172 -21
+ Partials 12045 12038 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Fixes saltstack#52329 Without this, you get errors such as >No file to patch. Skipping patch. >1 out of 1 hunk ignored >can't find file to patch at input line 857 >Perhaps you should have used the -p or --strip option? There may be additional bugs like this if the target is not a directory. The solution should be to default `strip=0`.
Adds test_patch_single_file_absolute_paths to pin the already-applied detection behaviour for patches with absolute path headers. Also adds changelog/57205.fixed.md per project convention. Fixes saltstack#52329
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
When checking whether a patch applies in reverse, add the
-p0option.Without this, you get errors such as
There may be additional bugs like this if the target is not a directory. The solution should be to default
strip=0.What issues does this PR fix or reference?
Fixes: #52329
Previous Behavior
Once a patch has been applied, all further runs fail.
New Behavior
State now correctly detects whether the patch has been applied,
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes/No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.