[debian-edu-commits] r81476 - branches/wheezy/debian-edu-artwork/debian
pere at alioth.debian.org
pere at alioth.debian.org
Mon Jul 8 22:25:27 UTC 2013
Author: pere
Date: 2013-07-08 22:25:27 +0000 (Mon, 08 Jul 2013)
New Revision: 81476
Modified:
branches/wheezy/debian-edu-artwork/debian/changelog
branches/wheezy/debian-edu-artwork/debian/debian-edu-artwork.postinst
branches/wheezy/debian-edu-artwork/debian/debian-edu-artwork.prerm
Log:
Adjust debian-edu-artwork.postinst and debian-edu-artwork.prerm
to handle cleanup of previoiusly diverted files as I believe
it must be done.
Modified: branches/wheezy/debian-edu-artwork/debian/changelog
===================================================================
--- branches/wheezy/debian-edu-artwork/debian/changelog 2013-07-08 22:17:11 UTC (rev 81475)
+++ branches/wheezy/debian-edu-artwork/debian/changelog 2013-07-08 22:25:27 UTC (rev 81476)
@@ -1,5 +1,6 @@
debian-edu-artwork (0.0.40-1) UNRELEASED; urgency=low
+ [ Wolfgang Schweer ]
* Configuration of gdm3:
- Drop file /etc/gdm3/greeter.gsettings, as this approach fails, if
gdm3 is installed after the artwork package; remove diversion.
@@ -10,6 +11,11 @@
- Handle unused diversions. (Closes: #715153)
- Remove useless whitespace in update-artwork.
+ [ Petter Reinholdtsen ]
+ * Adjust debian-edu-artwork.postinst and debian-edu-artwork.prerm
+ to handle cleanup of previoiusly diverted files as I believe
+ it must be done.
+
-- Wolfgang Schweer <wschweer at arcor.de> Mon, 08 Jul 2013 00:40:14 +0200
debian-edu-artwork (0.0.39-1) unstable; urgency=low
Modified: branches/wheezy/debian-edu-artwork/debian/debian-edu-artwork.postinst
===================================================================
--- branches/wheezy/debian-edu-artwork/debian/debian-edu-artwork.postinst 2013-07-08 22:17:11 UTC (rev 81475)
+++ branches/wheezy/debian-edu-artwork/debian/debian-edu-artwork.postinst 2013-07-08 22:25:27 UTC (rev 81476)
@@ -1,23 +1,43 @@
#! /bin/sh
-set -e
+# Remove a no-longer used conffile. From
+# http://wiki.debian.org/DpkgConffileHandling
+rm_conffile() {
+ PKGNAME="$1"
+ CONFFILE="$2"
-# remove deprecated diversion (bug #715153)
-if dpkg-divert --listpackage /usr/share/gdm/defaults.conf.orig >/dev/null; then
- dpkg-divert --package debian-edu-artwork \
- --remove /usr/share/gdm/defaults.conf
-fi
+ [ -e "$CONFFILE" ] || return 0
-# remove deprecated diversion
-if dpkg-divert --listpackage /etc/gdm3/greeter.gsettings.edu-diverted >/dev/null; then
- dpkg-divert --package debian-edu-artwork \
- --rename --remove /etc/gdm3/greeter.gsettings
-fi
+ 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
+ echo "Obsolete conffile $CONFFILE has been modified by you." 1>&2
+ echo "Saving as $CONFFILE.dpkg-bak ..." 1>&2
+ mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
+ else
+ echo "Removing obsolete conffile $CONFFILE ..." 1>&2
+ rm -f "$CONFFILE"
+ fi
+}
+set -e
+
#DEBHELPER#
case "$1" in
configure)
+ # remove deprecated diversion
+ if dpkg --compare-versions "$2" le "0.0.39-1"; then
+ # remove deprecated diversion (bug #715153)
+ dpkg-divert --package debian-edu-artwork \
+ --remove /usr/share/gdm/defaults.conf
+
+ rm_conffile debian-edu-artwork /etc/gdm3/greeter.gsettings
+ dpkg-divert --package debian-edu-artwork \
+ --rename --remove /etc/gdm3/greeter.gsettings
+ fi
+
/usr/share/debian-edu-artwork/update-artwork configure
;;
esac
Modified: branches/wheezy/debian-edu-artwork/debian/debian-edu-artwork.prerm
===================================================================
--- branches/wheezy/debian-edu-artwork/debian/debian-edu-artwork.prerm 2013-07-08 22:17:11 UTC (rev 81475)
+++ branches/wheezy/debian-edu-artwork/debian/debian-edu-artwork.prerm 2013-07-08 22:25:27 UTC (rev 81476)
@@ -4,18 +4,12 @@
case "$1" in
remove)
- # avoid puring problem with version in squeeze
+ # avoid purging problem with version in squeeze
if dpkg-divert --listpackage /usr/share/desktop-base/grub_background.sh.orig >/dev/null; then
dpkg-divert --package debian-edu-artwork \
--rename --remove /usr/share/desktop-base/grub_background.sh
fi
- # treat previous version
- if dpkg-divert --listpackage /etc/gdm3/greeter.gsettings >/dev/null; then
- dpkg-divert --package debian-edu-artwork \
- --remove /etc/gdm3/greeter.gsettings
- fi
-
/usr/share/debian-edu-artwork/update-artwork $1
;;
esac
More information about the debian-edu-commits
mailing list