Control: retitle -1 document package specifiers for `upgrade`

On Mon, Mar 11, 2024 at 10:12:33PM -0400, Wesley Schwengle wrote:
> On Mon, Mar 11, 2024 at 11:32:24PM +0100, Miguel Angel Rojas wrote:
> > > I see. It looks like `apt upgrade <package>' behaves as `apt install
> > > <package>'. Which (to me) is unexpected behaviour, as the man page is
> > quite
> > >clear on its behaviour (man 8 apt-get):
> > 
> > Well, clearly it shouldn’t. To begin with, “apt install” should mark a
> > package as manual installed while “apt upgrade” shouldn’t (my assumption).
> > And you’re right that “apt install” can remove a package if needed to
> > satisfy dependencies.
> > 
> > On top of that, documentation clearly states that “apt upgrade” should not
> > remove any package, but it does when you specify an individual package to
> > upgrade.
> > 
> > If this is not the expected behavior, maybe this is a bug (unless I am
> > missing something here).
> 
> 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.

> 
> 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.

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en

Reply via email to