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

Re: holding packages



On Sun, Mar 04, 2001 at 09:05:39PM +1100, Brian May wrote:
> Personally I would like to be able to do something like:
> 
> dpkg --setstatus hold libldap2-dev libsasl-dev libhsync0 libhsync-dev
> 
> all on the one dpkg command line.

i've posted this to the list a few times before. save it as
/usr/local/sbin/dpkg-hold:

#! /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



there are obvious variations for dpkg-unhold, dpkg-purge, and
dpkg-remove.

craig


--
craig sanders <cas@taz.net.au>

      GnuPG Key: 1024D/CD5626F0 
Key fingerprint: 9674 7EE2 4AC6 F5EF 3C57  52C3 EC32 6810 CD56 26F0



Reply to: