I was surprised to see that since Natty 11.04, even when we have enabled a backports repository, updated packages aren't automatically installed from that repository. We have to install individual updates manually, e.g. via
apt-get install ipython/precise-backports
as explained at UbuntuBackports - Community Ubuntu Documentation. I guess I just didn't get the memo....
First question: how do we find out what our options are for upgrades via backports? I'm surprised that even if I ask for status, e.g. via
wajig status ipython
it doesn't tell me there is a new version available. I'd like a list of all upgrades for packages which I've already installed.
Next, how do I avoid losing existing packages just because I upgrade via a backport?
E.g. the above ipython install tells me:
The following packages will be REMOVED:
ipython-notebook ipython-qtconsole
How do I say I want the latest backported ipython, as well as any other packages for which updates are available that depend on it, without manually figuring them all out and installing them also?
I know I can change the pinning so that I get all updates, but I'm hesitant to go against the general advice not to. But if a user asks for one package to be updated, wouldn't it be natural to update all the dependencies, like you'd get from a ppa?
Run apt-get with the
--default-release
or-t
switch:Is the same as
apt-get install ipython/precise-backports
just that you don't have to insert theprecise-backports
part.For that I use
apt-cache policy
:If the packages you want to upgrade break previous dependencies, then you should decide if upgrading or leaving things as they are. Or you just force things down and break your installation, is all up to you.
Same as above.
If there is no update candidates, no. This happens a lot on rolling releases distributions, some packages depend of others that are yet no available in the repositories, so apt decides no to upgrade since it breaks dependencies.
For the case of
ipython
that you mention on comments:Following the package dependencies page
ipython-notebook=0.13.2-1~ubuntu12.04.1
depends toipython=0.13.2-1~ubuntu12.04.1
, but if you try to upgradeipython
alone, apt will take your actions as priority and fulfill them at any cost. Since you are only telling apt to installipython
from backports, he understand:So, the only way to do this is removing/downgrading any package that gets it dependencies broken due this operation (
ipython-notebook
) and installipython
from backports. The correct way to do this is, either:or
The first one will tell apt-get to install
ipython-notebook
andipython
from backports, the second will tell apt to upgrade any installed package that has upgrades in theprecise-backports
repository.