Re: Holding packages w/o dselect
James Di Toro <karrde@gateway.greenbush.com> writes:
> I've looked through the help screens and man pages of both dpkg and
> apt-get and I can't find anything that will let me place a package version
> on hold using these tools. I'd like to avoid using dselect if possible
> since a) the structure of the categorys is at times unintutive, and b) the
> last time I wen't int there is screwed up some dependancys and I got stuck
> in an infinate dependancy conflict resolution. Don't want to go through
> that again.
Try the following script from Craig Sanders <cas@taz.net.au>:
---cut here---
#! /bin/bash
# dpkg-hold -- command line tool to flag package(s) as held.
#
# by Craig Sanders, 1998-10-26. This script is hereby placed into the
# public domain.
#
# BUGS: this script has absolutely no error checking. this is not good.
if [ -z "$*" ] ; then
echo "Usage:"
echo " dpkg-hold <package...>"
exit 1
fi
for i in $@ ; do
echo "$i hold"
done | dpkg --set-selections
---cut here---
Despite the caveat about error checking, I have had good results
with it. It is trivial to modify it to make dpkg-unhold.
Bob
--
_
|_) _ |_ Robert D. Hilliard <hilliard@debian.org>
|_) (_) |_) 1294 S.W. Seagull Way <bob@bobhilliard.net>
Palm City, FL USA GPG Key ID: 390D6559
PGP Key ID: A8E40EB9
Reply to: