Showing posts with label pinning. Show all posts
Showing posts with label pinning. Show all posts

Wednesday, January 21, 2009

Sould I Enable Ubuntu Backports ?

Yes, but through pinning.

The problem with just enabling the backports repository (without pinning) arise when you upgrade you system. You will get a lot of updates, from the backports repository, that you don't want. With pinning enabled, when you do a normal upgrade you will only get the updated pacakges from the updates repository. If you want some packages from the backports repository you have to say it explicitely.

Pinning allows you to keep your system as close to the normal repositories as possible, and only use the backports repositories when you have to. This is achieved by assigning a lower than the default priority to the backports repositories. When you want a package from the backports repositories you just elevate the backports repositories priority.

It's possible to upgrade just the package you want and even choose the version. You can learn everything about the pinning method in my previous post How To Enable Ubuntu / Kubuntu Backports Through Pinning.


The fact is that there are some concerns about backports stability. I will just quote Canonical (emphasis mine):

"Backports candidates are tested by several Backports developers and community contributors before they are allowed to be placed in the repository. Backports packages are thus safer to use than the development distribution. At minimum the packages should be usable in a manner that the average Backports developer could test. However, given the nature of introducing newer versioned packages from a development distribution into a stable, released distribution, problems can arise. The most common side-effects would be a bug that escaped testing, or a new configuration file format (or other kind of incompatibility). If you have problems with a Backports package please report it in the Backports bugtracker and not the main Ubuntu one.
Due to the nature and purpose of Backports, it is not as "stable" as the previously mentioned update repositories, for a variety of reasons.
  • Backports are designed to provide new features. These new features may be unfamiliar to users and require a period of re-learning to become familiar with their favorite application again.
  • Backports may introduce differing configuration file options or behavior that may catch an administrator off guard. For this reason it's not encouraged to upgrade backports as a part of an automated procedure on high-stability production environments.
  • Backports are newer software by definition, and newer software tends to be tested by fewer people. The risk for an uncaught bug is increased.

In assessing the "stability" of backports, it's important to define the term stability first. In terms of "the behavior I see today is the same as the behavior I'll see after applying a bunch of backports updates", Backports is fairly unstable. New apps introduced via backports may have significantly changed behavior or interfaces. In terms of "applying a backport will completely break my system", Backports is fairly stable. A great deal of work goes into testing backports and it's highly unlikely for a backport to be a severe regression from the version it replaces.

The user should judge for himself if Backports are appropriate for his purposes."

References:
Ubuntu Backports

Tuesday, January 6, 2009

How To Enable Ubuntu / Kubuntu Backports Through Pinning

There are two ways to enable the backports repository:

Enabling the entire repository


Command Line Interface

Just add the following lines to your /etc/apt/sources.list :

For Ubuntu 8.10 (Intrepid Ibex):
deb http://archive.ubuntu.com/ubuntu intrepid-backports main universe multiverse restricted

For Ubuntu 8.04 (Hardy Heron):
deb http://archive.ubuntu.com/ubuntu hardy-backports main universe multiverse restricted

For Ubuntu 7.10 (Gutsy Gibbon):
deb http://archive.ubuntu.com/ubuntu gutsy-backports main universe multiverse restricted

For Ubuntu 7.04 (Feisty Fawn):
deb http://archive.ubuntu.com/ubuntu feisty-backports main universe multiverse restricted

For Ubuntu 6.06 (Dapper Drake):
deb http://archive.ubuntu.com/ubuntu dapper-backports main universe multiverse restricted



Package Manager

Adept (Kubuntu)
Follow the instructions on the How To Add Repositories Page for Kubuntu, just activate the Unsupported updates in the Updates tab.

Synaptic (Ubuntu, Xubuntu)
Follow the instructions on the How To Add Repositories Page for Ubuntu and use the following information for each section:

For Ubuntu 8.10 (Intrepid Ibex):
url: http://archive.ubuntu.com/ubuntu
distribution: intrepid-backports
sections: main universe multiverse restricted

For Ubuntu 8.04 (Hardy Heron):
url: http://archive.ubuntu.com/ubuntu
distribution: hardy-backports
sections: main universe multiverse restricted

For Ubuntu 7.10 (Gutsy Gibbon):
url: http://archive.ubuntu.com/ubuntu
distribution: gutsy-backports
sections: main universe multiverse restricted

For Ubuntu 6.06 (Dapper Drake):
url: http://archive.ubuntu.com/ubuntu
distribution: dapper-backports
sections: main universe multiverse restricted


Use pinning to limit the backports repository


1. Enable the Updates and Security repositories

First make sure you have the Updates and Security repositories enabled (also available for Kubuntu), as some packages from Backports rely on them. In addition, verify each repository has the "Main, Restricted, Universe, and Multiverse" components enabled. Backports will at times cross into a separate component in a manner that would be disallowed in other official repositories.

Some packages from Backports rely on them. Probably you already have both enabled, if not enable them. Don't know how? Learn here:


2. Enable the entire backports repository

Actually pinning is a superset of the "Enabling entire repository" method. Just go to the Enabling the entire repository method, follow the instructions and then proceed to step 3.


3. Use pinning to limit the backports repository


Save the following lines in your /etc/apt/preferences (if this file doesn't exist, create it):

For Ubuntu 8.10 (Intrepid Ibex):
Package: *
Pin: release a=intrepid-backports
Pin-Priority: 400

For Ubuntu 8.04 (Hardy Heron):
Package: *
Pin: release a=hardy-backports
Pin-Priority: 400

For Ubuntu 7.10 (Gutsy Gibbon):
Package: *
Pin: release a=gusty-backports
Pin-Priority: 400

For Ubuntu 6.06 (Dapper Drake):
Package: *
Pin: release a=dapper-backports
Pin-Priority: 400


4. How To Use


If you want to install a package from the backports, use the -t (target) option apt-get. To upgrade a single package from hardy-backports, just do:

sudo apt-get install -t hardy-backports <package>

If you want to see what upgrades are available, just do:

sudo apt-get upgrade -u -t hardy-backports

And that's it. With pinning you can choose what to install from the backports repository.


References: