diff options
Diffstat (limited to 'scripts/postinst-intercepts')
-rw-r--r-- | scripts/postinst-intercepts/delay_to_first_boot | 6 | ||||
-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 | 12 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_gio_module_cache | 11 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_gtk_icon_cache | 17 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_gtk_immodules_cache | 19 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_icon_cache | 13 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_mime_database | 9 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_pixbuf_cache | 8 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_udev_hwdb | 22 |
11 files changed, 110 insertions, 17 deletions
diff --git a/scripts/postinst-intercepts/delay_to_first_boot b/scripts/postinst-intercepts/delay_to_first_boot new file mode 100644 index 0000000000..fa8e1caaf5 --- /dev/null +++ b/scripts/postinst-intercepts/delay_to_first_boot @@ -0,0 +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 0deab3c115..900db042d6 100644 --- a/scripts/postinst-intercepts/update_font_cache +++ b/scripts/postinst-intercepts/update_font_cache @@ -1,5 +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} -PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir} \ - -E ${fontconfigcacheenv} $D${bindir}/fc-cache --sysroot=$D ${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 new file mode 100644 index 0000000000..c87fa85db9 --- /dev/null +++ b/scripts/postinst-intercepts/update_gio_module_cache @@ -0,0 +1,11 @@ +#!/bin/sh +# +# SPDX-License-Identifier: MIT +# + +set -e + +PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/ + +[ ! -e $D${libdir}/gio/modules/giomodule.cache ] || + chown root:root $D${libdir}/gio/modules/giomodule.cache diff --git a/scripts/postinst-intercepts/update_gtk_icon_cache b/scripts/postinst-intercepts/update_gtk_icon_cache new file mode 100644 index 0000000000..99367a2855 --- /dev/null +++ b/scripts/postinst-intercepts/update_gtk_icon_cache @@ -0,0 +1,17 @@ +#!/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 + gtk-update-icon-cache -fqt $icondir + fi +done + diff --git a/scripts/postinst-intercepts/update_gtk_immodules_cache b/scripts/postinst-intercepts/update_gtk_immodules_cache new file mode 100644 index 0000000000..9f07ccca6b --- /dev/null +++ b/scripts/postinst-intercepts/update_gtk_immodules_cache @@ -0,0 +1,19 @@ +#!/bin/sh +# +# SPDX-License-Identifier: MIT +# + +set -e + +if [ -x $D${libexecdir}/${binprefix}gtk-query-immodules-2.0 ]; then + PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}gtk-query-immodules-2.0 \ + > $D${libdir}/gtk-2.0/2.10.0/immodules.cache && + sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache + chown root:root $D${libdir}/gtk-2.0/2.10.0/immodules.cache +fi +if [ -x $D${libexecdir}/${binprefix}gtk-query-immodules-3.0 ]; then + PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}gtk-query-immodules-3.0 \ + > $D${libdir}/gtk-3.0/3.0.0/immodules.cache && + sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache + chown root:root $D${libdir}/gtk-3.0/3.0.0/immodules.cache +fi diff --git a/scripts/postinst-intercepts/update_icon_cache b/scripts/postinst-intercepts/update_icon_cache deleted file mode 100644 index c02273d52a..0000000000 --- a/scripts/postinst-intercepts/update_icon_cache +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -set -e - -# update native pixbuf loaders -${STAGING_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_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 a8b4001069..ea12814474 100644 --- a/scripts/postinst-intercepts/update_pixbuf_cache +++ b/scripts/postinst-intercepts/update_pixbuf_cache @@ -1,9 +1,13 @@ #!/bin/sh +# +# SPDX-License-Identifier: MIT +# + +set -e export GDK_PIXBUF_MODULEDIR=$D${libdir}/gdk-pixbuf-2.0/2.10.0/loaders export GDK_PIXBUF_FATAL_LOADER=1 -PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir}\ - $D${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ +PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ >$GDK_PIXBUF_MODULEDIR/../loaders.cache && \ sed -i -e "s:$D::g" $GDK_PIXBUF_MODULEDIR/../loaders.cache diff --git a/scripts/postinst-intercepts/update_udev_hwdb b/scripts/postinst-intercepts/update_udev_hwdb new file mode 100644 index 0000000000..8076b8ae6f --- /dev/null +++ b/scripts/postinst-intercepts/update_udev_hwdb @@ -0,0 +1,22 @@ +#!/bin/sh +# +# SPDX-License-Identifier: MIT +# + +set -e + +case "${PREFERRED_PROVIDER_udev}" in + systemd) + UDEV_EXTRA_ARGS="--usr" + UDEVLIBDIR="${rootlibexecdir}" + ;; + + *) + UDEV_EXTRA_ARGS="" + UDEVLIBDIR="${sysconfdir}" + ;; +esac + +rm -f $D${UDEVLIBDIR}/udev/hwdb.bin +PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D ${UDEV_EXTRA_ARGS} +chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin |