Re: Holding packages w/o dselect
James Di Toro <email@example.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 <firstname.lastname@example.org>:
# 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 " dpkg-hold <package...>"
for i in $@ ; do
echo "$i hold"
done | dpkg --set-selections
Despite the caveat about error checking, I have had good results
with it. It is trivial to modify it to make dpkg-unhold.
|_) _ |_ Robert D. Hilliard <email@example.com>
|_) (_) |_) 1294 S.W. Seagull Way <firstname.lastname@example.org>
Palm City, FL USA GPG Key ID: 390D6559
PGP Key ID: A8E40EB9