#941347 apt should show which package provides a virtual package

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Pirate Praveen
Date:
2019-09-29 10:15:06 UTC
Severity:
wishlist
#941347#5
Date:
2019-09-29 10:12:33 UTC
From:
To:
severity: wishlist

apt command does not show which package provides a virtual package.

$ apt show ruby-gitaly-proto
Package: ruby-gitaly-proto
State: not a real package (virtual)
N: Can't select candidate version from package ruby-gitaly-proto as it
has no candidate
N: Can't select versions from package 'ruby-gitaly-proto' as it is
purely virtual
N: No packages found

whereas aptitude does this correctly.

$ aptitude show ruby-gitaly-proto
No candidate version found for ruby-gitaly-proto
Package: ruby-gitaly-proto
State: not a real package
Provided by: ruby-gitaly (1.32.0+dfsg-1)

With versioned provides option, Provides: in debian/control is more
widely used than before, especially in javascript packages, where
creating new binary packages are discouraged in favor of Provides:

apt policy should also consider Provides: field

$ apt policy ruby-gitaly-proto
ruby-gitaly-proto:
  Installed: (none)
  Candidate: (none)
  Version table: