On Tue, Mar 12, 2024 at 11:40:01AM +0100, Julian Andres Klode wrote: > On Mon, Mar 11, 2024 at 10:12:33PM -0400, Wesley Schwengle wrote: > > I do not know what the bug here is, it could be one of these options: > > > > 1) apt-get/apt upgrade accepts packages to upgrade where the docs state it > > doesn't. The behaviour needs to change to not accept packages. > > > > 2) apt-get/apt upgrade accepts packages and removes packages to satisfy deps > > where the docs state it doesn't. The behaviour need to change to not > > remove > > any packages. There is a small edge case where you can say: `apt upgrade > > foo > > bar-'. Technically, it shouldn't remove packages, yet you want and > > instruct > > it to remove bar. > > The behavior is correct if potentially unexpected, but it should be > documented better.
Thanks, it was option 3) Works as intended, documentation needs to be updated. > > FWIW, aptitude does not remove packages where you call `aptitude > > safe-upgrade > > foo'. It does remove packages when you call `aptitude full-upgrade foo'. It > > also removes bar when you run `aptitude safe-upgrade foo bar-'. > > That is an entirely different command; `aptitude safe-upgrade foo` > upgrades (only) `foo`, whereas `apt upgrade foo` first does the normal > install argument handling and then runs an upgrade, so `foo` could also > be a new package that is not currently installed to hint the solver if > it is unable to find a solution. Ahhh. I was under the impression that they had a similar intent. On a related note: While debugging I also noticed apt's update and apt-get's update are also slightly different. apt-get will not allow for new packages to be installed whereas apt's version does allow this. You get apt's behaviour with the --with-new-pkgs switch in apt-get's version of upgrade. Cheers, Wesley