-
Notifications
You must be signed in to change notification settings - Fork 305
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
checkout: honor opaque checkouts #1486
Conversation
@nalind does this implementation look good to you? |
e39b942
to
d1fc1d9
Compare
d1fc1d9
to
7984b3a
Compare
Dropping the WIP label as I think it is ready for review |
7984b3a
to
5bedcad
Compare
5bedcad
to
1b9ce05
Compare
b413b02
to
a6fc88d
Compare
05fc070
to
72b6720
Compare
tests are passing |
72b6720
to
7334ffd
Compare
/cc @cgwalters |
A little bit more information - a link to some other code that handles this format e.g. - would be useful in the commit message or as a code comment. This is a serialization of the
from the kernel |
{ | ||
is_opaque_whiteout = (g_str_equal (fname, OPAQUE_WHITEOUT_NAME)); | ||
if (is_opaque_whiteout) | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I don't quite understand is why we're looping over all of the children here. Doesn't there need to be name matching against the target somehow? Or hmm...is the serialization that there's exactly one child with that name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am looking for a child ".wh..wh..opq" and it needs to have exactly that name. I didn't find a better way for having this search in O(1). Is there a better way to look for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am looking for a child ".wh..wh..opq" and it needs to have exactly that name.
My question is - should that be the only child?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, there can be other children and they will appear normally in the directory. The ".wh..wh..opq" file is only to hide anything that is in the lower layers, but the same layer can add more content
This PR came after the comment here: containers/storage#137 (comment) What I've done is:
what this file does is to rm -rf every entry in the directory where it is present so that I'll amend more information in the commit message |
if a file ".wh..wh..opq" is present in a directory, delete anything from lower layers that is already in that directory. Signed-off-by: Giuseppe Scrivano <[email protected]>
7334ffd
to
035e693
Compare
⚡ Test exempted: merge already tested. |
OK, thanks! I think I understand now. Just in general though I really prefer if even nearly trivial changes have some sort of rationale. For example in c9a9e6c I could have just said "Add bindings section" since it's really obvious what I'm doing but even there I added a why I'm doing it. Another example is: This is a far from trivial change and I think deserved a commit message; thanks for fleshing it out a bit! We should probably still add comments to the code but not blocking on that since the previous code didn't have a lot either (and in some places in libostree we're relatively decent with comments, others not so much). |
And sorry again about the delay here...I think I must have missed notifications, and I sort of use the default github PR viewer as a "review stack" but this one got too buried. Wish there was a way to change that view to default to "recently changed" and not "initial creation time". |
no problem :-) I've left it marked as WIP for a long time. Also, for reference, I've used this Dockerfile to get an opaque checkout:
Once it is imported into ostree I see:
|
Signed-off-by: Giuseppe Scrivano [email protected]