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

Re: How can I put a package on hold without using Dselect?



Shaul Karl <shaulk@israsrv.net.il> wrote:
> Dselect is slow on my old machine. How can I put a package on hold
> without 
> using Dselect?
> dpkg does not have such an action as far as I can see.

I use a script someone on this list sent to me - save it as 'dpkg-hold'
and make it executable. To put a package on hold you simple use
'dpkg-hold pkgname'. Fits in nicely with other dpkg commands.

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


-- 
Phillip Deackes
Using Storm Linux



Reply to: