Package: aptany-perl:amd64 (0.09-1, automatic), libstruct-dumb-perl:amd64 (0.14-1, automatic), libtest-refcount-perl:amd64 (0.10-4, automatic), libasync-mergepoint-perl:amd64 (0.04-4, automatic)
Version: 2.6.1
Severity: normal
I've installed several -perl packages with "apt install", including libio-async-perl, and libtest-fatal-perl:amd64 was automatically
installed as a dependency:
Start-Date: 2023-11-01 21:03:35
Commandline: apt install libio-async-perl
Install: libdevel-mat-dumper-perl:amd64 (0.46-1+b1, automatic), libio-async-perl:amd64 (0.802-1), libtest-fatal-perl:amd64 (0.017-1, automatic), libtest-metrics-any-perl:amd64 (0.01-2, automatic), libsereal-perl:amd64 (5.003-1, automatic), libmetrics-
End-Date: 2023-11-01 21:03:39
A bit later, I found that this was not needed, so that I removed the
packages and also did a "apt autoremove --purge". Now, this command
says:
root@qaa:~# apt autoremove --purge
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
but while libtest-fatal-perl:amd64 (from /var/log/apt/history.log
above) isn't installed, libtest-fatal-perl still is:
root@qaa:~# dpkg -s libtest-fatal-perl:amd64
dpkg-query: package 'libtest-fatal-perl' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
root@qaa:~# dpkg -s libtest-fatal-perl
Package: libtest-fatal-perl
Status: install ok installed
Priority: optional
Section: perl
Installed-Size: 43
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org> Architecture: all
Multi-Arch: foreign
Version: 0.017-1
Depends: perl:any, libtry-tiny-perl
So "apt autoremove" forgot it.
On Sun, Apr 21, 2024 at 03:35:28AM +0200, Vincent Lefevre wrote:[...]
root@qaa:~# dpkg -s libtest-fatal-perl:amd64
dpkg-query: package 'libtest-fatal-perl' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
Well, this isn't really the right explanation. This is due to an
output bug in apt, which should have output "libtest-fatal-perl:all" instead of "libtest-fatal-perl:amd64".
That might be your preference (now), but it would be wrong in terms of
apt and I am sure if you think a bit more about it you will agree:
A package is not arch:all. People say that all the time, but only
because they mean that "this version of the package is arch:all" as we
tend to talk about a *.deb file as a package and that contains
a specific version.
If apt were to display "libtest-fatal-perl:all" it would mean that if
that package becomes arch:any in the next version apt would need
to show "removing: libtest-fatal-perl:all" and "new install: libtest-fatal-perl:amd64" instead of as an "upgrade" among many other
very annoying things around architectures.
So, for apt, "libtest-fatal-perl:all" is treated like "libtest-fatal-perl:native" aka "libtest-fatal-perl:amd64" for you, so
that if a binary package is arch:any or arch:all is an implementation
detail for a user – as it should be – as that changes over time.
The native architecture does not change as often, if at all.
So, in other words, for apt a "package" is usually a set of versions
which can have different architectures, while for dpkg a package is
a single version (except if it is not, like in that same arch:all to
arch:any flip; but users don't speak to dpkg that often and especially
not in that moment. apt does for them…).
In a way, you could complain that dpkg is so anal about the arch
instead, but in its own world and context, it makes sense.
So, there's only a "Suggests", and note that I do not install
"Suggests" by default.
While you don't install Suggests via `APT::Install-Suggests` which is
`false` by default, that has no bearing on the autoremoval.
Controlling autoremoval behaviour is `APT::AutoRemove::SuggestsImportant` which defaults to `true` as the autoremover could potentially break some usecase for you that the suggests enabled and you have grown attached to
even through the suggests was once installed for another reason.
On 2024-04-21 12:03:05 +0200, David Kalnischkies wrote:
Controlling autoremoval behaviour is `APT::AutoRemove::SuggestsImportant` which defaults to `true` as the autoremover could potentially break some usecase for you that the suggests enabled and you have grown attached to even through the suggests was once installed for another reason.
OK, I had actually that on my old machines, but for some reason,
I didn't remember that and didn't notice that this was missing on
new machines (and there was a bug in my script that checked the
consistency of the config between machines).
But the fact that this is a hidden setting did not help, i.e. it is
not mentioned in the documentation (apt(8), apt-get(8), apt.conf(5), apt-config(8) man pages, APT User's Guide), while the description of
"apt autoremove" is misleading ("dependencies" is used twice in the
same sentence with 2 different meanings!).
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 06:37:11 |
Calls: | 6,706 |
Files: | 12,236 |
Messages: | 5,350,566 |