On Mon, Sep 17, 2012 at 2:38 PM, Steve McIntyre <st...@einval.com> wrote: > On Sun, Sep 09, 2012 at 01:06:08PM -0400, Sam Lidder wrote: >>I've attached a patch which appends package version information to the >>package names for apt-cache depends and rdepends. The patch is also >>available here: >> >>https://code.launchpad.net/~sam-lidder/apt/debian-experimental >>(revision 2249) >> >>Notes: >>- version information is not displayed for virtual/non-real packages >>- version is always printed, even if CompareOp is 0, so as to be >> consistent with output of 'Dependencies' for 'apt-cache showpkg <pkg>' > > Hi Sam, > > Awesome - I was just about to start hacking on the apt-cache code to > do this and found you'd beaten me to it! :-)
Truth to be told: He did it even earlier as part of his GSoC proposal. > Apt maintainers - I need this fixed to allow me to fix #687949 in > debian-cd, which is a serious bug affecting wheezy builds right > now. Could you please prepare a build for upload with this patch > added? If there's a worry about maybe breaking other users, maybe keep > existing behaviour by default and add a "-v" or "--with-versions" > flag to get the versions included? It is indeed a worry about breaking users. There is so much stuff outwhere using apt-* in strange ways that nearly every change to the output usually results in breaking at least one of them. I e.g. didn't know that debian-cd scripts are using it … The other thing is that the generated output is less than stellar. I think if we output something here it should be in the way we see it in the Packages file and not intermixed some internal values … Depends: awesome (0 (null)) Depends: stuff (3 2-1) Nobody knows what 0 and 3 are and they could possibly change any given minute (with an ABI break of course) -- beside that this number printed includes also other stuff (like the OR flag) and showpkg is kind of a debug command, so "compatibility" with it isn't really needed. If you need it we can add it with -o APT::Cache::ShowVersion=1 as Depends: awesome Depends: stuff (<< 2-1) I guess. -v is taken by --version; -V would be an option and very similar to apt-get -V (--verbose-versions), but i don't think this needs to consume a short flag which might be better used for activating a generally improved version of the (r)depends commands (e.g. to enable showing the dependency types in rdepends by default, too) with the necessary documentation … but that is a bit much while in freeze. -o flags on the other hand are cheap to add … Anyway, as this will be advertised as a debian-cd fix implemented in APT to the release team, feel free to define the output you need and we will see how to generate it. I am unable to read/write perl, so I don't know what is easiest. (I can see in the code though that you should have a look at --important, --no-recommends and similar flags to avoid doing the filtering in perl; but I don't get what the code does in general …). Best regards David Kalnischkies -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org