[26048] in Source-Commits

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

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

daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Tue Aug 9 04:21:33 2011

Date: Tue, 9 Aug 2011 04:21:26 -0400
From: Geoffrey Thomas <geofft@MIT.EDU>
Message-Id: <201108090821.p798LQ4a023567@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: geofft
Date: 2011-08-09 04:21:26 -0400 (Tue, 09 Aug 2011)
New Revision: 25363

Modified:
   trunk/debathena/config/auto-update/debian/athena-auto-update
   trunk/debathena/config/auto-update/debian/changelog
   trunk/debathena/config/auto-update/debian/control.in
Log:
In auto-update:
  * Depend on the timeout package if necessary. Also special-case that
    package's timeout command, as it has different syntax.


Modified: trunk/debathena/config/auto-update/debian/athena-auto-update
===================================================================
--- trunk/debathena/config/auto-update/debian/athena-auto-update	2011-08-09 03:04:09 UTC (rev 25362)
+++ trunk/debathena/config/auto-update/debian/athena-auto-update	2011-08-09 08:21:26 UTC (rev 25363)
@@ -55,6 +55,16 @@
   fi
 }
 
+withtimeout () {
+  if dpkg-query --showformat '${Status}\n' -W timeout 2>/dev/null | grep -q ' installed$'; then
+    # tct timeout
+    timeout 1810 timeout -15 1800 "$@"
+  else
+    # coreutils timeout
+    timeout -k 10s 30m "$@"
+  fi
+}
+
 SKIP_REBOOT="n"
 DEBUG="n"
 VERBOSE="n"
@@ -291,7 +301,7 @@
 fi
 
 # Download packages first.
-if ! v timeout -k 10s 30m aptitude --quiet --assume-yes --download-only full-upgrade; then
+if ! v withtimeout aptitude --quiet --assume-yes --download-only full-upgrade; then
   complain "download failed"
   exit
 fi
@@ -324,7 +334,7 @@
 # that the best course of action is to remove the Debathena
 # metapackage, so be paranoid about that.
 v aptitude --quiet --assume-yes keep-all
-v timeout -k 10s 30m aptitude --quiet --assume-yes --download-only dist-upgrade
+v withtimeout aptitude --quiet --assume-yes --download-only dist-upgrade
 if result=$(aptitude -F "%p" search '?action(remove) (^debathena-cluster$ | ^debathena-workstation$ | ^debathena-login$ | ^debathena-standard$ | ^openafs-modules-~D^linux-image-)')
   [ -n "$result" ]; then
   echo "** metapackages would be removed by the update, aborting:" $result

Modified: trunk/debathena/config/auto-update/debian/changelog
===================================================================
--- trunk/debathena/config/auto-update/debian/changelog	2011-08-09 03:04:09 UTC (rev 25362)
+++ trunk/debathena/config/auto-update/debian/changelog	2011-08-09 08:21:26 UTC (rev 25363)
@@ -1,3 +1,10 @@
+debathena-auto-update (1.34) unstable; urgency=low
+
+  * Depend on the timeout package if necessary. Also special-case that
+    package's timeout command, as it has different syntax.
+
+ -- Geoffrey Thomas <geofft@mit.edu>  Tue, 09 Aug 2011 04:15:19 -0400
+
 debathena-auto-update (1.33) unstable; urgency=low
 
   * Ensure that aptitude install succeeds before describing the update as

Modified: trunk/debathena/config/auto-update/debian/control.in
===================================================================
--- trunk/debathena/config/auto-update/debian/control.in	2011-08-09 03:04:09 UTC (rev 25362)
+++ trunk/debathena/config/auto-update/debian/control.in	2011-08-09 08:21:26 UTC (rev 25363)
@@ -7,6 +7,6 @@
 
 Package: debathena-auto-update
 Architecture: all
-Depends: ${misc:Depends}, bsdutils, debathena-desync, cron, aptitude, apt-file, kexec-tools, bc, debathena-license-config
+Depends: ${misc:Depends}, bsdutils, debathena-desync, cron, aptitude, apt-file, kexec-tools, bc, debathena-license-config, coreutils (>= 7.5) | timeout
 Description: Performs automatic updates for Athena machines.
  This package performs automatic updates for Athena machines.


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