#1094163 dpkg: dependency problem with a package that is also virtual

Package:
dpkg
Source:
dpkg
Description:
Debian package management system
Submitter:
Jochen Sprickerhof
Date:
2025-01-25 11:45:02 UTC
Severity:
normal
#1094163#5
Date:
2025-01-25 11:40:53 UTC
From:
To:
Hi,

currently in unstable dnsutils depends on bind9-dnsutils which also
Provides: dnsutils. This leads to apt and dpkg disagreeing on what to
install:

$ echo -e 'Package: dummy\nDepends: dnsutils:amd64 (= 1:9.20.4-4)' > control
$ equivs-build control
$ mmdebstrap --verbose --variant=essential --include=./dummy_1.0_all.deb --hook-dir=/usr/share/mmdebstrap/hooks/file-mirror-automount unstable /dev/null
[..]
The following NEW packages will be installed:
  bind9-dnsutils bind9-host bind9-libs dummy libbsd0 libcom-err2 libedit2
  libfstrm0 libgssapi-krb5-2 libicu72 libidn2-0 libjemalloc2 libjson-c5
  libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblmdb0 libmaxminddb0
  libnghttp2-14 libprotobuf-c1 libstdc++6 libunistring5 liburcu8t64 libuv1t64
  libxml2
[..]
dpkg: dependency problems prevent configuration of dummy:
 dummy depends on dnsutils:amd64 (= 1:9.20.4-4); however:
  Package dnsutils is not installed.
  Version of dnsutils on system, provided by bind9-dnsutils:amd64, is <none>.

dpkg: error processing package dummy (--configure):
 dependency problems - leaving unconfigured

Observations:

- apt lists only bind9-dnsutils, not dnsutils to be installed.
- using Depends: dnsutils:amd64 or Depends: dnsutils (= 1:9.20.4-4) in
  the dummy package fixes the problem.

The last observation makes me fill this against dpkg but please reassign
if you think that it is wrong.

Note that the reproduce will be gone once #1094159 is fixed. It can
probably be reproduced from snapshot.d.o then.

Cheers Jochen