Bug#1068774: When installing a package that is kept back with apt-get install do not mark it as manually installed or ask the user whether the mark should be added

2024-04-11 Thread David Kalnischkies
Control: forcemerge 956330 -1

On Wed, Apr 10, 2024 at 09:53:39PM +, mYnDstrEAm wrote:
> Could you please make apt not mark packages as manually installed when 
> installing packages […]

You found with #956330 already a feature request that asks for that, so
I am merging this one with it as even in the best case this could only
be considered a sub-task (if at all).


> […] that have been kept back in specific?

Note that "phases upgrades" have their own listing now, but you might be
better of asking in Ubuntu support channels about this as Debian doesn't
use the Phasing feature at all.


> Alternatively, the user could be asked whether they want to have it marked if 
> the mark would be added but I think most users would not want that.

In #956330 Алексей Шилин actually makes a good point about an install
request having predictably the same outcome.

In any case, I think in part this comes from a conceptional
disagreement: I don't think 'install' is meant to "force" an upgrade of
a package, but it can have that side effect and so some users end up
using it for that side effect:


> It makes little sense and only causes problems, partly because they then 
> won't uninstall when removing packages that depend on them.

You mean they are protected from autoremove, right?

Well, see, that is the thing: If you don't use 'install' to force random
packages to upgrade it turns out that you 'install' things you care
about and don't want removed as unneeded later on…

But how should apt differentiate between "apt install firefox":
- I dislike Chromium, let me try out this other browser
- … that I had never installed before
- … that I had installed in some old version years ago
- … that happened to be removed recently
- … oh, I have it already installed? Didn't know!
- … that I have already installed as a dep, but now I am active user!
- New version is phased, but I want it now now now because
- … that's my beloved browser I want always latest and never removed
- … friend said I should test this new version early
- … I have no idea what it is, but upgrades are good, right?
- Critical security bug! The announcement tells me to upgrade
- … no time to upgrade everything, lets just pick that one
- … unattended-upgrade did it all before me
- Whoa! autoremove tells me it wants to remove my beloved browser,
  lets install it explicitly to make it stop that
- Ups, I let autoremove remove it! Lets rectify that mistake!

And that aren't even all… so I certainly have some sympathy for the
predictable outcome mentioned and conversely not putting too much
value in what it means that a package is marked manual or auto installed
as it effectively just guards against suggesting auto-removing packages
the user somehow showed they cared about at some point with a failure
mode of just keeping some dead weight around.

Giving it more value means we would need to involve users a lot more in
the management of it, which many would probably be happy to do, but
many also not appreciate much given the failure mode is so low key.


Best regards

David Kalnischkies


signature.asc
Description: PGP signature


Bug#1068774: When installing a package that is kept back with apt-get install do not mark it as manually installed or ask the user whether the mark should be added

2024-04-10 Thread mYnDstrEAm
Package: apt
Version: 2.6.1

Could you please make apt not mark packages as manually installed when 
installing packages that have been kept back in specific?

Alternatively, the user could be asked whether they want to have it marked if 
the mark would be added but I think most users would not want that. It makes 
little sense and only causes problems, partly because they then won't uninstall 
when removing packages that depend on them.

The packages could also be marked differently such as "kept-back manually 
installed" and there could be a parameter for marking it as manually installed 
like it is now.

This is a common problem and it's recommended or best practice to not mark them 
as manually installed, see: 
https://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it

Also see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=956330