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

Re: apt frustration



Brian Servis <servis@purdue.edu> wrote:
> 
> Probably the best way is to use the 'hold' feature of dselect.  Get
> your system set up as you want with stable then use dselect to put the
> packages you want to keep the same on 'hold' with the '=' key.  Then
> modify your /etc/apt/sources.list to include the unstable branch. 
> Then
> only update packages using dselect select method.  I'm not sure what
> happens if a package you want to upgrade depends on a later version of
> a package you have on hold. 

I have found that if a package is on 'hold' then it will not be upgraded
by art either. A member of this list sent me a small script which will
put a package on hold without needing to start dselect (which I avoid
like the plague). I found this useful when the latest version of Exim
wouldn't work on my system. I held it back for a while and was able to
regularly upgrade Potato on my machine without fear of losing the mail
facility. As soon as I worked out what the problem was I manually
upgraded the package and it was then not held back. 

---- start

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

---- end

AFAIK apt will not attempt to upgrade packages dependent on the package
held back. Perhaps someone else can verify this?


--
Phillip Deackes
Debian Linux (Potato) 


Reply to: