How to setup apt-pinning so you can install packages from testing unstable

Apt Pinning allows you to maintain a system based primarily on the stable distribution, whilst selectively installing packages from the testing or unstable distributions as required.

To setup apt pinning, first, add sources for testing and unstable to /etc/apt/sources.list:

# testing
deb http://ftp.us.debian.org/debian testing main non-free contrib
deb http://non-us.debian.org/debian-non-US testing/non-US main contrib non-free

# unstable deb http://ftp.us.debian.org/debian unstable main non-free contrib deb http://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free

Then create/edit the /etc/apt/preferences file. This is where the apt-pinning really takes place. Normally, the highest version of a package from any source will win, causing that version of the package to be installed. We wil override this by assining a higher pin priority to stable. To do this, add the lines below to the file:

</file> Package: * Pin: release a=stable Pin-Priority: 700

Package: * Pin: release a=testing Pin-Priority: 650

Package: * Pin: release a=unstable Pin-Priority: 600 </file>

We also need to add the line below to the file at /etc/apt/apt.conf. This increases the size of the cache apt uses to store package informattion, which is necessary in order for it to track the packages from all three distributions:

APT::Cache-Limit "18388608";

You will need to update apt:

apt-get update

You can install packages from unstable, and try to meet any dependences from stable using the command below:

apt-get install <packagename>/unstable

This will often fail to satisfy the necessary dependances. You may have more luck with the command shown below, which will install a package from unstable and meet any dependencies from unstable also:

apt-get -t unstable install <package>

Discussion

Enter your comment:

Subscribe to the RSS feed for Andy's Debian HOWTOs

Article from Andy's Debian HOWTOs (http://www.besy.co.uk/debian/debian)

 
debian/howto_setup_apt-pinning_so_you_can_install_specific_packages_from_unstable.txt · Last modified: 2008/08/01 22:56 (external edit) · [Old revisions]
Recent changes RSS feed Powered by Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki