repos: fix returned strings for install_stage_packages()
Metadata
Current evaluation
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.
Suggested action: —
No scores available.
Issue body
Instead of returning `<package>=<version>`, it was returning
`<package>=<apt.Version>`. Resolve the version string which
is the intended return value.
Fix unit tests to cover this. Switch to using PropertyMocks,
as the MagicMock(wraps=...) did not work as I had expected.
LP #1873349
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 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix correcting install_stage_packages() to return resolved version strings instead of apt.Version objects. Updated unit tests using PropertyMocks and resolves LP #1873349. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for install_stage_packages() to return resolved version strings instead of raw apt.Version objects. Unit tests updated to use PropertyMocks. Resolves LP #1873349. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #3221 repo: install requested build-package versions | snapcraft | merged | 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. |