[25519] in Source-Commits

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

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

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Wed Mar 16 12:59:17 2011

Date: Wed, 16 Mar 2011 12:59:11 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201103161659.p2GGxBoE032214@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2011-03-16 12:59:10 -0400 (Wed, 16 Mar 2011)
New Revision: 25049

Modified:
   trunk/debathena/config/auto-update/debian/athena-auto-update
   trunk/debathena/config/auto-update/debian/changelog
Log:
In auto-update:
  * Check for new flag file from license-config when reconfiguring


Modified: trunk/debathena/config/auto-update/debian/athena-auto-update
===================================================================
--- trunk/debathena/config/auto-update/debian/athena-auto-update	2011-03-16 16:58:24 UTC (rev 25048)
+++ trunk/debathena/config/auto-update/debian/athena-auto-update	2011-03-16 16:59:10 UTC (rev 25049)
@@ -256,31 +256,35 @@
   exit
 fi
 
-# Update debathena-license-config and reconfigure any packages if necessary
+# Update debathena-license-config 
 pattern='^0 packages upgraded, 0 newly installed, 0 to remove'
 licenses=/usr/share/debathena-license-config/debathena-license-selections
 if ! v aptitude --simulate --assume-yes install debathena-license-config | grep -q "$pattern"; then
-  if v aptitude --assume-yes install debathena-license-config; then
-      if [ -f $licenses ]; then
-	  for p in $(awk '{print $1}' $licenses); do
-	      if dpkg-query --showformat '${Status}\n' -W $p 2>/dev/null | grep -q ' installed$'; then
-		  if ! v dpkg-reconfigure -fnoninteractive $p; then
-		      # Don't fail here
-		      complain "Failed to dpkg-reconfigure $p"
-		  fi
-	      fi
-	  done
-      else
-	  complain "Could not find $licenses"
-	  exit
-      fi
-  else
+  if ! v aptitude --assume-yes install debathena-license-config; then
       complain "Failed to update debathena-license-config"
       exit
   fi
 fi
 
+# If new licenses were installed, deal.
+if [ -f /var/lib/debathena-license-config/reconfigure_required ]; then
+    rm -f /var/lib/debathena-license-config/reconfigure_require
+    if [ -f $licenses ]; then
+	for p in $(awk '{print $1}' $licenses); do
+	    if dpkg-query --showformat '${Status}\n' -W $p 2>/dev/null | grep -q ' installed$'; then
+		if ! v dpkg-reconfigure -fnoninteractive $p; then
+		      # Don't fail here
+		    complain "Failed to dpkg-reconfigure $p"
+		fi
+	    fi
+	done
+    else
+	complain "Could not find $licenses"
+	exit
+    fi
+fi
 
+
 # Exit quietly (except for perhaps rebooting) if there are no upgrades
 # to take.
 if v aptitude --simulate --assume-yes full-upgrade | grep -q "$pattern"; then

Modified: trunk/debathena/config/auto-update/debian/changelog
===================================================================
--- trunk/debathena/config/auto-update/debian/changelog	2011-03-16 16:58:24 UTC (rev 25048)
+++ trunk/debathena/config/auto-update/debian/changelog	2011-03-16 16:59:10 UTC (rev 25049)
@@ -5,8 +5,9 @@
   * Add new command-line options to auto-update
   * Run aptitude install (Trac #528)
   * auto-update checks for network connectivity to the mirrors (Trac #835)
+  * Check for new flag file from license-config when reconfiguring
 
- -- Jonathan Reed <jdreed@mit.edu>  Tue, 15 Mar 2011 22:18:22 -0400
+ -- Jonathan Reed <jdreed@mit.edu>  Wed, 16 Mar 2011 12:59:06 -0400
 
 debathena-auto-update (1.22.2) unstable; urgency=low
 


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