repo: use host state for apt cache (CRAFT-488)
Metadata
Current evaluation
Merged into master. Replaces split stage cache with host apt cache by setting state directory to /var/lib/apt. Approved by two reviewers, passed CI, and achieved 100% coverage. Resolves CRAFT-488.
Suggested action: —
No scores available.
Issue body
Instead of having a split state for stage cache, rely on the
host's cache by setting the state directory to /var/lib/apt.
Co-authored-by: Chris Patterson <chris.patterson@canonical.com>
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged into master. Replaces split stage cache with host apt cache by setting state directory to /var/lib/apt. Approved by two reviewers, passed CI, and achieved 100% coverage. Resolves CRAFT-488. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Updates apt cache configuration to use the host state directory at /var/lib/apt instead of a split stage cache state. Achieved 100% diff coverage upon merge. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master as commit f817e34. Replaces split stage cache with host apt cache by setting state directory to /var/lib/apt, addressing CRAFT-488. Diff coverage 100%. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #118 packages/apt: use host state for apt cache (CRAFT-487) | craft-parts | merged | Merged. Replaces split stage apt cache with host cache at /var/lib/apt, removing update() and making refresh_stage_packages_list() a noop. Approved by two reviewers with passing CI. Compatible with snapcraft and craft-providers workflows. | |
| #1194 fix: correct file permissions for the apt cache | craft-parts | merged | Merged to correct apt cache file permissions, resolving the not owned by _apt error during package staging in managed builds. Approved by three reviewers with all CI checks passing. Requires craft-providers PR 813. | |
| #3983 repo: raise error when populating the apt cache directory fails | snapcraft | merged | Merged. Adds a helpful error when copying /etc/apt to the cache directory fails, resolving CRAFT-1421. Handles Ubuntu Pro and destructive mode edge cases without root privileges. Approved by two reviewers and passed CI. |