Package: apt Version: 2.6.1 Severity: minor X-Debbugs-Cc: s...@debian.org 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 > apt install > e2fsprogs install > tzdata install > mount install > usr-is-merged install > 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 -- System Information: Debian Release: 12.5 APT prefers stable-security APT policy: (500, 'stable-security'), (500, 'proposed-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-18-amd64 (SMP w/20 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages apt depends on: ii adduser 3.134 ii debian-archive-keyring 2023.3+deb12u1 ii gpgv 2.2.40-1.1 ii libapt-pkg6.0 2.6.1 ii libc6 2.36-9+deb12u4 ii libgcc-s1 12.2.0-14 ii libgnutls30 3.7.9-2+deb12u2 ii libseccomp2 2.5.4-1+b3 ii libstdc++6 12.2.0-14 ii libsystemd0 252.22-1~deb12u1 Versions of packages apt recommends: ii ca-certificates 20230311 Versions of packages apt suggests: pn apt-doc <none> ii aptitude 0.8.13-5 ii dpkg-dev 1.21.22 ii gnupg 2.2.40-1.1 pn powermgmt-base <none> -- no debconf information