snapcraft
snapcraft copied to clipboard
Expose the build base name in snapcraft.yaml
What needs to get done
I would like to access the build base name (e.g. core22) in other sections (e.g. environment and parts) of the snapcraft.yaml to avoid hardcoding and duplication.
Why it needs to get done
I have these two use-cases but I'm sure there are also others:
- I need to reference the build base in an environment variable
(
OPENSSL_MODULES: /snap/core22/current/usr/lib/x86_64-linux-gnu/ossl-modules-3/) - I need to manually modify a path in a parts
override-buildbased on the build base
As you noted as a workaround, you can use core22 since a snapcraft.yaml is always tied to a particular base.
I agree that an environment variable is better for base-independent code.
Thank you for reporting your feedback to us!
The internal ticket has been created: https://warthogs.atlassian.net/browse/SNAPCRAFT-1187.
This message was autogenerated