fix: bake LIVECD_ROOTFS_ROOT into config/functions

Hooks that only source config/functions (not config/common) would fail
with "LIVECD_ROOTFS_ROOT: parameter not set" when calling setup_mountpoint
or any function that transitively calls it. This affected ubuntu, ubuntu-cpc,
and buildd hooks.

Rather than adding `. config/common` to every hook, prepend the
LIVECD_ROOTFS_ROOT assignment to config/functions at config time so it is
available to all callers automatically.
This commit is contained in:
root 2026-03-19 17:32:56 +00:00 committed by michael.hudson@canonical.com
parent 7252138aa9
commit cbb597a46c
No known key found for this signature in database
GPG Key ID: 80E627A0AB757E23

View File

@ -49,7 +49,9 @@ if [ -z "$MIRROR" ]; then
fi
mkdir -p config
cp -af ${LIVECD_ROOTFS_ROOT}/live-build/functions config/functions
echo "LIVECD_ROOTFS_ROOT=\"$LIVECD_ROOTFS_ROOT\"" > config/functions
chmod --reference=${LIVECD_ROOTFS_ROOT}/live-build/functions config/functions
cat ${LIVECD_ROOTFS_ROOT}/live-build/functions >> config/functions
cp -af ${LIVECD_ROOTFS_ROOT}/live-build/lb_*_layered config/
cp -af ${LIVECD_ROOTFS_ROOT}/live-build/snap-seed-parse.py config/snap-seed-parse
cp -af ${LIVECD_ROOTFS_ROOT}/live-build/snap-seed-missing-providers.py config/snap-seed-missing-providers