I knew I could pin a package version, setting up an /etc/apt/preferences
file, please see
here.
newtonfn on the ubuntuforums elegantly worked this resource out to set up a priority to repositories as well.
In this particular example, the medibuntu
repos are set to have a lower priority, so that any package present in two repos from the /etc/apt/sources.list
(here, medibuntu and skype) gets installed and upgraded preferably from the other repo (the skype one in the example):
Package: * Pin: release l=Medibuntu Pin-Priority: 400
A package present only in the medibuntu
repo will be installed/upgraded from medibuntu
. As I said, very elegant!
Just to make sure, the preferences file mentioned above is at:
/etc/apt/preferences
and not at:
/etc/preferences
Right?
Great tip, thanks.
Yes, fixed, thanks :)
How did you get that code displayed like that? I would like to do that on my Ubuntu page… (The numbered lines with the menu above the code)
Thanks,
BrokenCrystal
@ BrokenCrystal, it’s a feature offered by wp.com: http://faq.wordpress.com/2007/09/03/how-do-i-post-source-code/
based on a Google Code project by Alex Gorbatchev:
http://code.google.com/p/syntaxhighlighter/
I’ve been trying to use this method, but I’m somewhat disconcerted by the fact that the output of apt-cache policy does not reflect contents /etc/apt/preferences …
Does this actually work?
It did work when I wrote the post, I used it. It was a while ago, and I switched computers and upgraded since then. I have not used it recently, I’ll check, thanks.