#Don't post-install hooks from package
1 messages · Page 1 of 1 (latest)
Yeah they are the biggest wrench for sure, but at least so far they don't destroy it.
Practically speaking, when installing the package dag for a few high-ish level things (e.g. I tested w/htop, vim and curl), the only packages that actually used pre/post install hooks were some of the super low-level ones like busybox and ca-certificates. Since those appear so early in the DAG, the caching ends up working out even if you technically need to actually create the merged filesystem in order to run those hooks.
After that it's just a matter of refining with more optimizations over time:
- MergeOp is already optimized in that it uses hardlinks to merge inputs rather than copying files, so even if you do need to run a package hook you avoid consuming endless disk space for every permutation of package DAG underneath the ExecOp. This in combination w/ stargz and similar would be especially powerful here.
- Tons of heuristics would be possible in terms of merging packages that have hooks as early as possible so that running any of those hooks causes minimal splash damage to caching
- Allowing users to disable hooks for packages; I've heard this being done before though I'm not sure if it's a legit thing to do or just an awful hack 😄