Re: APT 0.1.9 (yes, 0.1.9!) is released!
Anthony Towns <firstname.lastname@example.org> writes:
> On Fri, Nov 06, 1998 at 02:04:02AM -0500, Steve Dunham wrote:
> > BTW, if anyone is looking for ideas: a command line program to query
> > the available cache would be a nice addition, something that can list
> > package names with Versions and Short Descriptions, and provide
> > complete records for individual packages. Like "dpkg -l" and "dpkg
> > -s" except for uninstalled packages. (Unfortunately "dpkg -l *"
> > doesn't list the versions or descriptions of uninstalled packages.)
> $ dpkg -l afterstep | grep afterstep
> pn afterstep <none> (no description available)
This doesn't suffice because I want to grep the short descriptions too.
> $ dpkg --print-avail afterstep
This fits the second request with one exception: "apt-get update"
doesn't update /var/lib/dpkg/available. (That why I suggested using
the available cache.) Assuming "/var/lib/dpkg/available" were
updated, a simple perl script, using "Dpkg::Package" would do the
IMHO, the proper way to do this is to directly access the
"srcpkgcache.bin" file, which I assume would have to be done by a
program included with apt, since the file format may change.
Moreover, it would most easily be done by someone already familiar
with the API for accessing the srcpkgcache.bin.
For now, I'm going to live without the program (rather than write a
perl script that operates on /var/lib/dpkg/available) until I can find
time to learn the API to access srcpkgcache.bin.