← Back to issue list

Unable to set components version using craftctl set version

View original Github issue

Metadata

Project
snapcraft
Number
#5102
Type
issue
State
open
Author
stephensp
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed
—

Current evaluation

Current main supports `craftctl set components.<name>.version`, with per-component project variables and spread-test coverage; the enhancement appears implemented, but its resolving PR is unconfirmed.

Suggested action: close resolved

Reason: Current `snapcraft/parts/yaml_utils.py` creates a separate version project variable for each component and associates it with that component's `adopt-info`; the spread fixture also exercises `craftctl set components.share.version="2.0-updated"`. These concrete changes fulfill the request, although the exact resolving PR or release could not be identified from the available history.

Evaluated by: mr-cal-bot

Impact: 45 Quick Win: 30 Complexity: 25 Confidence: 88 Actionability: 90

Issue body

### What needs to get done component versions need to be settable during override-build , just like a snap. Currently it fails with the following error RuntimeError: 'override-build' in part 'nvidia-550-ko-comp' executed an invalid control API call: variable 'version' can be set only once. ### Why it needs to get done components need to be able to dynamically set their version based on revision numbers and other system settings. This is not possible if the version has to be hardcoded into the version field.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 45
Quick Win: 30
Complexity: 25
Confidence: 88
Actionability: 90
close resolved Current main supports `craftctl set components.<name>.version`, with per-component project variables and spread-test coverage; the enhancement appears implemented, but its resolving PR is unconfirmed.
qwen/qwen3.6-35b-a3b
Impact: 45
Quick Win: 22
Complexity: 40
Confidence: 85
Actionability: 80
keep open Enhancement to allow dynamic component version setting via craftctl during override-build. Triaged, with maintainer-proposed syntax and prototypes ready, awaiting scheduling.
qwen/qwen3.8-27b
Impact: 55
Quick Win: 22
Staleness: 55
Complexity: 60
Confidence: 80
Support Request: 10
close stale Request to allow dynamically setting component versions via craftctl during override-build (currently errors with 'variable version can be set only once'). Triaged as enhancement; spec'd and prototyped in 2025 but unscheduled. Feature now implemented in snapcraft 8.13 via craftctl set components.<name>.version.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 75
Confidence: 85
Support Request: 5
keep open Enhancement to allow dynamic component version setting via craftctl during override-build. Spec'd and prototyped but unscheduled, awaiting next cycle planning.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 80
Confidence: 85
Support Request: 10
keep open Enhancement to allow dynamic component version setting via craftctl. Triaged, discussed, and prototyped by maintainers, but implementation is unscheduled and pending future cycle planning.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#5240 (confidence 95%)

    Explicitly linked by the reporter and concerns the corresponding component-level adopt-info capability.

Related issues

No related issues found above the similarity threshold.