diff options
Diffstat (limited to 'scripts/postinst-intercepts')
-rw-r--r-- | scripts/postinst-intercepts/update_gtk_icon_cache | 6 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_mandb | 18 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_udev_hwdb | 5 |
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 | ||
12 | for icondir in $D/usr/share/icons/*/ ; do | 12 | for 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 |
16 | done | 20 | done |
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 | |||
6 | set -eu | ||
7 | |||
8 | # Create a temporary man_db.conf with paths to the rootfs, as mandb needs absolute paths | ||
9 | CONFIG=$(mktemp --tmpdir update-mandb.XXXXX) | ||
10 | sed "s:\(\s\)/:\1$D/:g" $D${sysconfdir}/man_db.conf > $CONFIG | ||
11 | |||
12 | mkdir -p $D${localstatedir}/cache/man/ | ||
13 | |||
14 | PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${bindir}/mandb --config-file $CONFIG --create | ||
15 | |||
16 | rm -f $CONFIG | ||
17 | |||
18 | chown -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 | ;; |
18 | esac | 20 | esac |
19 | 21 | ||
20 | rm -f $D${UDEVLIBDIR}/udev/hwdb.bin | 22 | rm -f $D${UDEVLIBDIR}/udev/hwdb.bin |
21 | PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D ${UDEV_EXTRA_ARGS} | 23 | PSEUDO_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} | ||
22 | chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin | 25 | chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin |