-
Notifications
You must be signed in to change notification settings - Fork 29
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
mkcomposefs --from-file
ignores last line without newline
#327
Comments
cgwalters
added a commit
to cgwalters/composefs
that referenced
this issue
Sep 5, 2024
I was doing some more testing and ended up crafting a dumpfile without a trailing newline. It took me a surprising amount of time to figure out that we just ignore data without a trailing newline. Change things to hard error here for now. If this breaks someone, we can probably downgrade this to a warning. Closes: containers#327 Signed-off-by: Colin Walters <walters@verbum.org>
I lean towards allowing the no-newline case, only because
Which as-documented to me only requires them to be separated by a newline but not terminated by one. So I think to keep the previously-published behavior it would be better to allow it. If it's disallowed, then at the very least the docs should be updated to reflect the requirement. |
cgwalters
added a commit
to cgwalters/composefs
that referenced
this issue
Sep 5, 2024
I was doing some more testing and ended up crafting a dumpfile without a trailing newline. It took me a surprising amount of time to figure out that we just ignore data without a trailing newline. Hopefully, this doesn't break anyone. Closes: containers#327 Signed-off-by: Colin Walters <walters@verbum.org>
OK I've updated #331 |
cgwalters
added a commit
to cgwalters/composefs
that referenced
this issue
Sep 5, 2024
I was doing some more testing and ended up crafting a dumpfile without a trailing newline. It took me a surprising amount of time to figure out that we just ignore data without a trailing newline. Hopefully, this doesn't break anyone. Closes: containers#327 Signed-off-by: Colin Walters <walters@verbum.org>
cgwalters
added a commit
to cgwalters/composefs
that referenced
this issue
Sep 6, 2024
I was doing some more testing and ended up crafting a dumpfile without a trailing newline. It took me a surprising amount of time to figure out that we just ignore data without a trailing newline. Hopefully, this doesn't break anyone. Closes: containers#327 Signed-off-by: Colin Walters <walters@verbum.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It took me an unfortunate amount of time to figure out that there's a bug in
tree_from_dump()
where basically we ignore the last chunk of a dumpfile if it doesn't end in a newline.The question is...what do we do about it? I guess it's probably unlikely someone was relying on this behavior, but it's hard to say that definitively.
I guess I lean towards changing the behavior to be an error (i.e. a trailing newline is required). But I am curious if others have opinions.
The text was updated successfully, but these errors were encountered: