snapcraft leaks build-environment across parts
Metadata
Current evaluation
Closed without comments. Reports snapcraft build-environment variables leaking across parts. Likely abandoned due to inactivity, with no explicit resolution or fix noted.
Suggested action: —
No scores available.
Issue body
Just came across this while testing the build-environment keyword, here is a simple reproducer:
name: test
version: "1.0"
summary: foo bar
description: foo bar baz
confinement: strict
grade: stable
base: core18
parts:
first:
plugin: nil
build-environment:
- FOO: bar
second:
plugin: nil
after: [ first ]
override-build: "echo FOO: $FOO"
I would expect the build-environment for part "second" to be empty, but it looks like the build-environment for part "first" is leaked into other parts that are built afterward:
$ SNAPCRAFT_BUILD_ENVIRONMENT=host snapcraft
Pulling first
'second' has dependencies that need to be staged: first
Skipping pull first (already ran)
Building first
Staging first
Pulling second
Skipping build first (already ran)
Building second
FOO: bar
Skipping stage first (already ran)
Staging second
Priming first
Priming second
Snapping 'test' |
Snapped test_1.0_amd64.snap
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed without comments. Reports snapcraft build-environment variables leaking across parts. Likely abandoned due to inactivity, with no explicit resolution or fix noted. | |
| qwen/qwen3.6-35b-a3b | — | — | Reported snapcraft build-environment leakage across parts was closed with no comments or resolution details. The outcome remains unclear as no fix or rejection was documented. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1822265 SNAPCRAFT_BUILD_ENVIRONMENT_* change doesn't apply to existing VMs | snapcraft (launchpad) | closed | Closed without resolution. SNAPCRAFT_BUILD_ENVIRONMENT_* changes failing to apply to existing VMs were left unaddressed with zero comments, indicating the report was abandoned or marked stale. | |
| #1868460 environment sections are reordered | snapcraft (launchpad) | closed | Closed without resolution due to inactivity. Snapcraft continues to alphabetically reorder environment sections, breaking variable dependencies that snapd relies on. The issue was abandoned. | |
| #1805212 snapcraft try (integrated with build environments) | snapcraft (launchpad) | closed | Closed with no comments or resolution details. The feature to integrate snapcraft try with build environments was likely abandoned or superseded by later releases. | |
| #1878498 [snapcraft 4.x] snapcraft fails when building parts with plugins that define custom config | snapcraft (launchpad) | closed | Reported snapcraft 4.x build failure with custom plugin configs was closed without a fix. Zero comments and labels indicate the report was abandoned or marked unactionable. | |
| #1531481 snapcraft should setup search paths/flags for parts built after parts | snapcraft (launchpad) | closed | Closed without resolution. The request to auto-configure search paths for dependent parts was abandoned. Later snapcraft updates added native environment propagation and part dependency handling, rendering the feature obsolete. | |
| #1882793 snapcraft doesn't remove the build.sh scripts after part cleanup | snapcraft (launchpad) | open | 2020 report that snapcraft clean leaves parts/*/run/build.sh behind, so build_environment changes don't propagate. No maintainer response in ~5 years; snapcraft 4.x is EOL and the craft-parts-based 8.x clean removes whole part dirs. | |
| #1816397 Modifying snapcraft.yaml with parts using local sources get dirty | snapcraft (launchpad) | closed | Closed without resolution or comments. Appears abandoned, with no fix or workaround implemented. | |
| #2008777 timeout if doing snapcraft pull and build seperately | snapcraft (launchpad) | closed | A report detailing a hang when running snapcraft pull and build separately was closed without comments or resolution, indicating it was abandoned. No fix or workaround was provided. | |
| #1897337 snapcraft build <part> ignores the part | snapcraft (launchpad) | closed | The snapcraft build command ignoring specified parts was closed without a fix or resolution. No comments or patches were provided, indicating the report was abandoned without addressing the filtering behavior. | |
| #1795655 refresh command ignores build environment | snapcraft (launchpad) | closed | Closed without resolution or discussion. The report indicated snapcraft refresh ignored the SNAPCRAFT_BUILD_ENVIRONMENT variable, but no fix or follow-up was recorded. |