many: introduce variables for part src and build
Metadata
Current evaluation
Merged in commit 31307b5de via #2122, adding source/build directory variables and centralizing SNAPCRAFT_* environment handling; resolved LP #1763028.
Resolution: closed resolved
Reason: PR #2122 was approved and merged as commit 31307b5de. It introduced SNAPCRAFT_PART_SRC and SNAPCRAFT_PART_BUILD path variables and resolved Launchpad bug #1763028.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [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] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
This PR resolves [LP: #1763028](https://bugs.launchpad.net/snapcraft/+bug/1763028) by adding new environment variables (and replacements) for part src and build directories. It also refactors the `SNAPCRAFT_*` environment handling to happen in one place instead of multiple.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in commit 31307b5de via #2122, adding source/build directory variables and centralizing SNAPCRAFT_* environment handling; resolved LP #1763028. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #2122 (31307b5de), adding part source/build directory variables and centralizing SNAPCRAFT_* environment handling to resolve LP #1763028. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/snapcraft#2122 (31307b5de), adding part src/build environment variables and replacements, and consolidating SNAPCRAFT_* environment handling. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged following approval. Introduces new environment variables and replacements for part src and build directories, resolving LP #1763028. Consolidates SNAPCRAFT_* environment handling into a single location. Approved by one reviewer with passing CI checks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to resolve LP: #1763028. Introduces environment variables for part source and build directories. Refactors SNAPCRAFT_* environment handling into a single centralized location. |
Update history
No update history recorded yet.
Related work
-
Related To:
snapcraft (launchpad)#1763028
(confidence 100%)
Launchpad bug requesting variables for part source and build directories; PR #2122 explicitly resolved it.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1763028 Need variables for src and build dirs | snapcraft (launchpad) | closed | Added SNAPCRAFT_PART_SRC, SRC_WORK, BUILD and BUILD_WORK variables via snapcore/snapcraft#2122, commit 31307b5de. | |
| #2534 Add SNAPCRAFT_PROJECT_DIR environment variable. | snapcraft | merged | Merged PR #2534 (commit 3d4483d6f, 'project loader: add SNAPCRAFT_PROJECT_DIR environment variable') by tonysimpson, fixing Launchpad bug 1824417; the var still ships in snapcraft/parts/lifecycle.py global environment. | |
| #757 Export important project variables | snapcraft | merged | Merged PR #757 (commit dc0b68174) exports SNAPCRAFT_PROJECT_NAME, SNAPCRAFT_PROJECT_VERSION, SNAPCRAFT_PROJECT_STAGE and per-part SNAPCRAFT_PART_INSTALL, refactoring _expand_env into the project loader so variables work in fixed yaml fields. LP #1588336. | |
| #5753 feat: adopt component variables | snapcraft | merged | Merged PR #5753 (SNAPCRAFT-65, SNAPCRAFT-1056) added component variables so craftctl can set component versions for core22 and core24 snaps, closing #5240. Commits: 6b6f7d9ee, 766562286. | |
| #3414 project loader: export SNAPCRAFT_TARGET_ARCH in build environment | snapcraft | merged | Merged PR #3414 (commit ff2cd96bb) added SNAPCRAFT_TARGET_ARCH to the global build environment in set_global_environment() for core22, alongside SNAPCRAFT_ARCH_TRIPLET. | |
| #3748 parts: define variables and expand them in snapcraft.yaml | snapcraft | merged | Merged PR #3748 in commit fba20a970, adding global and step-specific SNAPCRAFT_* variables for snapcraft.yaml expansion and lifecycle environments. | |
| #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. | |
| #5727 docs: document custom project vars (SNAPCRAFT-1053) | snapcraft | merged | Merged in canonical/snapcraft#5727 as cba259a0d, documenting custom project variables for SNAPCRAFT-1053 after the work moved from canonical/craft-parts#1216. |