summaryrefslogtreecommitdiff
path: root/scripts/postinst-intercepts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/postinst-intercepts')
-rwxr-xr-xscripts/postinst-intercepts/postinst_intercept4
-rw-r--r--scripts/postinst-intercepts/update_font_cache7
-rw-r--r--scripts/postinst-intercepts/update_gio_module_cache9
-rw-r--r--scripts/postinst-intercepts/update_icon_cache3
-rw-r--r--scripts/postinst-intercepts/update_pixbuf_cache9
5 files changed, 22 insertions, 10 deletions
diff --git a/scripts/postinst-intercepts/postinst_intercept b/scripts/postinst-intercepts/postinst_intercept
index 27c256834c..b18e806d43 100755
--- a/scripts/postinst-intercepts/postinst_intercept
+++ b/scripts/postinst-intercepts/postinst_intercept
@@ -41,14 +41,14 @@ fi
chmod +x "$intercept_script"
-pkgs_line="$(cat $intercept_script|grep "##PKGS:")"
+pkgs_line=$(grep "##PKGS:" $intercept_script)
if [ -n "$pkgs_line" ]; then
# line exists, add this package to the list only if it's not already there
if [ -z "$(echo "$pkgs_line" | grep " $package_name ")" ]; then
sed -i -e "s/##PKGS:.*/\0${package_name} /" $intercept_script
fi
else
- for var in $@; do
+ for var in "$@"; do
sed -i -e "\%^#\!/bin/.*sh%a $var" $intercept_script
done
echo "##PKGS: ${package_name} " >> $intercept_script
diff --git a/scripts/postinst-intercepts/update_font_cache b/scripts/postinst-intercepts/update_font_cache
index afc93d80a5..bf65e19a41 100644
--- a/scripts/postinst-intercepts/update_font_cache
+++ b/scripts/postinst-intercepts/update_font_cache
@@ -1,6 +1,7 @@
#!/bin/sh
-PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir}\
- $D${bindir}/fc-cache --sysroot=$D >/dev/null 2>&1
-
+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}
+chown -R root:root $D${fontconfigcachedir}
diff --git a/scripts/postinst-intercepts/update_gio_module_cache b/scripts/postinst-intercepts/update_gio_module_cache
new file mode 100644
index 0000000000..fc3f9d0d6c
--- /dev/null
+++ b/scripts/postinst-intercepts/update_gio_module_cache
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+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/
+
+[ ! -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_icon_cache
index 8e17a6ac0c..9cf2a72a0c 100644
--- a/scripts/postinst-intercepts/update_icon_cache
+++ b/scripts/postinst-intercepts/update_icon_cache
@@ -1,8 +1,9 @@
#!/bin/sh
set -e
+
# update native pixbuf loaders
-gdk-pixbuf-query-loaders --update-cache
+$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
diff --git a/scripts/postinst-intercepts/update_pixbuf_cache b/scripts/postinst-intercepts/update_pixbuf_cache
index bd94fe88dd..5d44075fb4 100644
--- a/scripts/postinst-intercepts/update_pixbuf_cache
+++ b/scripts/postinst-intercepts/update_pixbuf_cache
@@ -1,10 +1,11 @@
#!/bin/sh
+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${bindir}/gdk-pixbuf-query-loaders \
- >$GDK_PIXBUF_MODULEDIR/../loaders.cache 2>/dev/null && \
+ $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
-
-