[3598] in SIPB_Linux_Development
installer changes
daemon@ATHENA.MIT.EDU (Angie Kelic)
Sat Dec 1 14:12:33 2001
Message-Id: <200112011908.OAA11696@cutter-john.mit.edu>
To: linux-dev@MIT.EDU
Date: Sat, 01 Dec 2001 14:08:35 -0500
From: Angie Kelic <sly@MIT.EDU>
Ok, so this uses python to grab the control file from the
web. The only gotcha is that the ATHENAVERSION variable
will need to be incremented when (if?) the rpms that we're
installing get updated.
Diff against the reverted version of installclass.py (r1.6)
cutter-john:~ % diff -u installclass.py.src installclass.py
--- installclass.py.src Fri Nov 30 18:32:16 2001
+++ installclass.py Sat Dec 1 14:02:36 2001
@@ -220,7 +220,7 @@
self.setPostScript('''
#!/bin/sh
-ATHENAVERSION=8.4.0
+ATHENAVERSION=8.4.25
ROOT=/
# Get network address:
@@ -290,14 +290,13 @@
fi
fi
-# This is a kluge and requires knowing how rpmupdate parses the
-# release-rpms file. It also assumes we are not doing any custom
-# installs, since it lists every installed rpm in release-rpms.
-# rpmupdate knows that any rpm listed in release-rpms was all
-# installed by the release, and if the release doesn't think the rpm
-# should be installed any more, rpmupdate will remove it.
-rpm -qa --queryformat '/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n' | \
- grep -v '^kernel-smp' > /var/athena/release-rpms
+#This copies the correct version of release-rpms out of afs using the
+#web (we need to export the variable before python can use it)
+
+ATHENA_URL="http://web.mit.edu/afs/athena/system/rhlinux/control/list-$ATHENAVERSION"
+export ATHENA_URL
+
+python -c "import os, urllib; open('/var/athena/release-rpms', 'w').write(urllib.urlopen(os.environ['ATHENA_URL']).read())"
cp /tmp/install.log /var/athena/install.log
chmod 600 /var/athena/install.log