[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why is a package not autoremoved



Hi,

On Sun, Feb 26, 2017 at 06:34:09PM +0100, Marc Haber wrote:
> I cannot see any reason why linux-image-4.9.11-zgbpi-armmp-lpae should
> not get autoremoved. I mean, it provides linux-image which dkms wants
> to see, but linux-image is also provided by
> linux-image-4.10.1-zgbpi-armmp-lpae, so
> linux-image-4.9.11-zgbpi-armmp-lpae can safely go. Why does apt not
> autoremove that one?

apt comes with a small script run by kernel postinst to protect ~3
(newest, currently running, installed now) from being autoremoved.
This results in /etc/apt/apt.conf.d/01autoremove-kernels

Lets now look at provides: apt protects all providers as it can't
reasonably figure out which of the providers is the "real" provider of
the functionality. It can easily be that multiple providers are used
much like it can happen that you have one favorite in one case and
another in another case or the user switched providers after the new one
got installed somehow… Classic examples would be *-browser, *-viewer and
so on. In the end, even the kernel has that as the actual provider of
the kernel functionality changes over time while currently needed is
usually >= 2 – but that is only obvious for a human with "insider"
knowledge, not for a dumb machine.


apt/stretch has learned an exception to this: If multiple providers are
produced by the same source package in different versions, apt will only
protect the current providers from this source package.


In your case the best solution is probably to just drop the provides of
"linux-image" as it was deprecated by Debian and nothing really depends
on it anymore…

Slightly harder it may be to also not build from a versioned source
package, but from "linux-mh" or so.


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature


Reply to: