#1055156 /usr/bin/reverse-depends: can't find relationships when Provides is involved

#1055156#5
Date:
2023-11-01 11:34:06 UTC
From:
To:
Dear Maintainer,

It seems the `reverse-depends` utility will not find reverse depencies
in the following situation:
* Package A has Provides: foobar
* Package B has Depends: foobar

The provides/depends pattern is used by the Debian rust team when
packaging rust crates.

Here's a real-word example:

```
Source: rust-cpal
Depends: librust-alsa-sys-0.2+default-dev, librust-failure-0.1+default-dev (>= 0.1.5-~~), librust-lazy-static-1+default-dev (>= 1.3-~~), librust-libc-0.2+default-dev, librust-num-traits-0.2+default-dev (>= 0.2.6-~~)
Source: rust-alsa-sys
Provides: librust-alsa-sys+default-dev (= 0.2.0-2), librust-alsa-sys-0+default-dev (= 0.2.0-2), librust-alsa-sys-0-dev (= 0.2.0-2), librust-alsa-sys-0.2+default-dev (= 0.2.0-2), librust-alsa-sys-0.2-dev (= 0.2.0-2), librust-alsa-sys-0.2.0+default-dev (= 0.2.0-2), librust-alsa-sys-0.2.0-dev (= 0.2.0-2)
No reverse dependencies found
b'<p>Package not published in specified release</p>'
librust-alsa-sys-dev:
  Installed: (none)
  Candidate: 0.2.0-2
  Version table:
     0.2.0-2 500
        500 http://deb.debian.org/debian bookworm/main arm64 Packages
        400 http://deb.debian.org/debian unstable/main arm64 Packages
No reverse dependencies found
No reverse dependencies found
```

It would ofcourse be best if reverse-depends could simply handle the
Provides pattern, but maybe it would be easier to implement just warning
when encountering a package which has Provides at all (just to give the
user a chance to react that there might actually be reverse dependencies
that are just not found).


PS. I also tested (latest version of) ubuntu-dev-tools 0.197 and
confirmed it behaves the same.

#1055156#10
Date:
2026-02-24 10:15:35 UTC
From:
To:
Hello,

I'm facing the same issue as well and reported also to ubuntu launchpad since I don't know who really maintains this package.
https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/2142563


This is on Debian testing/unstable.

If I run:

reverse-depends -b src:rust-tz-rs

Then output is


Reverse-Build-Depends-Arch
==========================
* shotman                       (for librust-tz-rs-dev)


However, a search in

https://codesearch.debian.net/search?q=rust-tz-rs&literal=1

Shows that there are more packages that should be listed. Actually there should be 2 at the time of writing this bug report: rust-handsome-logger, shotman.

It actually seems that reverse-depends doesn't consider virtual packages (eg. listed in Provides of the corresponding binary package) properly and fails at identifying the rdeps properly.


Regards
Fab

#1055156#17
Date:
2026-02-24 12:21:40 UTC
From:
To:
Hi Fab (2026.02.24_10:15:35_+0000)

I maintain the backend, patches welcome:

https://launchpad.net/reverse-depends

I thought I had implemented Provides, this suprised me :)

Stefano