YORIK’S COFFEE CORNER

You are currently viewing a single post of this guestblog.

Click here to go back the complete page. I would be glad to hear your comments, so don’t hesitate to leave me your feedback below. It will appear on the main guestblog page.


in categories  opensource  linux  permalink:  298   posted on 28.11.2010 1:46
From Yorik
Multiple sourcing in debian

This is more a note for myself in case I need to do it again some time. You can use one specific version of debian, and add occasionally packages from another one. This might be very handy in case you are using the testing repository, because sometimes a package dependency breaks and the best way to solve it is to install the missing package from unstable.

Keep in mind before trying this that debian versions are really made for what their name suggests, and if you want a system without problems, just stick to the stable version and don't try anything funny. On the other hand, if you are comfortable with linux and the debian packaging system, I find the testing version an excellent choice. Occasionally a package dependency breaks (usually bugs in the unstable version prevents a package to enter testing), and the package and its dependents get kept back by apt, so you must be very careful using apt-get dist-upgrade.

If you can't wait for the bugs to be fixed and the package to land in testing, it is quite easy to add exceptionally some packages from other version. First, add the desired repository to your /etc/apt/sources.list file:
deb http://ftp.br.debian.org/debian unstable main contrib non-free
deb-src http://ftp.br.debian.org/debian unstable main contrib non-free
Then, either add this to your /etc/apt/apt.conf.d/00defaultrelease file (create if necessary):
APT::Default-Release "testing";
But this will simply mark the testing repository with higher prioritary, which means if a package is temporarily unavailable in testing, the unstalbe package will be installed, either add this to your /etc/apt/preferences.d/00Default (create if necessary):
Package: *
Pin: release a=testing
Pin-Priority: 500

Package: *
Pin: release o=Debian
Pin-Priority: -10
This will give to the testing release a priority of 500 (the normal priority for your main repo), and any other official debian repository a priority of -10, which means: NEVER install from there.

Then, to force-install a package from unstable, do:
apt-get install packagename/unstable
But be careful when that package pushes a lot of dependencies, because you'll begin to mix much different versions and it can give you headaches later. Better to keep this for emergencies, and with safe packages (that you know well, and that have few or no dependencies).



First and foremost, your name:

And your message:

To publish it, just press this ...