From 46ce0b0d15be77b72b0b36de34de58f310e59e40 Mon Sep 17 00:00:00 2001 From: Peter Wang Date: Tue, 5 Dec 2017 22:29:22 +1100 Subject: [PATCH] xbps-triggers: conform to new gtk-immodules cache locations. --- srcpkgs/xbps-triggers/files/gtk-immodules | 15 ++++++++------- srcpkgs/xbps-triggers/files/gtk3-immodules | 12 ++++++++---- srcpkgs/xbps-triggers/template | 4 ++-- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/srcpkgs/xbps-triggers/files/gtk-immodules b/srcpkgs/xbps-triggers/files/gtk-immodules index ae965b9c107..61fd12bcf4b 100755 --- a/srcpkgs/xbps-triggers/files/gtk-immodules +++ b/srcpkgs/xbps-triggers/files/gtk-immodules @@ -17,7 +17,7 @@ UPDATE="$5" export PATH="$PATH:/usr/local/bin" immodules_bin=usr/bin/gtk-query-immodules-2.0 -immodules_db=etc/gtk-2.0/gtk.immodules +immodules_cache=usr/lib/gtk-2.0/2.10.0/immodules.cache case "$ACTION" in targets) @@ -25,17 +25,18 @@ targets) ;; run) if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gtk+" ]; then - [ -f ${immodules_db} ] && rm -f ${immodules_db} + [ -f ${immodules_cache} ] && rm -f ${immodules_cache} break fi case "$TARGET" in post-*) + if [ -f etc/gtk-2.0/gtk.immodules ]; then + echo "Removing obsolete conf file: etc/gtk-2.0/gtk.immodules" + rm -f etc/gtk-2.0/gtk.immodules + fi if [ -x ${immodules_bin} ]; then - echo "Updating GTK's immodules database..." - if [ ! -d $(dirname $immodules_db) ]; then - install -d $(dirname $immodules_db) - fi - ${immodules_bin} > ${immodules_db} + echo "Updating GTK+ immodules cache..." + ${immodules_bin} --update-cache fi ;; esac diff --git a/srcpkgs/xbps-triggers/files/gtk3-immodules b/srcpkgs/xbps-triggers/files/gtk3-immodules index efcb682f923..a835dedc15d 100755 --- a/srcpkgs/xbps-triggers/files/gtk3-immodules +++ b/srcpkgs/xbps-triggers/files/gtk3-immodules @@ -17,7 +17,7 @@ UPDATE="$5" export PATH="$PATH:/usr/local/bin" immodules_bin=usr/bin/gtk-query-immodules-3.0 -immodules_db=etc/gtk-3.0/gtk.immodules +immodules_cache=usr/lib/gtk-3.0/3.0.0/immodules.cache case "$ACTION" in targets) @@ -25,14 +25,18 @@ targets) ;; run) if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gtk+3" ]; then - [ -f ${immodules_db} ] && rm -f ${immodules_db} + [ -f ${immodules_cache} ] && rm -f ${immodules_cache} break fi case "$TARGET" in post-*) + if [ -f etc/gtk-3.0/gtk.immodules ]; then + echo "Removing obsolete conf file: etc/gtk-3.0/gtk.immodules" + rm -f etc/gtk-3.0/gtk.immodules + fi if [ -x ${immodules_bin} ]; then - echo "Updating GTK+'s immodules database..." - ${immodules_bin} > ${immodules_db} + echo "Updating GTK+3 immodules cache..." + ${immodules_bin} --update-cache fi ;; esac diff --git a/srcpkgs/xbps-triggers/template b/srcpkgs/xbps-triggers/template index 71c2bd2de95..3483fa02a0e 100644 --- a/srcpkgs/xbps-triggers/template +++ b/srcpkgs/xbps-triggers/template @@ -1,7 +1,7 @@ # Template file for 'xbps-triggers' pkgname=xbps-triggers -version=0.102 -revision=3 +version=0.103 +revision=1 noarch=yes bootstrap=yes short_desc="The XBPS triggers for Void Linux"