← Back to issue list

Add `adopt-info` analogue for components

View original Github issue

Metadata

Project
snapcraft
Number
#5240
Type
issue
State
closed
Author
dilyn-corner
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed

Current evaluation

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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Enhancement request to add an adopt-info equivalent for components. The feature was spec'd and prototyped across core tools. An internal ticket was created, and implementation is scheduled for release in Snapcraft 8.13.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2080695 `adopt-info:` for components snapcraft (launchpad) closed Support for adopt-info in components was implemented and merged via pull request 5753. Craftctl was updated to set component metadata, enabling parts to adopt version information with default inheritance from the snap.
80%