-
Notifications
You must be signed in to change notification settings - Fork 330
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
Enable more and less error prone caching #1756
Comments
Do you already have a list of those options or should we collect them here? One I am currently stumbling over is changes in ‣ Refreshing partition table…
Partition #1 contains a vfat signature.
The last usable GPT sector is 6815790, but 8912935 is requested.
Failed to add #2 partition: Invalid argument |
I noticed that presets in mkosi are roughly analogous to layers in a container image. IdeaLet's say I have an multi-preset build like the one used by systemd:
Now I perform one build. Possible implementationsLet the user choose what needs to be rebuilt via command line parametersThis requires only a tiny code change but probably works well if used with existing build systems. The build system invoking mkosi would know what external dependencies a preset depends on and can tell mkosi what needs to be rebuilt. Actually check all inputs for a preset and understand what has changedThis could be a lot of work in practice. Mkosi would essentially need to record all inputs for a preset (Trees, resolved packages, the exact configuration, probably more) and decide itself if a preset needs to be rebuilt. It would the need to rebuild the changed presets and all of the presets that depend on changed presets transitively. Possible alternativesYou can define layers by having separate folders with their own mkosi config and let them depend on each other (by referencing the outputs from one directory in the basetree of another directory). I think this would make mkosi an optimal build tool for systemd sysext and full os images. |
I completely agree, but we should do this properly by checking all the inputs. We should also make this easy to debug by providing an informative diff if requested of what's causing a rebuild to happen. We can either use |
Currently,
--incremental
has some very basic cache invalidation based on whether the list of configured packages changed or not. This is not sufficient for multiple reasons:For checking for tree changes, we can probably use
systemd-dissect --mtree
to and diff the mtree output to see what changed. We should also make sure the diffs between caches are displayed in --debug mode to allow debugging why we don't reuse the cache and rebuild the image.We should also support appending existing cache images where we install more packages into the existing cached image instead of rebuilding it from scratch.
The text was updated successfully, but these errors were encountered: