* debian/postinst, debian/prerm

- move properly /etc/splashy/ conffiles to /usr/share/splashy.
This commit is contained in:
Yves-Alexis Perez
2008-10-23 22:23:48 +00:00
parent 97b788440a
commit 01eb8313d3
3 changed files with 54 additions and 2 deletions
+4 -2
View File
@@ -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 <corsac@debian.org> Tue, 14 Oct 2008 22:43:53 +0200
-- Yves-Alexis Perez <corsac@debian.org> Fri, 24 Oct 2008 00:23:16 +0200
desktop-base (5.0.1) unstable; urgency=low
+28
View File
@@ -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
+22
View File
@@ -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