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'
|
||||
pkgname=xbps-triggers
|
||||
version=0.1
|
||||
version=0.2
|
||||
build_style=custom-install
|
||||
short_desc="XBPS Package System triggers"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/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]
|
||||
# $TARGET = [post-install/post-remove]
|
||||
|
@ -15,22 +15,26 @@ VERSION="$4"
|
|||
UPDATE="$5"
|
||||
|
||||
pixbuf_bin=usr/bin/gdk-pixbuf-query-loaders
|
||||
pixbuf_loaders=etc/gtk-2.0/gdk-pixbuf.loaders
|
||||
|
||||
case "$ACTION" in
|
||||
targets)
|
||||
echo "post-install post-remove"
|
||||
;;
|
||||
run)
|
||||
if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gtk+" ]; then
|
||||
[ -f ${pixbuf_loaders} ] && rm -f ${pixbuf_loaders}
|
||||
if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gdk-pixbuf" ]; then
|
||||
_cache_file=$(${pixbuf_bin} --print-cache-file)
|
||||
[ -f .${_cache_file} ] && rm -f .${_cache_file}
|
||||
break
|
||||
fi
|
||||
case "$TARGET" in
|
||||
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
|
||||
echo "Updating GTK's pixbuf modules file..."
|
||||
${pixbuf_bin} > ${pixbuf_loaders}
|
||||
echo "Updating GDK Pixbuf loaders cache..."
|
||||
${pixbuf_bin} --update-cache
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue
Block a user