[Aptitude-devel] Bug#570377: aptitude chooses to remove packages instead of upgrading

Axel Beckert abe at debian.org
Thu Jan 30 09:01:58 UTC 2014


Hi,

Vincent Lefevre wrote:
> aptitude sometimes prefers to remove packages instead of upgrading.

Which is IMHO fine in general. I though must admit that it seems to do
that quite often in Debian Unstable.

Chris King wrote:
> This is a very annoying behavior

In Debian Unstable, yes. But it is configurable behaviour, too:

Use

  Aptitude::ProblemResolver::Remove-Level "maximum";

or

  Aptitude::ProblemResolver::Hints {
          "reject !~M :UNINST";
  };

in your apt.conf and you're done.

The latter works better for this issue, but no more allows you to
choose solutions which remove packages unless you explicitly select
them for removal with "-" in the package list or on the commandline.
This can be annoying, too, and is totally unsuited for dist-upgrades
between two stable releases. It hence is _NOT_ a general solution, but
is very suitable for unattended upgrades of security upates.
aptitude-robot uses it for a while now.

The first variant is probably better suited for general use case, but
can still cause packages to not be upgraded at all due to conflicts
with obosolete packages which actually really should be removed. (I
think, this is one of the reasons why this issue is not trivial to fix
generally without regressions in other fields like dist-upgrades
between two stable releases.)

> which Aptitude didn't exhibit a year or so ago.

Hrm, I would be curious which patch introduced that change...

> Having to hit "n" twenty times before Aptitude decides to upgrade
> one package rather than removing 50 is just silly.

... and not necessary at all, even without the above configuration.

Just type "r" on all (often suffices to do it only for some) packages
and hit "." only afterwards. (I don't know by mind the commandline
keybindings for that -- these are for the TUI --  but typing "?" on
the prompt may give you hints.)

Martin von Wittich wrote:
> Could this be caused by packages that are not marked as automatically
> installed?

In case of conflicts with newer packages, this is possible. But it's
rather seldom the case according to my experience.

Chris Tillman wrote:
> I second (3rd? 4th?) this request.

You're also free to submit a patch!

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5



More information about the Aptitude-devel mailing list