LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs > Notes on Linux
User Name
Password

Notices

I leave notes here that I find particularly worth remembering myself.
Rate this Entry

Howto install selected Debian packages from other releases (apt-pinning)

Posted 11-11-2011 at 08:44 AM by bittner

Mixing releases can be necessary when you need a more up-to-date version of a software in a system running on package management and not (yet) providing later package versions.

For example, we need the latest git on your Debian Lenny system, because you updated your Eclipse plugins, and now the git integration refuses to work with your old client. Shoot! Let's check what to do to fix this...

Things to do
  1. Edit /etc/apt/sources.list (or create/edit a file in /etc/apt/sources.list.d/) and add the sources to pull the newer version from, e.g.
    Code:
    deb http://ftp.debian.org/debian/ sid main contrib non-free
  2. Edit /etc/apt/apt.conf (or create/edit a file in /etc/apt/apt.conf.d/) to define your release default:
    Code:
    APT::Default-Release "lenny";
  3. Edit /etc/apt/preferences to specify the pinned packages:
    Code:
    Package: git-core
    Pin: release a=sid
    Pin-Priority: 990
The priority should be between 500 and 990 to prefer the pinned version to the package of the default release.

Double-Checking & Analysis

To visualize the pinning policy run apt-cache policy:
Code:
$ apt-cache policy
Append the package name to find out which package candidate will be installed according to the policy:
Code:
$ apt-cache policy git-core
We're Ready To Upgrade

When all is configured, and we have optionally checked the upgrade policy, then we can install the pinned software version:
Code:
$ apt-get update && apt-get upgrade
... which will now pull the pinned software version. Alternatively, instead of generally upgrading you can use apt-get install to upgrade the specific software package only:
Code:
$ apt-get install git-core
The Alternative: Backports

Note that sometimes you can get around apt-pinning using the backports repositories, e.g. for git
Code:
deb http://backports.debian.org/debian-backports lenny-backports main
Though, of course, this requires that someone has packaged a newer version of that software for you.

References
Posted in Uncategorized
Views 1409 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 03:52 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration