#1085228 zutty should not Provides: x-terminal-emulator

Package:
src:zutty
Source:
src:zutty
Submitter:
Jesse Rhodes
Date:
2024-10-19 17:15:02 UTC
Severity:
normal
Tags:
#1085228#5
Date:
2024-10-16 23:58:16 UTC
From:
To:
Dear Maintainer,

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 ran into it today while setting up a test VM [1], and I've seen it reported several times in support channels.

I suspect without evidence that apt is reverse sorting the list with the goal of selecting xterm.

And of course, zutty requires specific graphical support or else it won't launch.

I think someone who wants to use zutty will install it intentionally, so the Provides: doesn't help zutty in particular, and removing it would help protect other users from a new install with no working terminal emulator, at least until the apt bug is sorted.

Thanks for your work,

sney

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

#1085228#10
Date:
2024-10-18 18:38:41 UTC
From:
To:
Am Wed, Oct 16, 2024 at 07:58:16PM -0400, schrieb Jesse Rhodes:
[…]

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.

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

#1085228#15
Date:
2024-10-19 15:23:39 UTC
From:
To:
control: severity -1 serious

Hi David!

Thanks for pointing out this. For now I'm raising the severity, because
while Zutty provides a '-title' option, there's no '-T' alias required
for satisfying the third point of the policy:

”Support the command-line option -T title, which creates a new terminal
window with the window title title.”

I guess it would not be difficult to patch or even convince upstream to
provide such alias for the title option.

best regards,

#1085228#22
Date:
2024-10-19 17:11:59 UTC
From:
To:
control: tags -1 patch

Hi Tom,

I hope everything is fine! I'm quoting only relevant parts below but you
can see all messages at the bug URL: https://bugs.debian.org/1085228

On Sat, 19 Oct 2024 17:23:39 +0200 Ricardo Mones <mones@debian.org> wrote:

Attaching a patch (against master) implementing '-T' as an alias for
'-title', therefore making Zutty policy compliant.

If not accepted upstream I will add it to the Debian patches.

regards,