Install snapd from a user-defined channel
Metadata
Current evaluation
Enhancement to allow installing snapd from a user-defined channel via CRAFT_SNAPD_CHANNEL env var. Triaged, under maintainer discussion.
Suggested action: keep open
Reason: The issue is triaged and has active maintainer discussion (mr-cal and lengau commented within the last 135 days about injecting the snapd snap). It's a valid enhancement request with clear implementation steps outlined in the body, not a stale or irrelevant issue.
Impact:
30
Quick Win:
18.0
Staleness:
45
Complexity:
40
Confidence:
75
Support Request:
10
Issue body
### What needs to get done
1. In [`post_setup_snapd()`](https://github.com/canonical/craft-providers/blob/2f2d4ddb17a798616d0e3a061fefdd6bdb486f86/craft_providers/base.py#L909), refresh snapd using the environment variable `CRAFT_SNAPD_CHANNEL`
2. Record snapd in the instance configuration (like [this](https://github.com/canonical/craft-providers/blob/2f2d4ddb17a798616d0e3a061fefdd6bdb486f86/craft_providers/actions/snap_installer.py#L497)).
This change would allow downstream apps to install a particular channel of snapd.
### Why it needs to get done
Because there is no way to install snapd from a particular channel. It gets silently ignored if you provide it to the base [here](https://github.com/canonical/craft-providers/blob/2f2d4ddb17a798616d0e3a061fefdd6bdb486f86/craft_providers/base.py#L116).
### Current behavior
If you add snapd as a snap to install with a particular channel, that channel doesn't get used. Here's what happens:
1. Snapd is installed as an [apt package](https://github.com/canonical/craft-providers/blob/2f2d4ddb17a798616d0e3a061fefdd6bdb486f86/craft_providers/bases/ubuntu.py#L432), which bootstraps and installs itself as a snap.
2. Snapd isn't recorded in the InstanceConfig as an installed snap ([unlike other snaps](https://github.com/canonical/craft-providers/blob/2f2d4ddb17a798616d0e3a061fefdd6bdb486f86/craft_providers/actions/snap_installer.py#L497)).
3. When the snap_installer tries to install snapd from a particular branch, it runs `snap install` instead of `snap refresh`
4. `snap install` no-ops and returns a 0 exit-code
5. The custom channel of snapd isn't installed
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
30
Quick Win:
18.0
Staleness:
45
Complexity:
40
Confidence:
75
Support Request:
10
|
keep open | Enhancement to allow installing snapd from a user-defined channel via CRAFT_SNAPD_CHANNEL env var. Triaged, under maintainer discussion. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
45
Complexity:
30
Confidence:
85
Support Request:
0
|
keep open | Feature request to install snapd from a user-defined channel via environment variable. Custom channels are currently ignored. Maintainers are discussing implementation details. Status: Triaged, under discussion. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
55
Confidence:
85
Support Request:
10
|
keep open | Enhancement to allow installing snapd from a user-defined channel via environment variable. Currently ignored due to apt installation and snap install no-op. Triaged, with maintainers discussing a snap injection approach. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
55
Complexity:
25
Confidence:
85
Support Request:
0
|
keep open | Enhancement to install snapd from a user-defined channel via environment variable. Currently, custom channels are silently ignored during bootstrap. Maintainers discussed alternative injection approaches. Status: Triaged, awaiting implementation. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #6384 remote-build: set snapcraft's channel in the build recipe | snapcraft | open | Enhancement to set Snapcraft's channel in remote build recipes and expose an environment variable for channel selection. Triaged, from maintainer, 23 days old. |