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

suggest inclusion of new example in man apt_preferences



Dear apt maintainers,
 I recently had to work rather hard to get my Debian system to automatically
install the newest openoffice.org packages from etch-backports. As I cannot
Pin openoffice.org* and I wasn't willing to Pin every single openoffice.org's
dependency, I found the following solution:
===== /etc/apt/preferences
Package: *
Pin: release a=etch-backports
Pin-Priority: 300

Package: *
Pin: release a=stable
Pin-Priority: 800
=====

I suggest that this could be included in the man page for apt_preferences
after "Tracking stable" and before "Tracking testing or unstable" with the
title
       TRACKING STABLE OR BACKPORTS
and the comment
--------------------
With a suitable sources.list(5) file and the above preferences file, any of
the following commands will cause APT to upgrade to the latest stable
       version(s).

          apt-get install package-name
          apt-get upgrade
          apt-get dist-upgrade

       The following command will cause APT to upgrade the specified package
to the latest version from the etch-backports distribution; the package will
be upgraded automatically to the newest version in backports or stable
(whichever the higest).

          apt-get install package/testing
--------------------

By the way, this is really what the backports.org "Instructions" page says
except in a rather obscure way, but I should really tribute credit for this
solution to Anthony DeRobertis <aderobertis_AT_metrics.net>, who took time to
explain that

> If you put bpo at 100 .. 499, then it'll have a lower priority than
> stable, so apt won't automatically upgrade everything to bpo
> versions. Also, when you have a bpo version installed, it will be
> upgraded to new bpo versions (because the stable version is a lesser
> version, and thus is ignored, leaving bpo as the highest priority)

Best regards,
 Matteo Semplice

PS I suppose that if there is no way to Pin a package with a wildcard or a
Package toghether with all its dependants, that's because it's too hard to
implement safely...


Reply to: