debian dependecy hell

Tim Writer tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org
Tue Aug 3 21:30:44 UTC 2004


lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org (Lennart Sorensen) writes:

> 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";

Another way to do this is:

    % cat > /etc/apt/preferences
    X-comment: ==================== Track testing
    Package: *
    Pin: release a=testing
    Pin-Priority: 600

    X-comment: ==================== Track stable (lower priority than testing)
    Package: *
    Pin: release a=stable
    Pin-Priority: 500

    X-comment: ==================== Make unstable available (for manual selection)
    Package: *
    Pin: release a=unstable
    Pin-Priority: 50
    ^D

Using /etc/apt/preferences gives more flexibility.  You can, for example,
prevent a particular package from being upgraded.  /etc/apt/preferences is
documented in Chapters 5 and 6 of the Debian Reference Manual:

    http://www.debian.org/doc/manuals/reference/reference.en.html

and in the APT HOWTO:

    http://www.debian.org/doc/manuals/apt-howto/index.en.html

[snip]

> 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.

I think you mean "apt-show-versions" and you'll need the apt-show-versions
package installed, i.e.

    apt-get install apt-show-versions

> Once you install a package with a tagged versions, it will continue to
> use that versions when upgrading.

Is that true?  I think it justs selects a package based on the priorities
documented in apt_preferences(5).  For example, on my system:

    halley:~# apt-show-versions | grep imagemagick
    imagemagick/unstable upgradeable from 5:6.0.2.5-1 to 5:6.0.3.5-2
    halley:~# apt-get -s install imagemagick
    Reading Package Lists... Done
    Building Dependency Tree... Done
    imagemagick is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
    halley:~# apt-get -s -t unstable install imagemagick
    Reading Package Lists... Done
    Building Dependency Tree... Done
    The following extra packages will be installed:
      libjasper-1.701-1 libmagick6 libtiff4 libxml2
    Suggested packages:
      html2ps libjasper-runtime
    Recommended packages:
      xml-core
    The following NEW packages will be installed:
      libjasper-1.701-1 libtiff4
    The following packages will be upgraded:
      imagemagick libmagick6 libxml2
    3 upgraded, 2 newly installed, 0 to remove and 790 not upgraded.
    ...

Similarly,

    apt-get upgrade

won't upgrade imagemagick but

    apt-get -t unstable upgrade

will.  Along with everything else (so don't do this)!

[snip]

> 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.

Yes, it's not for everybody.  If you're not comfortable with the Linux
command line and Linux system administration but you want to use Debian as
your desktop, straight testing is probably your best bet.  On the other hand,
if you're doing development on Debian you probably do need to become familiar
with apt pinning.

-- 
tim writer <tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org>                                  starnix inc.
905.771.0017 ext. 225                           thornhill, ontario, canada
http://www.starnix.com              professional linux services & products
--
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