summaryrefslogtreecommitdiffstats
path: root/scripts/postinst-intercepts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/postinst-intercepts')
-rw-r--r--scripts/postinst-intercepts/update_gtk_icon_cache6
-rw-r--r--scripts/postinst-intercepts/update_mandb18
-rw-r--r--scripts/postinst-intercepts/update_udev_hwdb5
3 files changed, 27 insertions, 2 deletions
diff --git a/scripts/postinst-intercepts/update_gtk_icon_cache b/scripts/postinst-intercepts/update_gtk_icon_cache
index 99367a2855..a92bd840c6 100644
--- a/scripts/postinst-intercepts/update_gtk_icon_cache
+++ b/scripts/postinst-intercepts/update_gtk_icon_cache
@@ -11,7 +11,11 @@ $STAGING_DIR_NATIVE/${libdir_native}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --u
11 11
12for icondir in $D/usr/share/icons/*/ ; do 12for icondir in $D/usr/share/icons/*/ ; do
13 if [ -d $icondir ] ; then 13 if [ -d $icondir ] ; then
14 gtk-update-icon-cache -fqt $icondir 14 for gtkuic_cmd in gtk-update-icon-cache gtk4-update-icon-cache ; do
15 if [ -n "$(which $gtkuic_cmd)" ]; then
16 $gtkuic_cmd -fqt $icondir
17 fi
18 done
15 fi 19 fi
16done 20done
17 21
diff --git a/scripts/postinst-intercepts/update_mandb b/scripts/postinst-intercepts/update_mandb
new file mode 100644
index 0000000000..f91bafdb11
--- /dev/null
+++ b/scripts/postinst-intercepts/update_mandb
@@ -0,0 +1,18 @@
1#!/bin/sh
2#
3# SPDX-License-Identifier: MIT
4#
5
6set -eu
7
8# Create a temporary man_db.conf with paths to the rootfs, as mandb needs absolute paths
9CONFIG=$(mktemp --tmpdir update-mandb.XXXXX)
10sed "s:\(\s\)/:\1$D/:g" $D${sysconfdir}/man_db.conf > $CONFIG
11
12mkdir -p $D${localstatedir}/cache/man/
13
14PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${bindir}/mandb --config-file $CONFIG --create
15
16rm -f $CONFIG
17
18chown -R man:man $D${localstatedir}/cache/man/
diff --git a/scripts/postinst-intercepts/update_udev_hwdb b/scripts/postinst-intercepts/update_udev_hwdb
index 8076b8ae6f..8b3f5de791 100644
--- a/scripts/postinst-intercepts/update_udev_hwdb
+++ b/scripts/postinst-intercepts/update_udev_hwdb
@@ -9,14 +9,17 @@ case "${PREFERRED_PROVIDER_udev}" in
9 systemd) 9 systemd)
10 UDEV_EXTRA_ARGS="--usr" 10 UDEV_EXTRA_ARGS="--usr"
11 UDEVLIBDIR="${rootlibexecdir}" 11 UDEVLIBDIR="${rootlibexecdir}"
12 UDEVADM="${base_bindir}/udevadm"
12 ;; 13 ;;
13 14
14 *) 15 *)
15 UDEV_EXTRA_ARGS="" 16 UDEV_EXTRA_ARGS=""
16 UDEVLIBDIR="${sysconfdir}" 17 UDEVLIBDIR="${sysconfdir}"
18 UDEVADM="${bindir}/udevadm"
17 ;; 19 ;;
18esac 20esac
19 21
20rm -f $D${UDEVLIBDIR}/udev/hwdb.bin 22rm -f $D${UDEVLIBDIR}/udev/hwdb.bin
21PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D ${UDEV_EXTRA_ARGS} 23PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS} ||
24 PSEUDO_UNLOAD=1 qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS}
22chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin 25chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin