Re: apt/dpkg package files (status, available)
On Tue, 22 Apr 2003 18:31:29 +0100 Colin Watson wrote:
> On Tue, Apr 22, 2003 at 04:46:02PM +0100, Carlos Sousa wrote:
> > ...
> > What is the difference between the status and the available files in
> > /var/lib/dpkg? And what is their relationship to the various
> > *Packages files downloaded by 'apt-get update'?
> status is the current state of the system; it may well include short
> paragraphs on uninstalled packages with "Status: purge ok
> not-installed" or similar.
Ok. But I'm pretty sure I never installed those berlin packages I see in
my status file... :)
> available is whatever was available in the archive the last time
> 'dselect update' was run.
In what archive? I get:
$ grep-dctrl -r -sVersion -FPackage "^cdrecord$" /var/lib/apt/lists/*Packages
Version: 4:1.10-7 <-- in stable
Version: 4:2.0+a07-1 <-- in testing, installed
Version: 4:2.0+a10-2 <-- in unstable
$ grep-dctrl -r -sVersion -FPackage "^cdrecord$" /var/lib/dpkg/available
Version: 4:2.0+a07-1 <-- the one in testing
which shows that the available file doesn't really show all available
packages. Perhaps it just lists the latest packages that may be
installed considering the APT::Default-Release setting?
> > The available file, on the other hand, doesn't show all packages
> > that are available for install (but arepresent in the *Packages
> > files).
> My guess is that you're running 'apt-get update' rather than the
> preferable 'dselect update'.
No, I'm running 'dselect update' in a cron script, 3 times a day.
> > The reason I'm asking is that I'm writing a few scripts to provide
> > various kinds of overviews envolving all Debian packages in all
> > distributions, and parsing through the *Packages files takes a LONG
> > time(hours), so I'm searching for other sources of package info.
> Do you know about the grep-dctrl package?
Tried it, but no good for my purposes. I need to generate a text file
with a few selected fields from each package, tab-separated in a
one-package-per-line format. grep-dctrl just lists one field per line.
If only Debian would consider reducing the number of available packages
to a few hundred only... That'd give me much faster scripts :))