-
Notifications
You must be signed in to change notification settings - Fork 334
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
--force
should not remove the output when it fails
#3083
Comments
Another side-issue, this happens when the output dir is a btrfs subvolume, the original file can be removed, but |
Delaying removal until the end probably wouldn't work since the very last operation, copying the new initrd to the output dir could fail with Would you be OK with handling this in |
Yes, that sounds good to me. |
@aafeijoo-suse The failure to copy is because we remount a bunch of directories read-only in mkosi to avoid messing with the host system when running as root. Seems that logic should be a little smarter |
Hmm, a quick test with this approach doesn't seem good enough when the output is compressed or there are multiple output files:
|
Hmm yeah so mkosi is fundamentally a tool that produces multiple output files. Though if we're just building an initrd we definitely shouldn't be producing that many files, only the extra symlink really |
I don't know how to handle this in |
This isn't trivial to handle in mkosi either. We have many implicit checks that rely on the fact that we empty the output directory first. You can probably handle it in |
This is exactly what I'm doing everywhere when I call |
mkosi commit the issue has been seen with
main
Used host distribution
openSUSE Tumbleweed
Used target distribution
No response
Linux kernel version used
No response
CPU architectures issue was seen on
None
Unexpected behaviour you saw
Maybe for building OS images this is not critical, but for building initrds it does not look good... Maybe keep a backup copy of the current output image file or dir until mkosi exists with success, or delay removal until the end.
Used mkosi config
No response
mkosi output
The text was updated successfully, but these errors were encountered: