apt-cache shows misleading dependency information

Bug #224460 reported by Rolf Leggewie on 2008-04-29
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Michael Vogt

Bug Description

Binary package hint: apt

The dependency information output from apt-cache is misleading. Depends, Recommends, Suggests and even Conflicts are all lumped together as a dependency. One example:

$ apt-cache showpkg g-wrap
Package: g-wrap
1.9.9-3 (/var/lib/apt/lists/Rie:9999_ubuntu_dists_hardy_universe_binary-i386_Packages)
 Description Language:
                 File: /var/lib/apt/lists/Rie:9999_ubuntu_dists_hardy_universe_binary-i386_Packages
                  MD5: 90f3aa27bd657aa17d94a99352e03024

Reverse Depends:
  guile-gnome0-dev,g-wrap 1.9.9
  guile-g-wrap,g-wrap 1.9.9-1
1.9.9-3 - guile-1.8 (0 (null)) guile-library (2 0.1.1) indent (0 (null)) libgwrap-runtime-dev (2 1.9.9-3) libgwrapguile-dev (0 (null))
1.9.9-3 -
Reverse Provides:

(guile and guile-library are depends, indent and libgwrap-runtime-dev are a recommends while libgwrapguile-dev is a conflicts)

Rolf Leggewie (r0lf) on 2008-04-29
description: updated
Ilya Barygin (randomaction) wrote :

Confirmed with apt 0.7.9ubuntu17.

Changed in apt:
status: New → Confirmed

Yes, I confirm this in my apt 0.7.9ubuntu17.

Rolf Leggewie (r0lf) on 2008-07-22
Changed in apt:
importance: Undecided → Medium
Changed in apt:
assignee: nobody → dereck
status: Confirmed → In Progress
Dereck Wonnacott (dereck) wrote :

Here we are~ My third patch ever, so please don't be shy about giving advice & criticism.

This patch makes apt-cache showpkg show each type of dep separately.

Changed in apt:
assignee: dereck → nobody
status: In Progress → Triaged
Michael Vogt (mvo) wrote :

Thanks for your bugreport and your patch.

The patch looks ok, however I'm hesitant to change the output here as I don't know if and how it is used by scripts that call apt-cache showpkg and would break with a change in the output.

What is your use-case for calling showpkg instead of show?


Changed in apt:
status: Triaged → Incomplete
Rolf Leggewie (r0lf) wrote :


Dereck Wonnacott (dereck) wrote :

The only use of showpkg over show is the reverse depends listing it seems.

Perhaps showpkg could be deprecated and then removed in the future rather than fixed now. If the reverse depends listing were to be added to show, there would be no reason for the two separate functions to exist. In both cases of fixing or deprecating, anyone who uses apt-cache as part of a script will need to update their scripts if we are to produce a 'fix' for this bug.

Note: Technically the showpkg tells the type of dependency with the first number in parentheses [Ex: libgcc1 (2 1:4.1.1)], but to human readers that stumble upon showpkg rather than show will be confused. I think the real issue is that users make the mistake of using showpkg when they should just be using show.

mvo? I do believe the buck stops with you, I will be satisfied with whatever decision you make.

Rolf Leggewie (r0lf) on 2009-02-03
Changed in apt:
status: Incomplete → Triaged
Sebastien Bacher (seb128) wrote :

the bug is still listed on the sponsoring list would be nice to get the change reviewed and uploaded or the sponsor team unsubscribed now

Changed in apt:
assignee: nobody → mvo
Sebastien Bacher (seb128) wrote :

<mvo> seb128: the apt-cache one is probably for apt 0.8 (where some breakage of the output format is ok)

unsubscribing the sponsor team for now

Rolf Leggewie (r0lf) wrote :

Michael, are we going to see the fix in Karmic?

tags: added: karmic
Rolf Leggewie (r0lf) wrote :

still present even in vivid (all the way at least from hardy!). What a shame.

tags: added: vivid
Changed in apt (Ubuntu):
milestone: none → ubuntu-15.03
Rolf Leggewie (r0lf) wrote :

Still present in trusty. I agree with removing the showpkg command if it's not necessary and has the potential to confuse users.

tags: added: trusty
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers