← Back to issue list

repo: consider virtual pkgs for cache invalidation

View original Github issue

Metadata

Project
snapcraft
Number
#3177
Type
pull request
State
merged
Author
sergiusens
Labels
Created
Updated
Closed

Current evaluation

Merged. Updates cache invalidation to include virtual packages, adding a warning to discourage their use for deterministic builds. Refactors AptCache logic for better separation of concerns. Approved by one reviewer and passed CI.

Suggested action:

No scores available.

Issue body

Virtual packages were not considered when checking if all build-packages are satisfied between runs. Check and resolve with a warning to avoid use of virtual packages for deterministic results. Logic has shifted a bit to avoid exposing more functionality from AptCache and have a nicer separation of concerns. LP: #1883546 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] 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. Updates cache invalidation to include virtual packages, adding a warning to discourage their use for deterministic builds. Refactors AptCache logic for better separation of concerns. Approved by one reviewer and passed CI.
qwen3.6-35b-a3b-mtp-q6 Merged to fix cache invalidation by accounting for virtual packages, preventing non-deterministic builds. Refactored logic to avoid exposing AptCache internals and improve separation of concerns. Resolves LP: #1883546.
qwen3.6-35b-a3b-mtp-q6 Merged a fix to include virtual packages in cache invalidation checks for build dependencies. The update adds a warning for deterministic builds and refactors AptCache exposure to improve separation of concerns. Resolves LP: #1883546.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3411 repo: only install build packages marked for installation snapcraft merged Merged a fix updating apt_cache.get_marked_packages() to exclude packages marked for deletion. The function now only returns packages intended for installation, letting apt handle removals. Approved and merged after passing CI.
73%
#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.
71%
#1185 repo: add version support for build-packages snapcraft merged Merged after adjusting apt_cache to exclude package versions, adding version support for build-packages. Rebased changes were re-applied and tests passed. Approved by two reviewers.
71%
#677 playing with caching snapcraft merged Merged caching implementation to resolve Launchpad bug #1593380. Approved by reviewers and passes CI. Modifies six files to cache apt downloads, reducing subsequent build times.
71%
#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.
71%