From 80cd4153e1574ed93244c66e63f057bd11da7e1a Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 20 Dec 2023 19:47:11 -0800 Subject: [PATCH] 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. --- debian/changelog | 2 ++ live-build/ubuntu/hooks/020-ubuntu-live.chroot_early | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 97bcc861..42f0b835 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Wed, 20 Dec 2023 19:45:34 -0800 diff --git a/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early b/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early index 33cf85e8..7bbe2691 100755 --- a/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early +++ b/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early @@ -14,4 +14,6 @@ cat < /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