Open nhathaway opened 4 weeks ago
Thanks for the report! If you declare a build-base
in the snap, does this still occur?
Thank you for reporting us your feedback!
The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3256.
This message was autogenerated
My docker image is based off Ubuntu 20.04, so if I add 'build-base: core20' and set this:
architectures:
Then snapcraft runs to completion without any runtime errors, albeit just with warnings which I need to get to the bottom of myself now.
I think what we need to do here is ensure the existence of build-base
gets checked earlier for base: bare
so we can provide proper errors.
Bug Description
RuntimeError: cannot determine build-for architecture
in snapcraft.yaml, if you put in:
It complains that you should use 'platforms' for the 'bare' base and not 'architectures'.
If you substitute in 'platforms' for 'architectures':
you get the above runtime error.
Looking at /snap/snapcraft/12379/lib/python3.10/site-packages/snapcraft/models/project.py, this error message is produced under core22 which is the base for snapcraft itself. But 'platforms' is for core24 and by implication, also for base:bare.
To Reproduce
snapcraft --destructive-mode
Environment
Building in a docker environment with just everything required to run the snapcraft executable.
snapcraft.yaml
Relevant log output
Additional context
$ ls /snap/ bin/ core22/ snapcraft/