← Back to issue list

packages/apt: use host state for apt cache (CRAFT-487)

View original Github issue

Metadata

Project
craft-parts
Number
#118
Type
pull request
State
merged
Author
cjp256
Labels
Created
Updated
Closed

Current evaluation

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.

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. With this, we can remove the update() interface which is no longer required. This effectively causes the refresh_stage_packages_list() to noop. Signed-off-by: Chris Patterson <chris.patterson@canonical.com> - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b 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.
qwen3.6-35b-a3b-mtp-q6 Merged changes to use the host apt cache at /var/lib/apt instead of a split stage cache. The update() interface was removed and refresh_stage_packages_list() now no-ops, aligning with craft-parts cache unification.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3585 repo: use host state for apt cache (CRAFT-488) snapcraft merged 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.
92%
#43 packages: add support to apt cache operations craft-parts merged Merged PR adding apt cache operations for package retrieval. Approved by two reviewers and passed CI. Follows snapcraft standards and is planned for future migration to a separate project.
75%
#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.
74%
#1122 repo: cache stage packages for faster future use. snapcraft merged Merged to fix Snapcraft ignoring cached stage packages. The implementation uses fetch_binary for reliable retrieval and copies the cache into cleanbuild containers for robustness. Approved by two reviewers.
72%
#3086 repo: restore marked-install strategy for apt-cache snapcraft merged Merged after approval and CI. Restores the marked-install strategy for apt-cache by refactoring AptCache for safe cache handling. Fixes a primed-stage-packages parsing bug and improves stage package dependency management.
70%