debian dependecy hell

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Aug 3 15:43:38 UTC 2004


On Sat, Jul 31, 2004 at 11:09:20AM -0400, Peter L. Peres wrote:
> Ah, pinning. I have seen this term in the documentation before. What is 
> pinning, exactly ? I take it that it sets priority for packages and then 
> the packaging system chooses packages with higher priority when it has 
> choices. No ? The documentation I have seen so far is severely lacking in 
> terminology description. A glossary added to the apt-howto would be a good 
> start imho.
> 
> Thatnk you for your answers, it is very useful,

Well here is how pinning works on Debian:

I have a system runnign Debian Testing as it's main system.  it could be
stable as well (unstable is always unstable so no real point doing
pinning on it).  I have in my sources.list both testing and unstable
lines, like this:

deb http://ftp.debian.org/debian testing main contrib non-free
deb-src http://ftp.debian.org/debian testing main contrib non-free
deb http://ftp.debian.org/debian unstable main contrib non-free
deb-src http://ftp.debian.org/debian unstable main contrib non-free

Then I have a file in /etc/apt/apt.conf.d/01default which contains:
APT::Default-Release "testing";

This tells APT that whenever I install stuff or upgrade stuff, packages
from testing are my preference.  This prevents me getting everything
upgraded to the unstable versions unless I explicitly request it.  By
default apt installs the newest version it has in its sources.

When I install a package, I do:

apt-get install packagenames, and I get the testing version.  If instead
I do:

apt-get install -t unstable packagenames, I get the unstable release
versions of those packages.  To do it for individual packages I can do:

apt-get install package1 package2/unstable package3, where package1 and
3 will be testing and package2 will be unstable.  It will give similar
errors to what you saw if it isn't possible to install a package without
installing additional unstable packages.  Usnig apt-get install -t
unstable packagename, it will auto select dependancies from unstable.

apt-showversions |grep unstable, is one way to check which packages are
currently from unstable on the system.  It can also show which are not
up to date, or which are local and I think it can list obsolete too by
some definition of obsolete.

Once you install a package with a tagged versions, it will continue to
use that versions when upgrading.  So if you install the unstable
version of libpng12, it will grab the latest version from unstable
whenever you do an upgrade with apt-get.  You can drop back down to the
testing version using apt-get install packagename/testing which will
force a downgrade (if testing and unstable are different versions at the
time) and in either case will tag that package back to always using the
testing version.  If you wanted to you could add stable as well and tag
packages from stable to be used as well.

This setup allows you to mix and match which packages you really want
the latest and greatest of, and which you would rather just have
generally work.  it doesn't always work, since sometimes a transition is
taking place in unstable and libs go to hell and it start wanting to
uninstall stuff.  In that case either don't do an upgrade, or tell it
which package to install the latest version of manually, and leave the
troublesome packages for a few days until the libs finish the
transition.

Lennart Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list