diff options
Diffstat (limited to 'scripts/postinst-intercepts')
-rw-r--r-- | scripts/postinst-intercepts/delay_to_first_boot | 4 | ||||
-rwxr-xr-x | scripts/postinst-intercepts/postinst_intercept | 2 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_desktop_database | 8 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_font_cache | 7 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_gio_module_cache | 3 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_gtk_icon_cache | 21 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_gtk_immodules_cache | 3 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_icon_cache | 13 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_mandb | 18 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_mime_database | 9 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_pixbuf_cache | 3 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_udev_hwdb | 23 |
12 files changed, 99 insertions, 15 deletions
diff --git a/scripts/postinst-intercepts/delay_to_first_boot b/scripts/postinst-intercepts/delay_to_first_boot index ecdbef95dd..fa8e1caaf5 100644 --- a/scripts/postinst-intercepts/delay_to_first_boot +++ b/scripts/postinst-intercepts/delay_to_first_boot @@ -1,2 +1,6 @@ #!/bin/sh +# +# SPDX-License-Identifier: MIT +# + exit 1 diff --git a/scripts/postinst-intercepts/postinst_intercept b/scripts/postinst-intercepts/postinst_intercept index b18e806d43..b91974c885 100755 --- a/scripts/postinst-intercepts/postinst_intercept +++ b/scripts/postinst-intercepts/postinst_intercept @@ -1,5 +1,7 @@ #!/bin/sh # +# SPDX-License-Identifier: MIT +# # This script is called from inside postinstall scriptlets at do_rootfs time. It # actually adds, at the end, the list of packages for which the intercept script # is valid. Also, if one wants to pass any variables to the intercept script from diff --git a/scripts/postinst-intercepts/update_desktop_database b/scripts/postinst-intercepts/update_desktop_database new file mode 100644 index 0000000000..8903b496f3 --- /dev/null +++ b/scripts/postinst-intercepts/update_desktop_database @@ -0,0 +1,8 @@ +#!/bin/sh +# +# SPDX-License-Identifier: MIT +# +# Post-install intercept for mime-xdg.bbclass + +update-desktop-database $D${desktop_dir} + diff --git a/scripts/postinst-intercepts/update_font_cache b/scripts/postinst-intercepts/update_font_cache index e0ec471964..900db042d6 100644 --- a/scripts/postinst-intercepts/update_font_cache +++ b/scripts/postinst-intercepts/update_font_cache @@ -1,6 +1,13 @@ #!/bin/sh +# +# SPDX-License-Identifier: MIT +# set -e +rm -f $D${fontconfigcachedir}/CACHEDIR.TAG + PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D -E ${fontconfigcacheenv} $D${libexecdir}/${binprefix}fc-cache --sysroot=$D --system-only ${fontconfigcacheparams} + chown -R root:root $D${fontconfigcachedir} +find $D -type f -name .uuid -exec chown root:root '{}' + diff --git a/scripts/postinst-intercepts/update_gio_module_cache b/scripts/postinst-intercepts/update_gio_module_cache index d1f0140947..c87fa85db9 100644 --- a/scripts/postinst-intercepts/update_gio_module_cache +++ b/scripts/postinst-intercepts/update_gio_module_cache @@ -1,4 +1,7 @@ #!/bin/sh +# +# SPDX-License-Identifier: MIT +# set -e diff --git a/scripts/postinst-intercepts/update_gtk_icon_cache b/scripts/postinst-intercepts/update_gtk_icon_cache new file mode 100644 index 0000000000..a92bd840c6 --- /dev/null +++ b/scripts/postinst-intercepts/update_gtk_icon_cache @@ -0,0 +1,21 @@ +#!/bin/sh +# +# SPDX-License-Identifier: MIT +# +# Post-install intercept for gtk-icon-cache.bbclass + +set -e + +# Update native pixbuf loaders +$STAGING_DIR_NATIVE/${libdir_native}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache + +for icondir in $D/usr/share/icons/*/ ; do + if [ -d $icondir ] ; then + for gtkuic_cmd in gtk-update-icon-cache gtk4-update-icon-cache ; do + if [ -n "$(which $gtkuic_cmd)" ]; then + $gtkuic_cmd -fqt $icondir + fi + done + fi +done + diff --git a/scripts/postinst-intercepts/update_gtk_immodules_cache b/scripts/postinst-intercepts/update_gtk_immodules_cache index 395516971e..9f07ccca6b 100644 --- a/scripts/postinst-intercepts/update_gtk_immodules_cache +++ b/scripts/postinst-intercepts/update_gtk_immodules_cache @@ -1,4 +1,7 @@ #!/bin/sh +# +# SPDX-License-Identifier: MIT +# set -e diff --git a/scripts/postinst-intercepts/update_icon_cache b/scripts/postinst-intercepts/update_icon_cache deleted file mode 100644 index 9cf2a72a0c..0000000000 --- a/scripts/postinst-intercepts/update_icon_cache +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -set -e - -# update native pixbuf loaders -$STAGING_DIR_NATIVE/${libdir_native}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache - -for icondir in $D/usr/share/icons/*/ ; do - if [ -d $icondir ] ; then - gtk-update-icon-cache -fqt $icondir - fi -done - 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 @@ +#!/bin/sh +# +# SPDX-License-Identifier: MIT +# + +set -eu + +# Create a temporary man_db.conf with paths to the rootfs, as mandb needs absolute paths +CONFIG=$(mktemp --tmpdir update-mandb.XXXXX) +sed "s:\(\s\)/:\1$D/:g" $D${sysconfdir}/man_db.conf > $CONFIG + +mkdir -p $D${localstatedir}/cache/man/ + +PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${bindir}/mandb --config-file $CONFIG --create + +rm -f $CONFIG + +chown -R man:man $D${localstatedir}/cache/man/ diff --git a/scripts/postinst-intercepts/update_mime_database b/scripts/postinst-intercepts/update_mime_database new file mode 100644 index 0000000000..582d1e162c --- /dev/null +++ b/scripts/postinst-intercepts/update_mime_database @@ -0,0 +1,9 @@ +#!/bin/sh +# +# SPDX-License-Identifier: MIT +# +# Post-install intercept for mime.bbclass + +echo "Updating MIME database... this may take a while." +update-mime-database $D${mimedir} + diff --git a/scripts/postinst-intercepts/update_pixbuf_cache b/scripts/postinst-intercepts/update_pixbuf_cache index ebea07c356..ea12814474 100644 --- a/scripts/postinst-intercepts/update_pixbuf_cache +++ b/scripts/postinst-intercepts/update_pixbuf_cache @@ -1,4 +1,7 @@ #!/bin/sh +# +# SPDX-License-Identifier: MIT +# set -e diff --git a/scripts/postinst-intercepts/update_udev_hwdb b/scripts/postinst-intercepts/update_udev_hwdb index b5cce0a09d..8b3f5de791 100644 --- a/scripts/postinst-intercepts/update_udev_hwdb +++ b/scripts/postinst-intercepts/update_udev_hwdb @@ -1,6 +1,25 @@ #!/bin/sh +# +# SPDX-License-Identifier: MIT +# set -e -PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D -chown root:root $D${sysconfdir}/udev/hwdb.bin +case "${PREFERRED_PROVIDER_udev}" in + systemd) + UDEV_EXTRA_ARGS="--usr" + UDEVLIBDIR="${rootlibexecdir}" + UDEVADM="${base_bindir}/udevadm" + ;; + + *) + UDEV_EXTRA_ARGS="" + UDEVLIBDIR="${sysconfdir}" + UDEVADM="${bindir}/udevadm" + ;; +esac + +rm -f $D${UDEVLIBDIR}/udev/hwdb.bin +PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS} || + PSEUDO_UNLOAD=1 qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS} +chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin |