dpkg-hold (was Re: WARNING about XFree86!)
On 19 Oct 1998, Steve Dunham wrote:
> Replace "install" with "hold" in the "/var/lib/dpkg/status" file, or
> save the following perl script as "dpkg-hold", make it executable and
> do:
>
> dpkg-hold xbase xlib6g
>
> (Apologies to those whose perl is more elegant than mine.)
[ neat perl script deleted ]
here's a simpler shell version, which should keep on working even if the
format of the files in /var/lib/dpkg ever changes:
---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---
this script could be easily generalised to do install and de-install
as well as hold....
craig
--
craig sanders
Reply to: