summaryrefslogtreecommitdiffstats
path: root/scripts/postinst-intercepts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/postinst-intercepts')
-rw-r--r--scripts/postinst-intercepts/delay_to_first_boot6
-rwxr-xr-xscripts/postinst-intercepts/postinst_intercept2
-rw-r--r--scripts/postinst-intercepts/update_desktop_database8
-rw-r--r--scripts/postinst-intercepts/update_font_cache8
-rw-r--r--scripts/postinst-intercepts/update_gio_module_cache8
-rw-r--r--scripts/postinst-intercepts/update_gtk_icon_cache (renamed from scripts/postinst-intercepts/update_icon_cache)6
-rw-r--r--scripts/postinst-intercepts/update_gtk_immodules_cache19
-rw-r--r--scripts/postinst-intercepts/update_mime_database9
-rw-r--r--scripts/postinst-intercepts/update_pixbuf_cache6
-rw-r--r--scripts/postinst-intercepts/update_udev_hwdb21
10 files changed, 86 insertions, 7 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 bf65e19a41..46bdb8c572 100644
--- a/scripts/postinst-intercepts/update_font_cache
+++ b/scripts/postinst-intercepts/update_font_cache
@@ -1,7 +1,11 @@
#!/bin/sh
+#
+# SPDX-License-Identifier: MIT
+#
set -e
-PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir} \
- -E ${fontconfigcacheenv} $D${bindir}/fc-cache --sysroot=$D --system-only ${fontconfigcacheparams}
+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 fe468092cf..c87fa85db9 100644
--- a/scripts/postinst-intercepts/update_gio_module_cache
+++ b/scripts/postinst-intercepts/update_gio_module_cache
@@ -1,7 +1,11 @@
#!/bin/sh
+#
+# SPDX-License-Identifier: MIT
+#
set -e
-PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \
- $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/
+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_icon_cache b/scripts/postinst-intercepts/update_gtk_icon_cache
index 9cf2a72a0c..99367a2855 100644
--- a/scripts/postinst-intercepts/update_icon_cache
+++ b/scripts/postinst-intercepts/update_gtk_icon_cache
@@ -1,8 +1,12 @@
#!/bin/sh
+#
+# SPDX-License-Identifier: MIT
+#
+# Post-install intercept for gtk-icon-cache.bbclass
set -e
-# update native pixbuf loaders
+# 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
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_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 5d44075fb4..ea12814474 100644
--- a/scripts/postinst-intercepts/update_pixbuf_cache
+++ b/scripts/postinst-intercepts/update_pixbuf_cache
@@ -1,11 +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..102e99b947
--- /dev/null
+++ b/scripts/postinst-intercepts/update_udev_hwdb
@@ -0,0 +1,21 @@
+#!/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
+
+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