[23579] in Source-Commits
/svn/athena r23220 - trunk/debathena/config/auto-update/debian
daemon@ATHENA.MIT.EDU (andersk@MIT.EDU)
Tue Oct 28 15:12:56 2008
Date: Tue, 28 Oct 2008 15:12:28 -0400 (EDT)
From: andersk@MIT.EDU
Message-Id: <200810281912.PAA16552@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: andersk
Date: 2008-10-28 15:12:27 -0400 (Tue, 28 Oct 2008)
New Revision: 23220
Modified:
trunk/debathena/config/auto-update/debian/athena-auto-update
trunk/debathena/config/auto-update/debian/changelog
Log:
In auto-update:
* Protect all installed debathena or openafs metapackages from removal.
Modified: trunk/debathena/config/auto-update/debian/athena-auto-update
===================================================================
--- trunk/debathena/config/auto-update/debian/athena-auto-update 2008-10-27 07:49:33 UTC (rev 23219)
+++ trunk/debathena/config/auto-update/debian/athena-auto-update 2008-10-28 19:12:27 UTC (rev 23220)
@@ -1,7 +1,7 @@
#!/bin/sh
complain() {
- logger -t "$(gethostname --fqdn)" -p user.notice "update: $1"
+ logger -t "$(gethostname --fqdn)" -p user.notice "update: $*"
}
maybe_reboot() {
@@ -101,23 +101,6 @@
exit
fi
-# Determine which metapackage we have installed.
-metapackage=
-for pkg in cluster workstation login standard; do
- status=$(dpkg-query -Wf '${status}' debathena-$pkg 2>/dev/null)
- case $status in (*installed)
- metapackage=debathena-$pkg
- break
- ;;
- esac
-done
-if [ -z "$metapackage" ]; then
- echo "** Can't find an installed Debathena metapackage, exiting."
- complain "no metapackage found"
- exit
-fi
-echo "** Found metapackage $metapackage"
-
# If the debathena-reactivate package is installed, call into the
# login snapshot script to create a root snapshot for the next update.
if [ -x /usr/sbin/athena-login-snapshot ]; then
@@ -130,11 +113,11 @@
# metapackage, so be paranoid about that.
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"
+result=$(aptitude -F "%p" search '~i!~VTARGET(^debathena-cluster$ | ^debathena-workstation$ | ^debathena-login$ | ^debathena-standard$ | ^openafs-modules-~D^linux-image-)')
+if [ -n "$result" ]; then
+ echo "** metapackages would be removed by the update, aborting:" $result
v aptitude --quiet --assume-yes keep-all
- complain "$metapackage would be removed by update"
+ complain "metapackages would be removed by update:" $result
else
v aptitude --quiet --assume-yes install
fi
Modified: trunk/debathena/config/auto-update/debian/changelog
===================================================================
--- trunk/debathena/config/auto-update/debian/changelog 2008-10-27 07:49:33 UTC (rev 23219)
+++ trunk/debathena/config/auto-update/debian/changelog 2008-10-28 19:12:27 UTC (rev 23220)
@@ -1,3 +1,9 @@
+debathena-auto-update (1.6) unstable; urgency=low
+
+ * Protect all installed debathena or openafs metapackages from removal.
+
+ -- Anders Kaseorg <andersk@mit.edu> Tue, 28 Oct 2008 15:08:18 -0400
+
debathena-auto-update (1.5) unstable; urgency=low
* Set DEBCONF_FRONTEND=noninteractive during updates.