← Back to issue list

project loader: export SNAPCRAFT_TARGET_ARCH in build environment

View original Github issue

Metadata

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

Current evaluation

Merged PR #3414 (commit ff2cd96bb) added SNAPCRAFT_TARGET_ARCH to the global build environment in set_global_environment() for core22, alongside SNAPCRAFT_ARCH_TRIPLET.

Resolution: closed resolved

Reason: PR #3414 was approved and merged, landing as commit ff2cd96bb "project loader: export SNAPCRAFT_TARGET_ARCH in build environment (#3414)". The change is present in snapcraft/parts/lifecycle.py, where SNAPCRAFT_TARGET_ARCH is set from info.target_arch for core22 base projects, with a corresponding unit test in tests/unit/parts/test_lifecycle.py.

Evaluated by: mr-cal-bot

No scores available.

Issue body

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 #3414 (commit ff2cd96bb) added SNAPCRAFT_TARGET_ARCH to the global build environment in set_global_environment() for core22, alongside SNAPCRAFT_ARCH_TRIPLET.
stealth/space-bunny-alpha — closed resolved Merged PR #3414, exporting SNAPCRAFT_TARGET_ARCH in the project loader’s build environment. Approved by one reviewer; two files changed (+6/-2).
qwen/qwen3.6-35b-a3b — — Exported SNAPCRAFT_TARGET_ARCH in the build environment. Merged after single reviewer approval, modifying two files with six additions and two deletions.
qwen3.6-35b-a3b-mtp-q6 — — Merged changes exporting SNAPCRAFT_TARGET_ARCH in the project loader build environment. Maintainer cjp256 submitted the update, which was accepted without comments or revisions.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3415 cli: enable SNAPCRAFT_TARGET_ARCH envvar matching --target-arch snapcraft closed Closed unmerged with changes requested. Superseded by merged PR #3414 (ff2cd96bb), which exported SNAPCRAFT_TARGET_ARCH in the project loader's build environment instead of adding a CLI envvar option.
81%
#3418 project: always set target arch even if not cross compiling snapcraft merged Merged PR #3418 in commit a05e64594, setting an explicit target architecture for native and cross builds and consistently defining SNAPCRAFT_TARGET_ARCH.
78%
#1768 project: export the arch triplet into the environment snapcraft merged Merged PR #1768 (5df5ab8d5) exports SNAPCRAFT_ARCH_TRIPLET to build-script environments, fixing #1752.
75%
#4313 environment: add build-on and build-for envvars for core20 snapcraft merged Merged PR #4313 as 93a9d8170, adding core20 SNAPCRAFT build-on/build-for architecture and triplet environment variables plus tests.
75%
#1997752 base core20: wrong arch triplet snapcraft (launchpad) closed Wrong SNAPCRAFT_ARCH_TRIPLET for core20 build-on/run-on builds fixed by adding SNAPCRAFT_ARCH_BUILD_ON/BUILD_FOR and *_TRIPLET_BUILD_FOR envvars (PR #4313, commit 93a9d8170); follow-up #4332 (48bd0632f) errors on unevaluable multi-arch cases.
74%
#3568 cli: enable SNAPCRAFT_TARGET_ARCH envvar matching --target-arch snapcraft closed Closed unmerged after maintainers rejected expanding environment-variable support for CLI options; SNAPCRAFT_TARGET_ARCH was not accepted as an alternative to --target-arch.
74%
#3821 meta: architectures snapcraft merged Merged core22 architecture support, including build-on/build-for handling, host and build-instance selection, and SNAPCRAFT_BUILD_FOR filtering, via commit 4876b53.
73%
#4332 environment: error when build-for arch variable cannot be evaluated snapcraft merged Merged PR #4332 (48bd0632f) now errors on unevaluable core20 SNAPCRAFT_ARCH_BUILD_FOR and SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR variables instead of producing "None".
72%
#1752 export the arch triplet variable during build time snapcraft closed Maintainer-requested feature shipped in PR #1768 (commit 5df5ab8d5): SNAPCRAFT_ARCH_TRIPLET is now exported into build-script environments; issue closed as implemented.
72%
#2122 many: introduce variables for part src and build snapcraft merged Merged in commit 31307b5de via #2122, adding source/build directory variables and centralizing SNAPCRAFT_* environment handling; resolved LP #1763028.
72%