providers: set environment according to directory inside instances
Metadata
Current evaluation
Merged after approval and passing CI. Sets environment variables based on the directory inside instances to enable manual part building during debugging. Increased overall coverage by 0.01%.
Suggested action: —
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] Have you successfully run `make lint`?
- [X] Have you successfully run `pytest tests/unit`?
-----
When in a part's build directory inside an instance, the environment variables are set. This allows a user to manually build a part when debugging.
Builds on https://github.com/canonical/craft-parts/pull/303
~TODO - add unit tests~
(CRAFT-1412)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged after approval and passing CI. Sets environment variables based on the directory inside instances to enable manual part building during debugging. Increased overall coverage by 0.01%. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into main. Configures environment variables based on the directory inside instances, enabling manual part building for debugging. Builds on craft-parts PR #303. Passed lint, tests, and maintainer approval before integration. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Configures environment variables based on the directory inside instances to enable manual part building for debugging. Builds on craft-parts PR #303. Approved by @sergiusens and merged with 100% diff coverage. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3434 build providers: clean environment if project directory is changed | snapcraft | merged | Merged into master. Fixes environment cleanup when project directories are relocated or reused. The build provider now tracks the directory path, verifies compatibility, and automatically cleans the environment on mismatch. Approved and passed CI. | |
| #3956 providers: log message when changing environment variables | snapcraft | merged | Merged into main. Adds a log message to notify users when environment variables update upon entering a part's build directory. Approved and passed CI checks. |