sitter
February 6, 2019, 2:07pm
14
@degville it seems the keys for adopt-info
, apps.<app-name>.common-id
, and parts.<part-name>.parse-info
are not documented in the reference. In fact the entire adopt-info tech doesn’t have any documentation on docs.snapcraft.io
To help avoid unnecessary duplication, and for convenience, Snapcraft can process and incorporate external metadata from within snapcraft.yaml by using parse-info within a part and a corresponding adopt-info key.
For example, the following snapcraft.yaml will parse a file called metadata-file. Snapcraft will attempt to extract version, summary and description metadata for the snap, all of which are mandatory:
name: my-snap-name
adopt-info: part-with-metadata
parts:
part-with-metadata:
p…
I am a bit confused by the adopt-info feature. It can pick summary/description for the snap out of a common-id entity. But, I cannot seem to find a way to control which common-id that is. app parts have a common-id key for this purpose, but the key isn’t allowed outside apps.
So how would you pick the “primary” common-id to derive the adopt-info from?
Say I have a snap that ships two apps coming from the same source part sampleapp and otherapp. The snap summary and description should be derive…
Deprecated: This document has been superseded by Using external metadata
Some of the values required by the snapcraft.yaml file
might be already provided by other metadata sources available in the upstream
project.
Instead of duplicating this information, you can declare that a snapcraft part
must parse the metadata file from the source, and adopt that parsed
information. For example, the following snapcraft.yaml will parse the file
called metadata-file and try to extract from it t…