[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Use /var/lib/dpkg/status directly

Frank Lichtenheld <djpig@debian.org> schrieb:

> On Thu, Feb 26, 2004 at 02:36:30PM +0100, Markus Braun wrote:
>> Hi,
>> for a script I'm writing I need to get information for several packages.
>> Because "dpkg -s ..." is slow I thought about using grep/awk on
>> /var/lib/dpkg/status directly to get the information. I'm not sure if this
>> is a valid possibility or if direct access to /var/lib/dpkg/status should be
>> avoided.
>> Can someone comment on this please?
> Have you looked at grep-status (package grep-dctrl) ? Perhaps this 
> is what you want.

If you're going to depend on a separate package (grep-dctrl) anyway, you
can also consider using dlocate (instead or optionally). Has all the
reporting options of dpkg, but uses a database and is much smaller.

Regards, Frank
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie

Reply to: