#1122153 improve rendering of alternative solutions in {r,}depends

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Thorsten Glaser
Date:
2025-12-08 10:21:02 UTC
Severity:
normal
#1122153#5
Date:
2025-12-08 04:43:13 UTC
From:
To:
$ apt-cache rdepends -i dnsmasq-base
dnsmasq-base
Reverse Depends:
  comitup
    dnsmasq-base-lua
  neutron-dhcp-agent
    dnsmasq-base-lua
  lxc
    dnsmasq-base-lua
  libvirt-daemon-driver-network
    dnsmasq-base-lua
  golang-github-containernetworking-plugin-dnsname
    dnsmasq-base-lua
  dnsmasq
    dnsmasq-base-lua
  concordance-common
    dnsmasq-base-lua

This output is, of course, bogus:

$ dpkg -s libvirt-daemon-driver-network | fgrep Depends
Depends: dnsmasq-base, iptables | nftables, libvirt-common (= 11.3.0-3+deb13u1), libvirt-daemon (= 11.3.0-3+deb13u1), libvirt0 (= 11.3.0-3+deb13u1), libc6 (>= 2.38), libgcc-s1 (>= 3.3.1), libglib2.0-0t64 (>= 2.26.0)

#1122153#10
Date:
2025-12-08 08:53:24 UTC
From:
To:
Control: severity -1 wishlist
Control: retitle -1 improve rendering of alternative solutions in {r,}depends

Thank you for your bug report.

The output is correct. It shows that

1. libvirt-daemon-driver-network is a reverse depends
2. the reverse-dependency can also be satisfied by
   dnsmasq-base-lua (as it Provides: dnsmasq-base)

While `apt-cache {r,}depends` are frozen, we are happy to make
changes to the newer `apt {r,}depends` to improve visualization.

I'd strongly encourage you to migrate to the newer versions,
as they actually show whether a dependency is a Depends or
a Conflicts, not to mention all the various other shapes like
Replaces and Recommends.

#1122153#19
Date:
2025-12-08 09:18:45 UTC
From:
To:
Then it’s incomplete, as it does not show the correct
package name.

#1122153#24
Date:
2025-12-08 10:19:38 UTC
From:
To:
No it's not incomplete. The output for rdepends is

    parent package
        alternative solution 1
        alternative solution 2

i.e. here it's

    libvirt-daemon-driver-network
        dnsmasq-base-lua

The package you queried for is not shown, only alternatives.

This is more evident in 'depends' than 'rdepends'

    libvirt-daemon-driver-network
      Depends: dnsmasq-base
        dnsmasq-base-lua

The presentation does not make a lot of sense but it is what
it is.