Bug#1065831: document package specifiers for `upgrade`

2024-03-14 Thread David Kalnischkies
(this reply has nothing to do with the bugreport in question)

On Wed, Mar 13, 2024 at 10:00:56PM +0100, Miguel Angel Rojas wrote:
> >> Julian provided an explanation in #74,
> 20240312113620.ga1944...@debian.org
> 
> I can't access this link..

It isn't a link, it is a message id of an email. Your mail client (or
web frontend or whatever) should find the mail if you search for it
– assuming you got that mail and haven't deleted it in the meantime of
course.

You can also make it a link by prepending https://lists.debian.org/,
aka: https://lists.debian.org/20240312113620.ga1944...@debian.org
That will search for the mail in Debians mailing list archives.


Best regards

David Kalnischkies


signature.asc
Description: PGP signature


Bug#1065831: document package specifiers for `upgrade`

2024-03-13 Thread Miguel Angel Rojas
Hi all,

>>  No. Without a package as an argument it won't.

Thanks! You're right. Let me write it down here again:

   - "apt upgrade" (no argument) will never remove a package, only upgrade
   or install
   - "apt upgrade pkg_name" will remove, upgrade or install the required
   package to satisfy its dependencies.
   - "apt upgrade foo- bar+": advanced option that can be used to
   specifically removed or install packages.

>> Julian provided an explanation in #74,
20240312113620.ga1944...@debian.org

I can't access this link..

>> I'm not a Debian developer, never have been. Just someone who submitted
a patch or two.

And your comments have been really valuable in figuring out what's going
on! Again, my confusion was because this was the first time I reported a
bug AND several people jumped in the conversation! It is not usually the
case ;)

Regards


Bug#1065831: document package specifiers for `upgrade`

2024-03-13 Thread Wesley Schwengle
On Wed, Mar 13, 2024 at 09:44:02AM +0100, Miguel Angel Rojas wrote:
> Hi there,
> 
> > If "apt upgrade" is saying that it removes packages, that is a bug, yes.
> 
> @david: it is not a bug, apparently.
> 
> To put everything in a nutshell:
> 
>- "apt upgrade" can remove packages

No. Without a package as an argument it won't.

>- "apt upgrade" accepts specific packages to be upgraded

To be installed if not installed yet, removed, downgraded or upgraded if
already installed depending on your arguments. For example `apt upgrade foo-
bar+ baz=version toto/archive' will remove foo, add bar, install, up- or
downgrade baz and the same for toto and it will upgrade packages where it can.

> Therefore, this behaviour is expected and documentation needs to be
> modified.
> 
> In the meantime, while the documentation is modified, can some developer
> provide some explanation to the current "apt upgrade" behaviour? (*)

Julian provided an explanation in #74, 20240312113620.ga1944...@debian.org

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



> (*) I'm a bit confused because I don't know which of the people involved in
> this bug are actually a developer of the apt package ;)

I'm not a Debian developer, never been. Just someone who submitted a patch or
two.

Cheers,
Wesley



Bug#1065831: document package specifiers for `upgrade`

2024-03-13 Thread Miguel Angel Rojas
Hi all,

>> (modifiers btw is not a good word. I guess it was never documented so
far partly as this is a rather advanced feature and mainly because  naming
things is hard)

yes, we brought it up in our conversation but I agree it was not directly
related to the subject as it was an apt advanced option. But it was good
because we were able to compare different situations (to spice things up).
We even talked about "apt-get" and "aptitude" but I understand they are
different commands and the purpose was not to compare behaviours among
different tools.

>> Well, does it really matter who is and who isn't?

No, it doesn't as long as they have the right information ;)

Of course, the more people involved in the issue, the better perspective we
have on the problem. But it is important to know how apt is
*currently* behaving to avoid misunderstanding and wrong assumptions (even
from my side as well). We discovered that it is a documentation bug but my
initial premise when I opened the bug was that the resolver wasn't working
properly. With the right information, we usuallly get faster to the
solution. Thank you all, guys!

>> Nobody is born an APT developer, they are chosen based on their patch
offerings!
;)


Bug#1065831: document package specifiers for `upgrade`

2024-03-13 Thread David Kalnischkies
On Wed, Mar 13, 2024 at 09:44:02AM +0100, Miguel Angel Rojas wrote:
> > If "apt upgrade" is saying that it removes packages, that is a bug, yes.
> 
> @david: it is not a bug, apparently.

Yeah, but for different reasons. I know that exists & even use it
frequently… but its two different things for me as the modifiers are
from the user and as such always correct and intended while what upgrade
performs later on has restrictions applied (again from the user).
Having the same restrictions that upgrade has also apply for the
modifiers would make them less useful and in some sense be second
guessing the user as they asked for this to happen…

(modifiers btw is not a good word. I guess it was never documented so
 far partly as this is a rather advanced feature and mainly because
 naming things is hard)

So, I said "apt upgrade" meaning exactly that, not "apt upgrade foo-".
That could be interpreted in slightly different ways, but given how
our other commands behave it seems most sensible to interpret it as:
After the upgrade, foo is not installed, which if foo is currently
installed means remove it. More frequently it will mean through that
foo should not be part of the solution (as in, it is e.g. a non-pick
for resolving an or-dependency, so e.g. not installed as a NEW package).

An alternative interpretation could have been: Do upgrade all but foo,
but that can be achieved differently (e.g. foo/now) and would be
rather specific for upgrade, while behaving differently elsewhere.


And yes, "apt upgrade foo" can lead to bar being removed, which seems
surprising at first, but that depends on the foo. If its e.g. exim vs
postfix that is clear for the user based on what those packages
represent.
I just tried, "--no-remove" catches that, it also catches "foo-" through
which I am not super-happy about and I think we have a bug report for
open… but I could see that go either way and in any case that leads us
further away from the initial topic.


> In the meantime, while the documentation is modified, can some developer
> provide some explanation to the current "apt upgrade" behaviour? (*)
[…]
> (*) I'm a bit confused because I don't know which of the people involved in
> this bug are actually a developer of the apt package ;)

Well, does it really matter who is and who isn't?

I suppose we could have a borderline philosophical discussion about what
makes someone an APT developer given this is a muddily self-defined
non-delegated accumulation of people who for some reason feel some sort
of responsibility for and/or derive enjoyment from it; like most other
teams in Debian.

We could look at uploaders, changelog entries, commit history or access
right on e.g. salsa… but if either of those provide the full picture?


Anyway, I suppose for practical proposes you can think of Julian and me
as main APT developers in terms of who do the most and as such stir it
in recentish years.

If you are asking if that behaviour was added intentionally:
https://salsa.debian.org/apt-team/apt/-/commit/d8a8f9d7f01c75a7bbad7a488bf359a94291d1de

That said, you can be an APT developer, too: Propose the documentation
text you had hoped to find in the first place. Nobody is born an APT
developer, they are chosen based on their patch offerings… 


Best regards

David Kalnischkies


signature.asc
Description: PGP signature


Bug#1065831: document package specifiers for `upgrade`

2024-03-13 Thread Miguel Angel Rojas
Hi there,

> If "apt upgrade" is saying that it removes packages, that is a bug, yes.

@david: it is not a bug, apparently.

To put everything in a nutshell:

   - "apt upgrade" can remove packages
   - "apt upgrade" accepts specific packages to be upgraded

Therefore, this behaviour is expected and documentation needs to be
modified.

In the meantime, while the documentation is modified, can some developer
provide some explanation to the current "apt upgrade" behaviour? (*)

Thanks

(*) I'm a bit confused because I don't know which of the people involved in
this bug are actually a developer of the apt package ;)