diff --git a/debian/changelog b/debian/changelog index 266a0d5..a2d189b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,13 @@ -desktop-base (5.0.2) UNRELEASED; urgency=low +desktop-base (5.0.2) unstable; urgency=low * moreblue-orbit-wallpaper-widescreen.svg updated, fix a “transparent” * horizontal line on top. * debian/rules: - install splashy themes in /usr/share instead of /etc. closes: #501315 + * debian/postinst, debian/prerm + - move properly /etc/splashy/ conffiles to /usr/share/splashy. - -- Yves-Alexis Perez Tue, 14 Oct 2008 22:43:53 +0200 + -- Yves-Alexis Perez Fri, 24 Oct 2008 00:23:16 +0200 desktop-base (5.0.1) unstable; urgency=low diff --git a/debian/postinst b/debian/postinst index 09e2133..e8e2037 100644 --- a/debian/postinst +++ b/debian/postinst @@ -2,7 +2,35 @@ #DEBHELPER# +# Move a conffile without triggering a dpkg question +mv_conffile() { + OLDCONFFILE="$1" + NEWCONFFILE="$2" + if [ -e "$OLDCONFFILE" ]; then + echo "Preserving user changes to $NEWCONFFILE ..." + mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new + mv -f "$OLDCONFFILE" "$NEWCONFFILE" + fi +} + + +case "${1}" in +install|upgrade) + # splashy theme is moved to /usr/share/splashy starting 5.0.2 + if dpkg --compare-versions ${2} le 5.0.2; then + mv_conffile /etc/splashy/themes/moreblue-orbit/background-bw.png \ + /usr/share/splashy/themes/moreblue-orbit/background-bw.png + mv_conffile /etc/splashy/themes/moreblue-orbit/background-color.png \ + /usr/share/splashy/themes/moreblue-orbit/background-color.png + mv_conffile /etc/splashy/themes/moreblue-orbit/theme.xml \ + /usr/share/splashy/themes/moreblue-orbit/theme.xml + mv_conffile /etc/splashy/themes/moreblue-orbit/VeraSans.ttf \ + /usr/share/splashy/themes/moreblue-orbit/VeraSans.ttf + fi +esac + if [ "${1}" = "configure" ] && [ "$2" != "" ] ; then + if dpkg --compare-versions ${2} lt 0.3.11 && dpkg --compare-versions ${2} gt 0.3.5; then if test -x /var/lib/dpkg/info/libgnome2-common.postinst; then /var/lib/dpkg/info/libgnome2-common.postinst configure diff --git a/debian/preinst b/debian/preinst index 72e62fd..e2d8e46 100644 --- a/debian/preinst +++ b/debian/preinst @@ -17,3 +17,25 @@ if [ "${1}" = "upgrade" ]; then fi fi +# prepare to move splashy themes, moved to /usr/share in 5.0.2 +prep_mv_conffile() { + PKGNAME="$1" + CONFFILE="$2" + if [ -e "$CONFFILE" ]; then + md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" + old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE '{s/ obsolete$//;s/.* //p}\"`" + if [ "$md5sum" = "$old_md5sum" ]; then + rm -f "$CONFFILE" + fi + fi +} +case "$1" in +install|upgrade) + if dpkg --compare-versions "$2" le "5.0.2"; then + prep_mv_conffile desktop-base "/etc/splashy/themes/moreblue-orbit/background-bw.png" + prep_mv_conffile desktop-base "/etc/splashy/themes/moreblue-orbit/background-color.png" + prep_mv_conffile desktop-base "/etc/splashy/themes/moreblue-orbit/VeraSans.ttf" + prep_mv_conffile desktop-base "/etc/splashy/themes/moreblue-orbit/theme.xml" + fi +esac +