#1069585 apt: autoremoval forgets transitional packages in a OR dependency

Package:
synaptic
Source:
synaptic
Description:
Graphical package manager
Submitter:
Vincent Lefevre
Date:
2024-04-22 00:42:03 UTC
Severity:
normal
#1069585#5
Date:
2024-04-21 01:50:27 UTC
From:
To:
There is the wontfix bug

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477166

"apt: autoremoval keeps all branches of an OR on the system even if
I don't want one".

While I can understand the reason why this is wontfix, this reason
makes no sense on transitional packages.

As an example:

qaa:~> apt autoremove -s
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 82

but policykit-1 (marked as automatically installed) could be removed:

qaa:~> aptitude remove -s policykit-1
The following packages will be REMOVED:
  policykit-1
0 packages upgraded, 0 newly installed, 1 to remove and 82 not upgraded.
Need to get 0 B of archives. After unpacking 34.8 kB will be freed.
Would download/install/remove packages.

I suppose that "apt autoremove" doesn't remove it because of
the OR dependency:

qaa:~> aptitude why policykit-1
i   synaptic Depends pkexec | policykit-1

(at least, this seems to be one of the reasons).

#1069585#10
Date:
2024-04-21 10:25:45 UTC
From:
To:
Control: reassign -1 synaptic 0.91.3

Instead of asking apt (and all other applications) to come up with
a complex set of rules what a transitional package might be (case in
point: policykit-1 is not in section oldlibs[0]) you should focus
your energy on making that transition actually happen if you care
that much about it.

[0] https://wiki.debian.org/RenamingPackages

synaptics could drop the or on policykit-1 – or if for some reason
keeping it is desirable make it a versioned on, like:
|   pkexec | policykit-1 (<< first-transitional-version~)


Best regards

David Kalnischkies

#1069585#21
Date:
2024-04-22 00:39:38 UTC
From:
To:
Control: retitle -1 synaptic: should not depend on the transitional package policykit-1

OK. I've also reported a bug against network-manager, which has the
same issue.