[3593] in SIPB_Linux_Development

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

Re: testing failure

daemon@ATHENA.MIT.EDU (Derek Atkins)
Fri Nov 30 18:43:14 2001

To: Angie Kelic <sly@MIT.EDU>
Cc: linux-dev@MIT.EDU
From: Derek Atkins <warlord@MIT.EDU>
Date: 30 Nov 2001 18:43:12 -0500
In-Reply-To: Angie Kelic's message of "Fri, 30 Nov 2001 18:35:39 -0500"
Message-ID: <sjm667rn7u7.fsf@benjamin.ihtfp.org>

This wont help with the Epoch problem which also needs to be fixed
if we want a direct update from a SIPB-installed machine to 9.0

-derek

Angie Kelic <sly@MIT.EDU> writes:

> Note: someone who knows python should sanity check the command.
> 
> So, it turns out that the script runs in a CHROOT'd environment
> of /mnt/sysimage -- this means that any reference to / will
> do the wrong thing.
> 
> Can you please revert the changes I made?
> 
> I submit the following as a slightly cleaner way to do the whole
> thing in python that won't actually require anyone to change
> anything in this script or extraneous files when they copy in
> new RPMS -- basically, it figures out which athena version it
> is on its own (we hope):
> 
> prowler:~ % diff -u installclass.py.src installclass.py
> --- installclass.py.src	Fri Nov 30 18:32:16 2001
> +++ installclass.py	Fri Nov 30 18:12:01 2001
> @@ -220,7 +220,7 @@
>  	self.setPostScript('''
>  #!/bin/sh
>  
> -ATHENAVERSION=8.4.0
> +ATHENAVERSION=`machtype -L`
>  ROOT=/
>  
>  # Get network address:
> @@ -290,14 +290,14 @@
>    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
> +#Let's try this in Python, it's cleaner and will require fewer changes
> +#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
> 

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available

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