mixing Hardy stable and Intrepid testing repositories
Due to the very high pace of Free and OpenSource Software development it often occurs that program versions shipped with a distribution are already quite obsolete, hence the need to upgrade to its latest version.
Compiling the sources can be a little annoying sometimes, since you have to take care of the many multiple dependencies and cannot easily manage the program setup (i.e. update/remove it).
Using the prepacked and patched package from the development repositories is definitely the best solution.
However how to keep up to date with those developing packages? With apt pinning! Read on.
Pinning is a process that allows you to remain on a stable release of Ubuntu (or any other debian system using apt package managment) while grabbing packages from a more recent version.
Note however that you should keep some packages (e.g. libc6) to the stable version because otherwise they will have a huge system wide effect, so you probably could not use this trick to update every package in the repository. I strongly recommend you look at UbuntuBackports before doing this. Backports are basically updated packages having library dependencies from the stable repository.
In order to mix the repositories you have to edit two files:
/etc/apt/sources.list
where you are going to add the development repositories
deb http://archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse
In this example, we’re pulling from intrepid (the current development version of Ubuntu).
/etc/apt/preferences
here you are going to set the priorities (create this file if it does not exist)
The following lines represent my prefernces file:
Package: *
Pin: release a=hardy
Pin-Priority: 500
Package: *
Pin: release a=hardy-updates
Pin-Priority: 600
Package: *
Pin: release a=hardy-backports
Pin-Priority: 700
Package: *
Pin: release a=hardy-proposed
Pin-Priority: 800
Package: *
Pin: release a=hardy-security
Pin-Priority: 900
Package: *
Pin: release a=intrepid
Pin-Priority: 100
Package: flashplugin-nonfree
Pin: release a=intrepid
Pin-Priority: 1000
Package: gnome-subtitles
Pin: release a=intrepid
Pin-Priority: 1000
Notice the different and increasing Pin-Priority number.
Distribution with highest pin-priority will be installed preferentially.
Notice as well intrepid development distribution has the lowest pin-priority as a whole: only 100.
The last two sets, instead, have the highest pin-priority but are restricted to only two packages. This means that I always want those two packages at the latest version and I want them to be automatically prompted to be updated.
You can add other sets like these for every program you want to keep to the bleeding edge version.
This trick is necessary since development distributions have their packages updated very often and since I am using an unstable version I want its bugfixes to be installed as soon as they are released.
Installing new packages from Synaptic Package Manager
Just select a package to be installed: If the package exists in Stable, then that is what it will grab. If the package exists only in Unstable, then from Unstable it will be gotten.
If the package exists in both repositories you can force it by going to Package -> Force Version which is also achievable via CTRL+F and select the version you want.
Installing new packages from the terminal shell
To install a new package, it is just as it ever was, apt-get install <package>. If the package exists in Stable, then that is what it will grab. If the package exists only in Unstable, then from Unstable it will be gotten.
What if the package exists in both Stable and Unstable, but we want the Unstable version? There are two ways we can do that, each with a slightly different syntax, and each with a slightly different effect.
- apt-get install <package>/unstableThis will install the unstable version of the package, and try to meet any dependencies from Stable. This may not work, but it will tell you why:
# apt-get install zsh/unstable Reading Package Lists... Done Building Dependency Tree... Done Selected version 4.0.6-7 (Debian:unstable) for zsh Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: Sorry, but the following packages have unmet dependencies: zsh: Depends: libc6 (>= 2.2.5-13) but 2.2.5-11.1 is to be installed E: Sorry, broken packages
- apt-get -t unstable install <package>
This will install the Unstable version of the package, and try to meet any dependencies from Unstable. This may produce better results.# apt-get -t unstable install zsh Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: libc6 libc6-dev libc6-pic libdb1-compat locales The following NEW packages will be installed: libdb1-compat 5 packages upgraded, 1 newly installed, 0 to remove and 394 not upgraded. Need to get 11.6MB of archives. After unpacking 606kB will be used. Do you want to continue? [Y/n]
apt-show-versions
This is really useful if you have a mixed stable/testing environment
and want to list all packages which are from testing and can be
upgraded in testing.
to install it
apt-get install apt-show-versions
to list the hardy stable and intrepid testing packages:
apt-show-versions | grep /intrepid apt-show-versions | grep /hardy
ERROR: Dynamic MMap ran out of room
You may find that you receive an error like the following:
E: Dynamic MMap ran out of room E: Error occured while processing sqlrelay-sqlite (NewPackage) E: Problem with MergeList /var/lib/apt/lists/ftp.us.debian.org_debian_dists_woody_contrib_binary-i386_Packages E: The package lists or status file could not be parsed or opened.
This is caused because apt’s cache is too small to handle all of the packages that are included with stable, testing, and unstable. This is also very easy to fix. Add the following line to /etc/apt/apt.conf
APT::Cache-Limit "8388608";
—————————-
Thanks to R (Chandra) Chandras for pointing out this problem
Thanks to John H. Robinson for setup instructions from terminal shell http://jaqque.sbih.org/kplug/apt-pinning.html
see also: http://ryandaigle.com/articles/2005/10/31/listing-downgrading-unstable-testing-debian-packages
Print This Post
|
Email This Post
| 