On Fri, Jun 02, 2000 at 05:50:43AM -0700, Michael Epting wrote: [snip] > > The apt-get manpage refers to a "hold" attribute, which I suspect is the > way out of this mess, but how do I apply that attribute to a package > that I want to not be replaced? I've messed about a bit with dselect, > but that is one non-intuitive app to use, and I'm not sure that will do > it anyway. (Yes, I have read the man-pages and docs, but I probably > have missed something). i wrote two very small shell scripts to make this rather simple, do be cautious that if you type the packagename wrong it will be marked to install or hold, i think even if it does not exist! (there could probably be better error checking but i am lazy ;-)) dhold: put a package on hold dunhold: take a pacakge off hold /usr/local/sbin/dhold: #! /bin/sh PRG=`basename $0` if [ `id -u` != 0 ] ; then echo "you're not root, go away." exit 1 elif [ $# != 1 ] ; then echo "Usage: $PRG <packagename>" exit 1 else echo $1 hold | dpkg --set-selections fi and /usr/local/sbin/dunhold: #! /bin/sh PRG=`basename $0` if [ `id -u` != 0 ] ; then echo "you're not root, go away." exit 1 elif [ $# != 1 ] ; then echo "Usage: $PRG <packagename>" exit 1 else echo $1 install | dpkg --set-selections fi works ok for me so long as i type the package name correctly ;-) -- Ethan Benson http://www.alaska.net/~erbenson/
Attachment:
pgp0m3kYnjdTc.pgp
Description: PGP signature