legacy: install unpinned build packages
Metadata
Current evaluation
Merged PR #3915 as commit 3a54031cb, changing legacy build-package installation to use unpinned packages and capture installed versions, avoiding apt downgrades or removals.
Resolution: closed resolved
Reason: PR #3915 was merged as commit 3a54031cb. It backported canonical/craft-parts#245 to install build packages without pins and record their actual versions afterward.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Collect installed package versions after the installation.
This allows us to collect the real version whilst avoiding a bug in apt where it would downgrade or remove a package in cases where the pinned version cannot be satisfied.
This is a backport of the corresponding change in craft-parts.
Co-authored-by: Sergio Schvezov <sergio.schvezov@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/)?
- [x] Have you successfully run `make lint`?
- [ ] Have you successfully run `pytest tests/unit`?
-----
CRAFT-1328
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3915 as commit 3a54031cb, changing legacy build-package installation to use unpinned packages and capture installed versions, avoiding apt downgrades or removals. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3915 as commit 3a54031cb, backporting craft-parts#245 to install unpinned build packages and capture post-install versions, avoiding apt downgrades or removals. | |
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a backport from craft-parts to install unpinned build packages. Collecting installed versions post-installation prevents an apt bug that downgrades or removes packages when pinned versions are unsatisfiable. Code coverage remains unchanged. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/craft-parts#245
(confidence 99%)
Original craft-parts implementation explicitly backported by snapcraft PR #3915.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #245 packages: install unpinned | craft-parts | merged | Merged #245 via 3d247048: apt now installs unpinned package names and collects actual installed versions afterward, avoiding downgrades or removals when pins cannot be satisfied. | |
| #3221 repo: install requested build-package versions | snapcraft | merged | Merged PR #3221 (commit 727c46f22) restored installation of versioned build packages, using --allow-downgrades so requested apt versions are honored. |