repo: only install build packages marked for installation
Metadata
Current evaluation
Merged PR #3411 in commit e5f3422af, limiting apt build-package installation to packages explicitly marked for installation, excluding those marked for deletion.
Resolution: closed resolved
Reason: The approved PR was merged into snapcraft as commit e5f3422af. It replaced the broader marked-package query with one that accurately selects build packages marked for installation.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Ubuntu usage of apt_cache.get_marked_packages() assumes any
marked package is marked for installation. However, it may
contain packages marked for deletion.
Modify get_marked_packages() to get_packages_marked_for_installation()
to accurately capture the required build packages to install. Apt
will handle deletion as necessary.
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 |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3411 in commit e5f3422af, limiting apt build-package installation to packages explicitly marked for installation, excluding those marked for deletion. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #3411 (e5f3422af) to install only build packages apt marks for installation, excluding those marked for deletion; apt handles necessary removals. | |
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix updating apt_cache.get_marked_packages() to get_packages_marked_for_installation(). This prevents including packages marked for deletion, ensuring only build packages intended for installation are captured while Apt handles removals. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #2023 repo: catch error due to broken build packages | snapcraft | merged | Merged PR #2023 (commit aa8f5f2b4) catches failed build-package installation and reports apt dependency conflicts via BuildPackagesNotInstalledError. |