Root layer caching
@GZGavinZhao is already working on this.
Since Jan 27, 2024.
- Dominant language
- Go
- Stars
- 24
- Forks
- 15
- Avg merge
- 13h 27m
- Merged PRs (30d)
- 3
Description
This is the design for caching our container root between subsequent builds on the same package. The container root will be reused as long as system.base, system.devel, and the package's dependencies remain the same. This will eliminate most if not all the time needed for fetching and installing dependencies.
To do this, we will need to have three overlays that are mounted and unmounted one after another. Relative paths are relative to /var/cache/solbuild/<profile>/<package>/.
- Overlay 1: for ensuring
system.base,system.devel, and other packages needed bysolbuildto function are at their latest version.- lower:
img - upper:
base - merged:
unionb - other mounts:
- eopkg package cache:
/var/cache/eopkg/packages
- eopkg package cache:
<hash-of-dependencies>is generated inside this overlay after everything is up-to-date.
- lower:
- Overlay 2: for installing the dependencies of the package to build. This overlay is only mounted if the layer doesn't exist already.
- lower:
img:base - upper:
/var/cache/solbuild/<layers>/<hash-of-dependencies>. This is the layer that will be cached and reused. - merged:
uniond - other mounts:
- eopkg package cache:
/var/cache/eopkg/packages
- eopkg package cache:
- lower:
- Overlay 3: for actually building the package
- lower:
img:base:/var/cache/solbuild/<layers>/<hash-of-dependencies> - upper:
tmp - merged:
union - other mounts:
- everything that we currently mount
- lower:
<hash-of-dependencies> is generated by ypkg-install-deps --dry-run --json (getsolus/ypkg#57).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.