Originally Posted by countach74
They show the same package information. Look, if the reason to use one command over another is simply the format that it's displayed, that's fine, but say so. If one way is technically more/less correct, then I want to know about it. Being as I've never used apt-cache depends/rdepends, I want to know WHY those are the correct commands. Please don't be a smart ass about the response. From what I can tell, they do show the same package dependency information; is the output the same? No.
Actually, they don't show you the same information.
Assume I want information about the dependencies/recommends of package lxde
on Debian Squeeze, especially information about display-managers.
shows me that there is a recommend
gdm or x-display-manager, showpkg
shows me that there is a dependency
on gdm and
x-display-manager (since it doesn't show you that gdm can provide x-display-manager). So alone these two are not consistent on the info they show.
Now try it with depends
instead and it will show you that there is a recommend for either gdm or x-display-manager and that x-display-manager is provided by the packages gdm, gdm3, kdm, slim and xdm (and actually they should add nodm to that list).
The same is true for browsers, show
shows a recommendation for chromium-browser, iceweasel or www-browser, showpkg
shows dependencies for chromium-browser, iceweasel and www-browser, depends
show you that there is a recommendation for either chromium-browser, iceweasel or www-browser and lists all 25 packages that can provide www-browser.
have a functionality that resembles rdepends
That are the reasons why I recommended to use depends
when you are using apt-cache anyways.