Open dilyn-corner opened 1 year ago
Additionally, the ln
and cp
in the Makefile
's install:
target should use -f
to avoid file collision problems:
{snip}
:: mkdir -p /root/parts/grub/install/meta
:: ln gadget-amd64.yaml gadget.yaml
:: ln: failed to create hard link 'gadget.yaml': File exists
:: make: *** [Makefile:170: install] Error 1
Failed to run the build script for part 'grub'.
Failed to execute pack in instance.
Full execution log: '/home/dilyn/.local/state/snapcraft/log/snapcraft-20230829-151724.771742.log'
It probably also wouldn't hurt to run make clean
after everything is finished to make sure we don't dirty the current working directory once we've finished building the snap.
https://github.com/snapcore/pc-gadget/blob/f604792d13d7e0cbb0f42d18c333ff654247a311/snapcraft.yaml#L17C63-L17C63
This line should reference
${SNAPCRAFT_PROJECT_DIR}/gadget-${SNAPCRAFT_TARGET_ARCH}.yaml
--${SNAPCRAFT_PROJECT_DIR}
is actually a different location depending on if you're building with--destructive-mode
so the file path needs to be explicit.Build log: