[25384] in Source-Commits
/svn/athena r24942 - trunk/debathena/config/auto-update/debian
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Mon Feb 7 13:40:42 2011
Date: Mon, 7 Feb 2011 13:40:36 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201102071840.p17Ieadp013061@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jdreed
Date: 2011-02-07 13:40:36 -0500 (Mon, 07 Feb 2011)
New Revision: 24942
Added:
trunk/debathena/config/auto-update/debian/debathena-auto-update.postrm
Modified:
trunk/debathena/config/auto-update/debian/changelog
trunk/debathena/config/auto-update/debian/debathena-auto-update.postinst
Log:
In auto-update:
* Pre-seed /var/lib/athena-update-status (Trac #686)
* Cleanup status file on uninstall
Modified: trunk/debathena/config/auto-update/debian/changelog
===================================================================
--- trunk/debathena/config/auto-update/debian/changelog 2011-02-07 18:02:46 UTC (rev 24941)
+++ trunk/debathena/config/auto-update/debian/changelog 2011-02-07 18:40:36 UTC (rev 24942)
@@ -3,8 +3,10 @@
* Generate crontabs at configure time (Trac #791)
* Run an update at boot time if it's been too long since the last one
* Configurable conffile conflict behavior on workstation (Trac #543)
+ * Pre-seed /var/lib/athena-update-status (Trac #686)
+ * Cleanup status file on uninstall
- -- Jonathan Reed <jdreed@mit.edu> Mon, 07 Feb 2011 13:02:38 -0500
+ -- Jonathan Reed <jdreed@mit.edu> Mon, 07 Feb 2011 13:31:32 -0500
debathena-auto-update (1.20) unstable; urgency=low
Modified: trunk/debathena/config/auto-update/debian/debathena-auto-update.postinst
===================================================================
--- trunk/debathena/config/auto-update/debian/debathena-auto-update.postinst 2011-02-07 18:02:46 UTC (rev 24941)
+++ trunk/debathena/config/auto-update/debian/debathena-auto-update.postinst 2011-02-07 18:40:36 UTC (rev 24942)
@@ -43,6 +43,10 @@
rm /var/lib/athena-update-status
fi
+ if [ ! -f /var/lib/athena-update-status ]; then
+ echo "$(date +"%s")|$(date +"%s")|ok|Package configured" > /var/lib/athena-update-status
+ fi
+
rm -f $UPD_CRONFILE
rm -f $UPG_CRONFILE
Added: trunk/debathena/config/auto-update/debian/debathena-auto-update.postrm
===================================================================
--- trunk/debathena/config/auto-update/debian/debathena-auto-update.postrm (rev 0)
+++ trunk/debathena/config/auto-update/debian/debathena-auto-update.postrm 2011-02-07 18:40:36 UTC (rev 24942)
@@ -0,0 +1,41 @@
+#!/bin/sh
+# postrm script for debathena-auto-update
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ if [ -z "$2" ]; then
+ # Cleanup status file
+ rm -f /var/lib/athena-update-status
+ fi
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0