← Back to issue list

repo: install requested build-package versions

View original Github issue

Metadata

Project
snapcraft
Number
#3221
Type
pull request
State
merged
Author
cjp256
Labels
Created
Updated
Closed

Current evaluation

Merged fix for unimplemented build-package version installation. Explicitly specifies apt package versions and enables downgrades to resolve LP: #1887960. Approved and passed CI checks.

Suggested action:

No scores available.

Issue body

It either was never implemented, or has been broken for a long time. However, it is documented as supported, so install the build-package versions as requested. This requires passing '--allow-downgrades' to apt, in case the user changes the desired build-package. Additionally, now the version for each apt package is explicitly specified for apt-get install. LP: #1887960 Signed-off-by: Chris Patterson <chris.patterson@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 fix for unimplemented build-package version installation. Explicitly specifies apt package versions and enables downgrades to resolve LP: #1887960. Approved and passed CI checks.
qwen3.6-35b-a3b-mtp-q6 Merged fix to install requested build-package versions by explicitly specifying apt package versions and adding the --allow-downgrades flag. Resolves LP: #1887960 and is available in edge/pr-3221.
qwen3.6-35b-a3b-mtp-q6 Merged. Resolves LP: #1887960 by explicitly specifying apt package versions and enabling --allow-downgrades to correctly install requested build-package versions. Deployed to edge/pr-3221.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
77%
#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.
75%
#2023 repo: catch error due to broken build packages snapcraft merged Resolved broken build package errors by introducing BuildPackagesNotInstalledError and falling back to apt-get for detailed conflict messages. Merged after reviewer approval and passing CI checks.
75%
#891 repo: apt-mark new build-packages as automatically installed snapcraft merged Merged. Marks new build packages as automatically installed to enable cleanup via apt-get autoremove. Approved, updated with integration tests, rebased to resolve conflicts, minor fixes applied, and merged.
73%
#3035 repo: fix resolution of virtual build packages snapcraft merged Merged fix for virtual build package resolution regression. Ensures proper resolution and versioning persistence for build and stage packages, adds logging, and includes unit and spread tests. Approved and passed CI.
72%
#3915 legacy: install unpinned build packages snapcraft merged Merged a craft-parts backport that collects installed package versions post-installation. This resolves an apt bug causing unwanted downgrades or removals when pinned versions cannot be satisfied. Approved, passed CI, and maintained coverage.
70%
#3047 repos: fix returned strings for install_stage_packages() snapcraft merged Merged fix for install_stage_packages() to return resolved version strings instead of raw apt.Version objects. Updated unit tests to use PropertyMocks. Resolves LP #1873349. Approved by one reviewer with passing CI checks.
70%