Add `adopt-info` analogue for components
Metadata
Current evaluation
Implemented component version adoption via merged PR #5753 (commits 6b6f7d9ee, 766562286), allowing craftctl to set component versions in Snapcraft 8.13.
Resolution: closed resolved
Reason: Merged PR #5753 added component variables so craftctl can set component versions for core22 and core24 snaps. It closed #5240 and was scheduled for Snapcraft 8.13.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### What needs to get done
Currently, one can use `adopt-info` to set a snap's version information via something like:
```
adopt-info: foo
<snip>
parts:
foo:
override-pull: |
craftctl set version=$(git describe --long)
```
It would be very useful if the version of a component could be set in a similar fashion. For instance,
```
adopt-info: foo
<snip>
parts:
foo:
override-pull: |
craftctl default
craftctl set version=$(git describe --long)
override-build: |
craftctl default
bar_ver=$(basename "${CRAFT_PART_INSTALL}/<...>/baz")
craftctl set bar.version="$bar_ver"
organize:
<...>: (component/bar)/<...>
<snip>
components:
bar:
version: adopt-info
<snip>
```
### Why it needs to get done
This would be useful in a variety of use-cases. For instance, if a component is created from some debian package, it may be more useful for that debian package's version to be the component's version, rather than the version of the snap itself.
A specific example would be with kernel snaps, where the component's version is more usefully understood as being related directly to the kernel ABI it was built against (immediately indicating whether a particular component will work with a particular kernel snap).
At the very least, this change makes the version maintenance burden for components a lot simpler -- I would no longer need to manually check the version for a component, where the valid version is even less obvious a priori in the case of kernel snaps.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Implemented component version adoption via merged PR #5753 (commits 6b6f7d9ee, 766562286), allowing craftctl to set component versions in Snapcraft 8.13. | |
| stealth/space-bunny-alpha | — | closed resolved | Scheduled for Snapcraft 8.13; component version adoption was later implemented and merged via canonical/snapcraft#5753. | |
| qwen/qwen3.6-35b-a3b | — | — | Accepted and scheduled for Snapcraft 8.13. The enhancement to add an adopt-info analogue for components was spec'd and prototyped across snapcraft, craft-application, and craft-parts. Implementation is queued for the next release. | |
| qwen/qwen3.6-35b-a3b | — | — | Accepted and scheduled for implementation in Snapcraft 8.13. Prototypes and specifications were created, with a Jira ticket tracking the development of adopt-info support for components. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Scheduled for release in Snapcraft 8.13. The enhancement adds an adopt-info equivalent for components, with implementation spec'd and prototyped across snapcraft, craft-application, and craft-parts. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
snapcraft#5753
(confidence 100%)
Merged implementation commits 6b6f7d9ee and 766562286 directly resolved component version adoption.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2080695 `adopt-info:` for components | snapcraft (launchpad) | closed | Feature request for adopting component versions via adopt-info was implemented in canonical/snapcraft PR #5753 (commits 6b6f7d9ee, 766562286), letting craftctl set component metadata. ClOSED as completed by ~mr-cal. | |
| #5753 feat: adopt component variables | snapcraft | merged | Merged PR #5753 (SNAPCRAFT-65, SNAPCRAFT-1056) added component variables so craftctl can set component versions for core22 and core24 snaps, closing #5240. Commits: 6b6f7d9ee, 766562286. | |
| #5757 docs: add docs for setting component versions | snapcraft | merged | Merged PR #5757 as commit ffb793a0e, adding a Snapcraft 8.13 component-version release note and linking the component guide to the craftctl how-to. | |
| #5115 component does not take snap version when no version provided | snapcraft | open | Component version inheritance was triaged as an enhancement; maintainers adopted component-level adopt-info, and follow-up #5240 was closed after implementation merged in canonical/snapcraft#5753. |