fix: use `build-for` when evaluating project variables
Metadata
Current evaluation
Merged #335 fixed BUILD_FOR project-variable evaluation by passing the build-for architecture to craft-parts; released in craft-application 2.6.3 and adopted by snapcraft#4779.
Resolution: closed resolved
Reason: PR #335 merged after review to correct project-variable expansion using build-for. Snapcraft adopted the fix by upgrading to craft-application 2.6.3 in #4779 at commit 3e3428ec1, resolving snapcraft#4770.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the guidelines for contributing?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `tox`?
-----
As raised in Matrix ([source](https://matrix.to/#/!GGqzbFAUQprdPgYYCM:ubuntu.com/$ZP99NnFr-54yU3HEmz_LtWcaNtp8oxgHJ4pnix1uvNQ?via=ubuntu.com&via=matrix.org&via=kde.org)), `BUILD_FOR` variables aren't evaluated correctly because the `build-for` arch was not passed to craft-parts.
Builds on #334, so review last 2 commits only.
Fixes https://github.com/canonical/snapcraft/issues/4770
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #335 fixed BUILD_FOR project-variable evaluation by passing the build-for architecture to craft-parts; released in craft-application 2.6.3 and adopted by snapcraft#4779. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged fix makes project-variable evaluation use build-for, correcting BUILD_FOR expansion. canonical/snapcraft#4779 later resolved the linked bug in craft-application 2.6.3 (3e3428ec1). | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for BUILD_FOR variable evaluation by passing the build-for architecture to craft-parts. Resolves snapcraft issue #4770. Approved by two reviewers, passed CI, and merged after rebasing onto the hotfix/2.6 branch. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/snapcraft#4770
(confidence 100%)
This was the upstream bug explicitly fixed by #335.
-
Likely Fixed By:
canonical/snapcraft#4779
(confidence 99%)
Merged at 3e3428ec1 to consume craft-application 2.6.3 containing the fix.
-
Related To:
canonical/craft-application#334
(confidence 98%)
#335 was based on the preceding YAML-transform ordering fix.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4314 Raise error when using `BUILD_FOR` envvars on multi-arch and unknown builds | snapcraft | closed | Fixed by PR #4332 (commit 48bd0632f), which makes Snapcraft error when BUILD_FOR architecture variables cannot be evaluated for multi-arch or unknown-architecture builds. |