[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libc5 to libc6 auto-upgrade script

i think we're going to need some sort of auto-upgrade script to include on
the hamm release CD rom, because dselect just can't do the libc6 upgrade
safely (AFAIK).  The CD will also Need a top-level README.NOW file saying
run this script first or suffer the consequences...would be nice if we
could have a note printed on the "Oficial" :-) CD-ROMS produces by various
manufacturers too.

Anyway, I wrote a primitive one based on Scott Ellis' HOWTO.

Here it is.  This script is untested.  I've never actually run it.  It
is, however, an accurate duplicate of what I've done by hand over a
dozen times by now.  It will probably need some tweaking, in particular,
the command line options for dpkg may need some --force- options.

Also, all the "*/foo_*.deb" filenames should probably be replaced with
the correct section directories.

Anyone got a bo machine they want to test this on?  I haven't got any left,
they're all upgraded now :-)

--- cut here --- 
#! /bin/sh

# upgrade a libc5 (bo) machine to libc6 (hamm).

# based on Scott Ellis' excellent "Debian libc5 to libc6 Mini-HOWTO"
# document.

# first, build up a list of installed -dev packages so that we can
# remove them.
# this is necessary even on machines which aren't doing libc6
# development because libc5 can't be upgraded to latest without removal
# of libc5-dev which also necessitates removal of other -dev packages
# like libdb1-dev and libdl1-dev if they are installed.

DEVPACKAGES=`dpkg --get-selections | 
	grep -- -dev | 
	grep -v deinstall | 
	cut -f1`

dpkg --purge $DEVPACKAGES

# now install the new versions of things.  Just the bare minimum to let
# the user safely run dselect for the rest of the upgrade.

# change this to prompt the user for the location of the debian archive.

cd /debian/dists/unstable/main/binary-i386

# libc
dpkg -iB */ldso_*.deb */libc5_*.deb */libc6_*.deb

# bash
dpkg -iB */ncurses3.0_*.deb */ncurses3.4_*.deb 
dpkg -iB */libreadline2_*.deb */libreadlineg2_*.deb
# paranoia says run ldconfig NOW. don't laugh, i've needed to do this on
# some libc5-libc6 upgrades. i know that the postinst scripts for the
# libs are supposed to do it but ....
dpkg -iB */bash_*.deb

# new dpkg
dpkg -iB */libg++272_*.deb
dpkg -iB */dpkg_*.deb */dpkg-dev_*.deb */dpkg-ftp_*.deb

# perl
dpkg -iB */libgdbm_*.deb */libgdbm1g_*.deb
# paranoia says "run ldconfig now".
dpkg -iB */perl-base_*.deb */perl_*.deb

# the user can now run dselect and select any -dev packages they want
# (and other packages too, of course :-)

--- cut here---

craig sanders

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: