check for glib-compile-schemas presence before calling from the ubuntu hook

This makes the hook ok to use cross-flavor.

We could also move glib-compile-schemas to a separate hook, to ensure we never
silently fail because glib-compile-schemas is broken/missing.
This commit is contained in:
Steve Langasek 2023-12-20 19:47:11 -08:00
parent 6680b3be8d
commit 80cd4153e1
2 changed files with 5 additions and 1 deletions

2
debian/changelog vendored
View File

@ -2,6 +2,8 @@ livecd-rootfs (24.04.15) UNRELEASED; urgency=medium
* live-build/ubuntu/hooks/020-ubuntu-live.chroot_early: apply to any
layer ending in .live so this can be reused across flavors
* live-build/ubuntu/hooks/020-ubuntu-live.chroot_early: check for
glib-compile-schemas presence before calling
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 20 Dec 2023 19:45:34 -0800

View File

@ -14,4 +14,6 @@ cat <<EOF > /etc/initramfs-tools/conf.d/default-layer.conf
LAYERFS_PATH=${PASS}.squashfs
EOF
glib-compile-schemas /usr/share/glib-2.0/schemas/
if which glib-compile-schemas >/dev/null 2>&1; then
glib-compile-schemas /usr/share/glib-2.0/schemas/
fi