lib/checkout: Fix regression in subpath for regular files#854
Closed
cgwalters wants to merge 1 commit intoostreedev:masterfrom
Closed
lib/checkout: Fix regression in subpath for regular files#854cgwalters wants to merge 1 commit intoostreedev:masterfrom
cgwalters wants to merge 1 commit intoostreedev:masterfrom
Conversation
This is what caused the merge of coreos/rpm-ostree#652 to blow up, since ostreedev#848 landed right before we tried to merge it. When I was writing that PR I remember having an uncertain feeling since we were doing a `mkdirat` above, but at the time I thought we'd have test suite coverage...turns out we didn't. For backwards compatibility, we need to continue to do a `mkdirat` here of the parent. However...I can't think of a reason anyone would *want* that behavior. Hence, let's add a special trick - if the destination name is `.`, we skip `mkdirat()`. That way rpm-ostree for example can open a dfd for `/etc` and avoid the `mkdir`. Fold the subpath tests into `test-basic.sh` since it's not worth a separate file. Add a test case for checking out a file.
4 tasks
Member
|
Ahh, subtle! @rh-atomic-bot r+ 8c24082 |
|
☀️ Test successful - status-atomicjenkins |
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.
This is what caused the merge of
coreos/rpm-ostree#652
to blow up, since #848
landed right before we tried to merge it.
When I was writing that PR I remember having an uncertain feeling
since we were doing a
mkdiratabove, but at the time I thoughtwe'd have test suite coverage...turns out we didn't.
For backwards compatibility, we need to continue to do a
mkdirathere of theparent. However...I can't think of a reason anyone would want that behavior.
Hence, let's add a special trick - if the destination name is
., we skipmkdirat(). That way rpm-ostree for example can open a dfd for/etcand avoidthe
mkdir.Fold the subpath tests into
test-basic.shsince it's not worth a separatefile. Add a test case for checking out a file.