[25434] in Source-Commits

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

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

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu Feb 24 16:29:23 2011

Date: Thu, 24 Feb 2011 16:29:17 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201102242129.p1OLTHNG029588@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2011-02-24 16:29:17 -0500 (Thu, 24 Feb 2011)
New Revision: 24980

Modified:
   trunk/debathena/config/auto-update/debian/athena-auto-update
   trunk/debathena/config/auto-update/debian/changelog
Log:
In auto-update:
  * Install debathena-license-config and reconfigure packages as necessary


Modified: trunk/debathena/config/auto-update/debian/athena-auto-update
===================================================================
--- trunk/debathena/config/auto-update/debian/athena-auto-update	2011-02-24 01:55:15 UTC (rev 24979)
+++ trunk/debathena/config/auto-update/debian/athena-auto-update	2011-02-24 21:29:17 UTC (rev 24980)
@@ -158,9 +158,32 @@
   exit
 fi
 
+# Update debathena-license-config and reconfigure any packages if necessary
+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
+		      complain "Failed to dpkg-reconfigure $p"
+		  fi
+	      fi
+	  done
+      else
+	  complain "Could not find $licenses"
+	  exit
+      fi
+  else
+      complain "Failed to update debathena-license-config"
+      exit
+  fi
+fi
+
+
 # Exit quietly (except for perhaps rebooting) if there are no upgrades
 # to take.
-pattern='^0 packages upgraded, 0 newly installed, 0 to remove'
 if v aptitude --simulate --assume-yes full-upgrade | grep -q "$pattern"; then
   echo "Nothing to do!"
   save_success "No updates"

Modified: trunk/debathena/config/auto-update/debian/changelog
===================================================================
--- trunk/debathena/config/auto-update/debian/changelog	2011-02-24 01:55:15 UTC (rev 24979)
+++ trunk/debathena/config/auto-update/debian/changelog	2011-02-24 21:29:17 UTC (rev 24980)
@@ -1,3 +1,9 @@
+debathena-auto-update (1.22) unstable; urgency=low
+
+  * Install debathena-license-config and reconfigure packages as necessary
+
+ -- Jonathan Reed <jdreed@mit.edu>  Thu, 24 Feb 2011 16:29:09 -0500
+
 debathena-auto-update (1.21) unstable; urgency=low
 
   * Generate crontabs at configure time (Trac #791)


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