#1065482 dselect-upgrade does not convert pre-depends on virtual package to automatic installation

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Simon Richter
Date:
2026-01-10 11:03:21 UTC
Severity:
normal
#1065482#5
Date:
2024-03-05 09:37:45 UTC
From:
To:
Hi,

testing in docker:

$ docker run --rm -it debian
root@239c2646db6b:/# apt-get update
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8786 kB]
Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [12.7 kB]
Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [144 kB]
Fetched 9197 kB in 1s (8973 kB/s)
Reading package lists... Done
root@239c2646db6b:/# apt-cache dumpavail | dpkg --update-avail
Replacing available packages info, using -.
Information about 63465 packages was updated.
root@239c2646db6b:/# dpkg --clear-selections
root@239c2646db6b:/# dpkg --set-selections <<EOF
root@239c2646db6b:/# apt-get dselect-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages have unmet dependencies:
 base-files : PreDepends: awk
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Internal error, problem resolver broke stuff

If I add "mawk install" to the list, the dselect-upgrade becomes a
no-op, and all packages (including mawk) are marked as automatically
installed.

If I add "vim install" to the list, vim and its dependencies are
installed in addition, and vim is the only package marked manually
installed.

This is very close to the desired behaviour, where I'd like to specify
as few packages as possible in the dpkg selection, and have apt find a
valid solution that has as many packages marked auto-installed as
possible.

Since mawk is already installed at this point, the PreDepends should
also behave like a normal Depends, and simply pull in the existing
package that provides awk (and ideally keep the behaviour where awk is
marked auto-installed, since it is not explicitly requested).

Presumably, the auto flag on mawk is deduced because it is pulled in by
an essential package, that makes sense and should probably stay that
way.

   Simon

#1065482#10
Date:
2026-01-10 10:10:41 UTC
From:
To:
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie
Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran,
Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun.

Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie
für weitere Details.