xbps-triggers: update to 0.2.
Update gtk-pixbuf-loaders trigger for the new gdk-pixbuf package.
This commit is contained in:
parent
68198645d9
commit
f446cf5b2b
|
@ -1,26 +0,0 @@
|
||||||
#
|
|
||||||
case "${ACTION}" in
|
|
||||||
pre)
|
|
||||||
#
|
|
||||||
# xbps-base-files 0.37 does not have the XBPS triggers anymore.
|
|
||||||
# If installed package is less than 0.37 remove them before
|
|
||||||
# upgrading the package.
|
|
||||||
#
|
|
||||||
if command -v xbps-uhelper.static 2>&1 >/dev/null; then
|
|
||||||
uhelper="$(command -v xbps-uhelper.static)"
|
|
||||||
elif command -v xbps-uhelper 2>&1 >/dev/null; then
|
|
||||||
uhelper="$(command -v xbps-uhelper)"
|
|
||||||
else
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
set +e
|
|
||||||
${uhelper} cmpver $(${uhelper} version xbps-base-files) 0.37
|
|
||||||
if [ $? -eq 255 ]; then
|
|
||||||
echo -n "Removing XBPS trigger files, now owned by the "
|
|
||||||
echo "xbps-triggers package..."
|
|
||||||
rm -vf var/db/xbps/triggers/*
|
|
||||||
fi
|
|
||||||
set -e
|
|
||||||
;;
|
|
||||||
esac
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'xbps-triggers'
|
# Template file for 'xbps-triggers'
|
||||||
pkgname=xbps-triggers
|
pkgname=xbps-triggers
|
||||||
version=0.1
|
version=0.2
|
||||||
build_style=custom-install
|
build_style=custom-install
|
||||||
short_desc="XBPS Package System triggers"
|
short_desc="XBPS Package System triggers"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
#
|
#
|
||||||
# Updates GTK+ gdk pixbuf modules file with gdk-pixbuf-query-loaders(1).
|
# Updates's GDK Pixbuf loaders cache with gdk-pixbuf-query-loaders(1).
|
||||||
#
|
#
|
||||||
# Arguments: $ACTION = [run/targets]
|
# Arguments: $ACTION = [run/targets]
|
||||||
# $TARGET = [post-install/post-remove]
|
# $TARGET = [post-install/post-remove]
|
||||||
|
@ -15,22 +15,26 @@ VERSION="$4"
|
||||||
UPDATE="$5"
|
UPDATE="$5"
|
||||||
|
|
||||||
pixbuf_bin=usr/bin/gdk-pixbuf-query-loaders
|
pixbuf_bin=usr/bin/gdk-pixbuf-query-loaders
|
||||||
pixbuf_loaders=etc/gtk-2.0/gdk-pixbuf.loaders
|
|
||||||
|
|
||||||
case "$ACTION" in
|
case "$ACTION" in
|
||||||
targets)
|
targets)
|
||||||
echo "post-install post-remove"
|
echo "post-install post-remove"
|
||||||
;;
|
;;
|
||||||
run)
|
run)
|
||||||
if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gtk+" ]; then
|
if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gdk-pixbuf" ]; then
|
||||||
[ -f ${pixbuf_loaders} ] && rm -f ${pixbuf_loaders}
|
_cache_file=$(${pixbuf_bin} --print-cache-file)
|
||||||
|
[ -f .${_cache_file} ] && rm -f .${_cache_file}
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
case "$TARGET" in
|
case "$TARGET" in
|
||||||
post-*)
|
post-*)
|
||||||
|
if [ -f etc/gtk-2.0/gdk-pixbuf.loaders ]; then
|
||||||
|
echo " Removing obsolete conf file: etc/gtk-2.0/gdk-pixbuf.loaders"
|
||||||
|
rm -f etc/gtk-2.0/gdk-pixbuf.loaders
|
||||||
|
fi
|
||||||
if [ -x ${pixbuf_bin} ]; then
|
if [ -x ${pixbuf_bin} ]; then
|
||||||
echo "Updating GTK's pixbuf modules file..."
|
echo "Updating GDK Pixbuf loaders cache..."
|
||||||
${pixbuf_bin} > ${pixbuf_loaders}
|
${pixbuf_bin} --update-cache
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue