A Short Introduction To Apt-Pinning
A Short Introduction To Apt-PinningVersion 1.0 This article is a short overview of how to use apt-pinning on Debian and Debian-based distributions (like Ubuntu). Apt-Pinning allows you to use multiple releases (e.g. stable, testing, and unstable) on your system and to specify when to install a package from which release. That way you can run a system based mostly on the stable release, but also install some newer packages from testing or unstable (or third-party repositories). I do not issue any guarantee that this will work for you!
1 Preliminary NoteI'm using a Debian Lenny (stable) system here. I will explain apt-pinning on the basis of the package phpmyadmin which is available in three different versions in the stable, testing, and unstable repositories (at the time of this writing) - see http://packages.debian.org/search?keywords=phpmyadmin&searchon=names&suite=all§ion=all:
2 My sources.listI add the testing and unstable repositories to my /etc/apt/sources.list so that it looks as follows: vi /etc/apt/sources.list
Open /etc/apt/apt.conf... vi /etc/apt/apt.conf ... and put the following line into it:
(Otherwise you might get an error like this one when running apt-get update: E: Dynamic MMap ran out of room ) Then run apt-get update to update the package database. With the current version, apt would always try to install the newest version of a package which usually comes from unstable or testing - this could lead to a messed-up system. With apt-pinning, we can define priorities so that a package gets installed from unstable or testing only if there's no such package from stable. We can check apt priorities as follows: apt-cache policy server1:~# apt-cache policy As you see, stable, testing, and unstable all have the same priority (500) which means that the newest version of a package would be installed. In the case of our phpmyadmin package this is version 4:3.1.3-1 which is from unstable: apt-cache policy phpmyadmin The Candidate: line shows the version that would be installed: server1:~# apt-cache policy phpmyadmin This is how priorities are defined (see man 5 apt_preferences ): P > 1000
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com
Red Hat Virtual Experience - a free virtual event. Dec. 9th





print: 
Recent comments
12 hours 32 min ago
17 hours 48 min ago
17 hours 59 min ago
18 hours 7 min ago
19 hours 9 min ago
21 hours 16 min ago
23 hours 42 min ago
1 day 25 sec ago
1 day 8 min ago
1 day 1 hour ago