-
Notifications
You must be signed in to change notification settings - Fork 512
Description
I believe the advanced grammar should be usable throughout the complete snapcraft.yaml. Projects targeting multiple architectures currently requires maintaining multiple manifests for multiple architectures. An example pain point is, consider, there are 3 services, only 1 needs to run in both amd64 and arm64, the other 2 are exclusive to only one architecture, how can one handle that?
app1:
command: app1
daemon: simple
restart-condition: always
restart-delay: 5s
app2:
command: app2
daemon: simple
restart-condition: always
restart-delay: 5s
after:
- on amd64:
- app1
app3:
command: app3
daemon: simple
restart-condition: always
restart-delay: 5s
after:
- on arm64:
- app1I believe this should be fairly simple. Also, another scenario, where I just don't want to build a particular part in one architecture, currently I'll have to do this
part:
override-build: |
if [ "${CRAFT_ARCH_BUILD_FOR}" == "arm64" ]; then
echo "skipping..."
else
craftctl default
fiBut I think this not really a very clean solution. Also, I believe using the advanced grammar on keys like cmake-parameters is also essential and is fairly simple. The current solution is very hacky
part:
cmake-parameters:
- -DPI=${PI}
- -DX86=${X86}
build-environment:
- on arm64:
- PI: "ON"
- X86: "OFF"
- on amd64:
- X86: "ON"
- PI_SNAP: "OFF"