← Back to issue list

customize snapcraft environment based on architecture.

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1744608
Type
issue
State
open
Author
~bsutton
Labels
architecture environment snapcraft
Created
Updated
Closed

Current evaluation

Feature request to support architecture-conditional (on/else) syntax in the apps environment key, currently limited to stage-packages. Open since 2019 with no comments or maintainer response; grammar support has since expanded to more part keywords but app environment remains unaddressed.

Suggested action: needs triage

Reason: The issue is a well-scoped feature request (grammar/on-else for app environment variables) with zero comments, no labels beyond topic tags, and no maintainer interaction in ~8.5 years, so it has never been triaged. Grammar support has since been extended to more part keywords (e.g. build-environment, build-snaps) per commit history, but the apps.environment key is not in the grammar-processed keys list (snapcraft/parts/grammar.py _KEYS), so the request remains unimplemented and worth a maintainer decision.

Impact: 40 Quick Win: 18.0 Staleness: 85 Complexity: 55 Confidence: 70 Support Request: 10

Issue body

I'm doing raspberry pi development and use an environment variable to enable/disable a hardware simulator. When the snap is being deployed into a test (non-arm64) environment I need to set a number of environment variables to enable the simulator and disable the loading of the .so file (the application is java but the hardware interface is in a .so). I came across the 'on' 'else' keywords and they look perfect for this sort of problem. I want to be able to write: apps:     pi-gation:       command: tomcat-launch       daemon: simple       plugs: [network, network-bind]       environment:       on arm64:             PI4J_PLATFORM : RaspberryPi GPIO Provider        else:           PI4J_PLATFORM : Simulated           SimulatedPlatform : RaspberryPi GPIO Provider Currently the on..else keywords are only supported for the 'stage-packages' key word. on..else should be supported for setting environment variables. Possibly the concept should be considered for a number of other properties.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 40
Quick Win: 18.0
Staleness: 85
Complexity: 55
Confidence: 70
Support Request: 10
needs triage Feature request to support architecture-conditional (on/else) syntax in the apps environment key, currently limited to stage-packages. Open since 2019 with no comments or maintainer response; grammar support has since expanded to more part keywords but app environment remains unaddressed.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 60
Confidence: 85
Support Request: 10
close stale Feature request to support conditional on/else syntax for environment variables in snapcraft. No maintainer response or activity in over 8 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 65
Confidence: 85
Support Request: 10
close stale Request to extend snapcraft's on/else conditional syntax to environment variables based on architecture. Unaddressed for over 8 years with no maintainer interaction or comments.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 45
Confidence: 75
Support Request: 10
close stale Feature request to support conditional on/else syntax for environment variables in snapcraft. Currently only works for stage-packages. Unaddressed for over 8 years with no maintainer interaction.
qwen3.6-35b-moe-q4
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
close stale Feature request to extend snapcraft's on/else conditional syntax to environment variables for architecture-specific configs. No maintainer response or activity in over 8 years.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft (launchpad)#1648665 (confidence 60%)

    Architecture-specific sources for parts, closed as fixed via env-var-based per-arch staging; related mechanism for the same underlying need of arch-conditional configuration.

Related issues

Issue Project State Summary Similarity
#1831752 Missing grammar for conditional configflags on/to architecture snapcraft (launchpad) open Feature request to add per-architecture conditional grammar support for configflags in snapcraft parts, matching existing build-packages/stage-packages grammar. Open 7+ years with no labels, no maintainer response, and zero comments; unassessed.
71%