[25383] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r24941 - trunk/debathena/config/auto-update/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Mon Feb 7 13:02:52 2011

Date: Mon, 7 Feb 2011 13:02:46 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201102071802.p17I2kCc006015@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:02:46 -0500 (Mon, 07 Feb 2011)
New Revision: 24941

Modified:
   trunk/debathena/config/auto-update/debian/athena-auto-update
   trunk/debathena/config/auto-update/debian/changelog
   trunk/debathena/config/auto-update/debian/debathena-auto-update.default
Log:
In auto-update:
  * Configurable conffile conflict behavior on workstation (Trac #543)


Modified: trunk/debathena/config/auto-update/debian/athena-auto-update
===================================================================
--- trunk/debathena/config/auto-update/debian/athena-auto-update	2011-02-07 18:02:18 UTC (rev 24940)
+++ trunk/debathena/config/auto-update/debian/athena-auto-update	2011-02-07 18:02:46 UTC (rev 24941)
@@ -182,7 +182,23 @@
 fi
 
 APTITUDE_OPTS=
+UPDATE_FORCE_CONFFILE=old
+[ -f /etc/default/debathena-auto-update ] && . /etc/default/debathena-auto-update
+case $UPDATE_FORCE_CONFFILE in
+    old) 
+	APTITUDE_OPTS="-o Dpkg::Options::=--force-confold"
+	;;
+    new)
+	APTITUDE_OPTS="-o Dpkg::Options::=--force-confnew"
+	;;
+    *)
+	complain "Invalid value for UPDATE_FORCE_CONFFILE"
+	exit
+	;;
+esac
+
 # On cluster machines, force the new conffile if there's a conflict
+# Ignore /etc/default/debathena-auto-update
 if dpkg-query --showformat '${Status}\n' -W "debathena-cluster" 2>/dev/null | grep -q ' installed$'; then
     APTITUDE_OPTS="-o Dpkg::Options::=--force-confnew"
 fi

Modified: trunk/debathena/config/auto-update/debian/changelog
===================================================================
--- trunk/debathena/config/auto-update/debian/changelog	2011-02-07 18:02:18 UTC (rev 24940)
+++ trunk/debathena/config/auto-update/debian/changelog	2011-02-07 18:02:46 UTC (rev 24941)
@@ -2,8 +2,9 @@
 
   * 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)
 
- -- Jonathan Reed <jdreed@mit.edu>  Thu, 03 Feb 2011 14:42:33 -0500
+ -- Jonathan Reed <jdreed@mit.edu>  Mon, 07 Feb 2011 13:02:38 -0500
 
 debathena-auto-update (1.20) unstable; urgency=low
 

Modified: trunk/debathena/config/auto-update/debian/debathena-auto-update.default
===================================================================
--- trunk/debathena/config/auto-update/debian/debathena-auto-update.default	2011-02-07 18:02:18 UTC (rev 24940)
+++ trunk/debathena/config/auto-update/debian/debathena-auto-update.default	2011-02-07 18:02:46 UTC (rev 24941)
@@ -1,3 +1,15 @@
+# Defaults for athena-auto-update(8)
+
+# Note: The following does not apply when -cluster is installed
+# When a package ships a new configuration file, and the sysadmin has
+# made changes to that configuration file since it was originally
+# installed, what should happen?
+# Values:
+#   old - the old file is kept, and the new file is installed with
+#         a .dpkg-new suffix
+#   new - the old file is overwritten by the new file
+UPDATE_FORCE_CONFFILE=old
+
 # Defaults for athena-auto-upgrade(8)
 
 # Warning:


home help back first fref pref prev next nref lref last post