rdepends for apt-cache fails for virtual packages

Bug #1616679 reported by Quanah
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Example of problem:

The zimbra-mta package provides mail-transport-agent.

Packages that depend on mail-transport-agent are installed (mailutils,logwatch).

apt-cache is unable to list either of those as depending on zimbra-mta:

root@zre-ldap004:/home/build# apt-cache rdepends --installed mail-transport-agent
<mail-transport-agent>

aptitude does a little better:

root@zre-ldap004:/home/build# aptitude why zimbra-mta
iB mailutils Depends default-mta | mail-transport-agent
ip zimbra-mta Provides mail-transport-agent

so it finds mailutils (but not logwatch). so 50% better than apt-cache

If we try to remove zimbra-mta, we find:

root@zre-ldap004:/home/build# dpkg --purge zimbra-mta
dpkg: dependency problems prevent removal of zimbra-mta:
 mailutils depends on default-mta | mail-transport-agent; however:
  Package default-mta is not installed.
  Package mail-transport-agent is not installed.
  Package zimbra-mta which provides mail-transport-agent is to be removed.
 logwatch depends on postfix | mail-transport-agent; however:
  Package postfix is not installed.
  Package mail-transport-agent is not installed.
  Package zimbra-mta which provides mail-transport-agent is to be removed.

apt-cache kind of functions with postfix as the rdepends:

root@zre-ldap004:/home/build# apt-cache rdepends --installed postfix
postfix
Reverse Depends:
 |logwatch
  libsasl2-2
 |cron

so we pick up logwatch in that case.

However, we *still* fail to find mailutils:

root@zre-ldap004:/home/build# apt-cache rdepends --installed default-mta
<default-mta>

So the rdepends flag for apt-cache seems to be completely broken for virtual packages.

root@zre-ldap004:/home/build# apt-cache showpkg zimbra-mta
Package: zimbra-mta
Versions:
8.7.0.GA.1655.UBUNTU14.64 (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/dpkg/status
                  MD5: b25f6328eb0ffec1cb7bcd41cb0ddc9b

Reverse Depends:
Dependencies:
8.7.0.GA.1655.UBUNTU14.64 - zimbra-core (0 (null)) zimbra-mta-components (0 (null)) mail-transport-agent (0 (null)) mail-transport-agent:i386 (0 (null)) mail-transport-agent (0 (null)) mail-transport-agent:i386 (0 (null))
Provides:
8.7.0.GA.1655.UBUNTU14.64 - mail-transport-agent
Reverse Provides:

root@zre-ldap004:/home/build# apt-cache showpkg logwatch
Package: logwatch
Versions:
7.4.0+svn20130529rev144-1ubuntu1 (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_trusty_main_binary-amd64_Packages) (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_trusty_main_binary-amd64_Packages
                  MD5: ece539a8a87c5f861d7f0b865e42a03c
 Description Language: en
                 File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_trusty_main_i18n_Translation-en
                  MD5: ece539a8a87c5f861d7f0b865e42a03c

Reverse Depends:
Dependencies:
7.4.0+svn20130529rev144-1ubuntu1 - perl (0 (null)) postfix (16 (null)) mail-transport-agent (0 (null)) fortune-mod (0 (null)) libdate-manip-perl (0 (null))
Provides:
7.4.0+svn20130529rev144-1ubuntu1 -
Reverse Provides:

root@zre-ldap004:/home/build# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"

root@zre-ldap004:/home/build# apt-cache policy apt
apt:
  Installed: 1.0.1ubuntu2.14
  Candidate: 1.0.1ubuntu2.14
  Version table:
 *** 1.0.1ubuntu2.14 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.0.1ubuntu2.13 0
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1.0.1ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt (Ubuntu):
status: New → Confirmed
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Try this command:

apt-cache showpkg mail-transport-agent

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.