I installed Debian testing (wheezy) on my workstation about a month ago. Recently I wanted to install some packages, but they were not in the testing repository because they were blocked by the automatic rules that make a package transition from unstable to testing. For example, the arduino package was held down by gcc-avr
and avr-libc
packages. The situation of the arduino
package can be checked on its page on Debian Package Tracking System.
To solve this problem I began searching on how to install unstable packages in a Debian testing installation. Turns out what I needed was “pinning”, which is a setup that allows to use different repositories with different priorities in order to maintain a mixed system.
Following Joshua Rodman advice from the Debian Wiki, I decided to include the unstable repositories with a negative priority. This has the effect of making the packages visible in the apt cache, but they will never be installed unless explicitly told.
I created the “/etc/apt/preferences
” file and filled it with the following configuration:
Package: * Pin: release a=testing Pin-Priority: 900 Package: * Pin: release o=Debian Pin-Priority: -10
Then I added the following lines to “/etc/apt/sources.list
“:
deb http://ftp.fr.debian.org/debian/ unstable main contrib non-free deb-src http://ftp.fr.debian.org/debian/ unstable main contrib non-free
I then ran as root:
# aptitude update # aptitude install arduino/unstable
The first solution that aptitude proposes is to not install the arduino
package, because in the preferences it has negative priority. I refused this solution and then aptitude proposed me to install arduino
, his dependencies which can be fetched from the testing repositories and other dependencies such as gcc-avr
and avr-libc
which are in the unstable repositories. I accept and everything is installed.
In this way I get almost anything from the testing repository, keeping a system that contains fewer possible bugs with respect to unstable, but I keep the flexibility of installing some unstable packages if I want, for example if they are not available in testing or if the new version solves some problems that are important to me.
Agustín Gugliotta (@agugliotta)
2011/10/02
Thanks!!!! It’s just what I need!
tewadaa
2013/02/19
Thanks, It’s good idea for me. ^^