Am Wed, Oct 16, 2024 at 07:58:16PM -0400, schrieb Jesse Rhodes:
> I believe this is actually an apt bug, so copying deity, but maybe you'll see 
> my point:
> 
> There is a difficult-to-reproduce condition where some other package 
> Depends/Recommends x-terminal-emulator, and via dependency resolution, apt 
> installs zutty to satisfy it. 
[…]
> I suspect without evidence that apt is reverse sorting the list with the goal 
> of selecting xterm. 

apt has no such goal. It doesn't know nor cares what a terminal
emulator is nor has it a preference for one.

Sorting provides is indeed a complicated matter and MIGHT produce
something that looks like a reverse sorting, but that is neither the
goal nor intended as such.
https://salsa.debian.org/apt-team/apt/-/blob/main/apt-pkg/depcache.cc?ref_type=heads#L1139-1227


We have mainly four options here:

1. The bug is in "some package" that "Depends/Recommends
x-terminal-emulator" (your words) as it should mention the default
[which one?] first according to Debian Policy §7.5. Perhaps that
default [again, which one?] should have a higher priority.

2. User error, they should pick a x-terminal-emulator first

3. apt should implement something akin to mind reading figuring out
somehow which x-terminal-emulator is the right one given this particular
system (which is so unspecific that it doesn't even have an
x-terminal-emulator installed) and especially the user operating it.

4. Somewhat mix 2 and 3 by having apt somehow figure out that for this
user the choice in this case is important enough to bother them with it.
(While other users will be annoyed if not downright confused by it)
Never mind that the concept of asking back doesn't exist in apt nor that
something like that would never work with less linear/heuristic solver
strategies.


While I would theoretically prefer 3 (failing that 4) the most practical
option is 2 – because the overwhelming amount of users has long 'picked'
up at least one if not many x-terminal-emulators by installing one or
twenty of the more popular desktop environments shipped by Debian before
an apt call has to reason about resolving x-terminal-emulator.


> [1] https://file.sney.ca/txt/1cq4/

Looks like aptitude output… anyway, that is one possible route, maybe
even the quickest to find, but even if that feature is called "why" very
often it is not printing the reason for why something was installed
because IF (and that is a really big if) that information was ever
known, it is not recorded, but "why" something is not autoremoved.

I wonder a bit if libfile-desktopentry-perl really needs to have that
recommends, but it probably is not technically wrong.


I haven't looked at all at zutty, so I can't comment on if the Provides
is correct or not – Debian policy is rather specific on what is needed
to set that Provides, so if it doesn't this bug would be RC level:
https://www.debian.org/doc/debian-policy/ch-customized-programs.html#packages-providing-a-terminal-emulator


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature

Reply via email to