[26049] in Source-Commits
Re: /svn/athena r25363 - trunk/debathena/config/auto-update/debian
daemon@ATHENA.MIT.EDU (Jonathan Reed)
Tue Aug 9 07:07:22 2011
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Jonathan Reed <jdreed@MIT.EDU>
In-Reply-To: <201108090821.p798LQ4a023567@drugstore.mit.edu>
Date: Tue, 9 Aug 2011 07:07:13 -0400
Cc: source-commits@mit.edu
Message-Id: <DA30F94A-C613-4CEA-9B64-42F7129B0EAB@mit.edu>
To: Geoffrey Thomas <geofft@mit.edu>
Content-Transfer-Encoding: 8bit
I'm not convinced that running it with timeout(1) under Lucid was necessary at all. I'm going to assume you tested the Depends clause on both Lucid and Natty?
On Aug 9, 2011, at 4:21 AM, Geoffrey Thomas wrote:
> 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.
>