[Aptitude-devel] Bug#826941: Bug#826941: aptitude: inconsistent decisions for auto-installed package removal / empty list for the reason

Axel Beckert abe at debian.org
Fri Jun 10 23:04:25 UTC 2016


Hi,

Vincent Lefevre wrote:
> After doing an update ("u" in the UI) and tried to upgrade ("U"),
> which I cancelled,

How have you cancelled it?

> aptitude wants to remove two packages:
> 
> --\ Packages being removed because they are no longer used (2)                  
> idA linux-headers-4.5.0-1-amd64     -4562 kB  4.5.1-1                  <none>
> idA linux-headers-4.5.0-1-common    -28.4 MB  4.5.1-1                  <none>
> 
> This does not make sense.

It does.

> Either it should have proposed to remove them before, or there is a
> reason to keep them and it should keep them.

Nope, there's another thing which is involved which you didn't seem to
take into account:

> Header files for Linux 4.5.0-1-amd64
> linux-headers-4.5.0-1-amd64 (remove, 4.5.1-1) was installed automatically; it  ▒
> is being removed because all of the packages which depend upon it are being    ▒
> removed:                                                                       ▒
> 
> The list is empty! This confirms that there is something wrong.

Not necessarily.

Because all this is very likely caused by the dynamically generated
contents of /etc/apt/apt.conf.d/01autoremove-kernels.

This file is regenerated when a kernel is upgraded and/or
installed/removed:

> FYI, here's the latest upgrade:
[…]
> [UPGRADE] linux-headers-amd64:amd64 4.5+73 -> 4.6+74

So in the last run this file has been regenerated in the 4.6 kernel's
postinst and no more sports 4.5 kernel packages in
APT::NeverAutoRemove. Hence it will be allowed to consider these
packages to be removed at the next aptitude run while it wasn't in the
previous one.

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



More information about the Aptitude-devel mailing list