← Back to issue list

fix: correct file permissions for the apt cache

View original Github issue

Metadata

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

Current evaluation

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.

Suggested action:

No scores available.

Issue body

- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? ----- Fixes "not owned by _apt" error message when staging packages in managed builds. Requires https://github.com/canonical/craft-providers/pull/813 to be merged as well.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b 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.
qwen3.6-35b-a3b-mtp-q6 Merged fix correcting apt cache file permissions to resolve "not owned by _apt" errors during package staging in managed builds. Depends on craft-providers PR #813.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#961 build(deps): update craft-parts and craft-providers rockcraft merged Merged following two approvals and passing CI. Updates craft-parts and craft-providers to grant _apt write access to the staging deb cache, resolving #937. Upstream linting issues were noted but did not block the merge.
76%
#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.
74%
#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.
74%
#1183 fix: allow for apt to drop privileges when fetching stage-packages craft-parts closed Merged to fix apt privilege dropping during stage-packages fetching. All CI checks passed, and the maintainer-submitted fix was accepted without review comments.
74%
#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.
73%
#2403 fix: correct the permission command for craft-state charmcraft merged Merged a one-line fix correcting the permission command for craft-state, resolving issue #2402. Approved by two reviewers and merged following maintainer coordination, despite minor CI failures on older Ubuntu versions.
72%
#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.
72%
#1098 build: update craft-providers rockcraft merged Merged update to the craft-providers dependency to resolve recurring snapd watch errors in spread tests. Approved by two reviewers and passed CI checks. The change modifies three files with minor adjustments.
72%
#1292 fix: clean the package cache when underlying layers are cleaned craft-parts merged Merged fix ensuring package cache layers are cleaned when underlying layers are removed. Resolves #1229 and CRAFT-4728. Passed CI, approved by two reviewers, and rebased onto main before merge.
71%