Bill Jonas on Wed, 28 Jun 2000 18:17:29 -0400 (EDT)


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

Re: [PLUG] apt-get upgrade


On Wed, 28 Jun 2000 vkenny@quarterleaf.com wrote:

>I'm in the process of doing an apt-get upgrade, and I don't want to upgrade the
>PCMCIA stuff.  How can I tell apt-get to upgrade everything but the PCMCIA
>package?

I had the a similar problem on a system a little while ago, except I
wanted to hold the X Windows stuff.  It's answered in the Debian FAQ,
"6.12 How do I put a package on hold?",
http://www.debian.org/doc/FAQ/ch-pkg_basics.html#s-puttingonhold.

It recommends redirecting the output of dpkg --get-selections to a file,
and then editing the file, and then redirecting the input to dpkg
--set-selections.  If you don't want to do the intermediate step, you
always use grep, awk, sed, and piping creatively, like this:

# dpkg --get-selections | grep -i "pcmcia" | sed -e "s/install$/hold/" |
dpkg --set-selections

(Or, if you want to use sudo, put sudo before the last dpkg command.)

Another possibility:

# apt-cache search pcmcia | awk '{print$1}' | sed -e "s/^.*/& hold/" |
dpkg --set-selections

If you then decide later to upgrade the packages, the man page for
apt-get tells of options to override the holds you've put on packages.

Bill
-- 
>Ever heard of .cshrc?             | "Linux means never having to delete
That's a city in Bosnia. Right?    |  your love mail." -- Don Marti
(Discussion in comp.os.linux.misc  |  http://www.billjonas.com/
on the intuitiveness of commands.) |  http://www.harrybrowne.org/


______________________________________________________________________
Philadelphia Linux Users Group       -       http://plug.nothinbut.net
Announcements - http://lists.nothinbut.net/mail/listinfo/plug-announce
General Discussion   -   http://lists.nothinbut.net/mail/listinfo/plug