[23532] in Source-Commits

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

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

daemon@ATHENA.MIT.EDU (ghudson@MIT.EDU)
Fri Sep 12 10:40:44 2008

Date: Fri, 12 Sep 2008 10:26:01 -0400 (EDT)
From: ghudson@MIT.EDU
Message-Id: <200809121426.KAA00447@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: ghudson
Date: 2008-09-12 10:26:00 -0400 (Fri, 12 Sep 2008)
New Revision: 23174

Modified:
   trunk/debathena/config/auto-update/debian/athena-auto-update
   trunk/debathena/config/auto-update/debian/changelog
Log:
In auto-update:
  * Set DEBCONF_FRONTEND=noninteractive during updates.
  * Pass --assume-yes to more aptitude commands to avoid loops.


Modified: trunk/debathena/config/auto-update/debian/athena-auto-update
===================================================================
--- trunk/debathena/config/auto-update/debian/athena-auto-update	2008-09-11 19:40:05 UTC (rev 23173)
+++ trunk/debathena/config/auto-update/debian/athena-auto-update	2008-09-12 14:26:00 UTC (rev 23174)
@@ -57,8 +57,11 @@
    [ -n "$APT" ] && perl -pi.old -e 's|http://\S+|$ENV{"APT"}|e;' $slist)
 fi
 
+# Tell apt not to expect user input during package installation.
+export DEBIAN_FRONTEND=noninteractive
+
 # Update the aptitude cache.
-if ! aptitude update; then
+if ! aptitude --quiet --assume-yes update; then
   complain "aptitude update failed"
   exit
 fi
@@ -66,7 +69,7 @@
 # Exit quietly (except for perhaps rebooting) if there are no upgrades
 # to take.
 pattern='^0 packages upgraded, 0 newly installed, 0 to remove'
-if aptitude -s -y full-upgrade | grep -q "$pattern"; then
+if aptitude --simulate --assume-yes full-upgrade | grep -q "$pattern"; then
   maybe_reboot
   exit
 fi
@@ -93,7 +96,7 @@
 }
 
 # Download packages first.
-if ! v aptitude --quiet --download-only --assume-yes full-upgrade; then
+if ! v aptitude --quiet --assume-yes --download-only full-upgrade; then
   complain "download failed"
   exit
 fi
@@ -125,12 +128,12 @@
 # Perform the update.  In some corner cases, aptitude might decide
 # that the best course of action is to remove the Debathena
 # metapackage, so be paranoid about that.
-v aptitude -q keep-all
-v aptitude --quiet --schedule-only --assume-yes dist-upgrade
+v aptitude --quiet --assume-yes keep-all
+v aptitude --quiet --assume-yes --schedule-only dist-upgrade
 result=$(aptitude search "~S~VTARGET~n^$metapackage\$")
 if [ -z "$result" ]; then
   echo "** $metapackage would be removed by the update, aborting"
-  v aptitude --quiet keep-all
+  v aptitude --quiet --assume-yes keep-all
   complain "$metapackage would be removed by update"
 else
   v aptitude --quiet --assume-yes install

Modified: trunk/debathena/config/auto-update/debian/changelog
===================================================================
--- trunk/debathena/config/auto-update/debian/changelog	2008-09-11 19:40:05 UTC (rev 23173)
+++ trunk/debathena/config/auto-update/debian/changelog	2008-09-12 14:26:00 UTC (rev 23174)
@@ -1,3 +1,10 @@
+debathena-auto-update (1.5) unstable; urgency=low
+
+  * Set DEBCONF_FRONTEND=noninteractive during updates.
+  * Pass --assume-yes to more aptitude commands to avoid loops.
+
+ -- Greg Hudson <ghudson@mit.edu>  Fri, 12 Sep 2008 10:21:34 -0400
+
 debathena-auto-update (1.4) unstable; urgency=low
 
   * Fix a bug causing nothing to happen during updates.


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