← Back to issue list

feat: allow applications to set build environment

View original Github issue

Metadata

Project
craft-parts
Number
#1608
Type
pull request
State
merged
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Merged in craft-parts#1608 via commit 0f7a4b1c, adding an application-level build environment whose defaults can be overridden by each part.

Resolution: closed resolved

Reason: PR #1608 was approved and merged into the main history as commit 0f7a4b1c. It implements build_environment support for the lifecycle manager and adds integration coverage for per-part overrides.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Add a `build_environment` parameter to the lifecycle manager allowing applications to pass default variables to be added to the build step environment. The variables can be overriden by the user in each part. - [ ] Have you followed the guidelines for contributing? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint && make test`? - [ ] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? --- CRAFT-5181 Note to reviewers: the entire environment building system is somewhat messy and should be refactored, but in a different PR. Then we can feed the application-defined environment variables into the refactored environment builder in an uniform way instead of just prepending to the rendered string.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in craft-parts#1608 via commit 0f7a4b1c, adding an application-level build environment whose defaults can be overridden by each part.
stealth/space-bunny-alpha — closed resolved Merged in canonical/craft-parts#1608 (commit 0f7a4b1c), adding build_environment defaults for applications with per-part user overrides and integration coverage.
qwen/qwen3.6-35b-a3b — — Merged implementation adding a build_environment parameter to the lifecycle manager, enabling applications to pass default build variables overridable per part. Includes integration tests and received approval from two reviewers.
qwen3.6-35b-a3b-mtp-q6 — — Merged a feature adding a build_environment parameter to the lifecycle manager, enabling applications to pass default build variables overridable per part. Includes an integration test for custom overrides. Author notes future refactoring.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#362 feat: add a method to enable craft-parts Features craft-application merged Merged craft-application#362 in commit 9ba1d2a8, adding an Application hook to enable craft-parts features after logging setup and before plugin setup.
71%
#170 feat: pass build environment to the parts lifecycle debcraft merged Merged PR #170 in commit a0afaae, passing dpkg-buildflags-derived environment variables into the parts lifecycle.
70%