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

Intent to package a Debian control file grepper


I've written a small (14kB of stripped i386 binary) and fast (beats dpkg
--print-avail on my unscientific tests by a rough factor of two) utility
which so to speak greps any file which has the general format of a Debian
control file as described in the Packaging Manual.  Such files are the
control files on any Debian package, and, more importantly, the dpkg
available file, the dpkg status file and the Packages files on distribution

Here are the intended typical uses for this utility:

  1) Show me the available record / Packages record / something
     of package mixal
          grep-dctrl -F Package mixal /var/lib/dpkg/available
     This is faster than 'dpkg --print-avail mixal' by a rough factor
     of two on my Celeron/266 box.

  2) Who maintain the essential packages in Debian?
          grep-dctrl -F Essential -s Maintainer yes \
	       /var/lib/dpkg/available | sort | uniq
  3) Which packages does ajk@debian.org maintain and what are
     their current versions?
          grep-dctrl -F Maintainer -s Package,Version ajk@debian.org \
   4) Which packages have "Knuth" or "LaTeX" in their description?

          grep-dctrl -e -F Description -s Package '(Knuth|LaTeX)' \

Here is a sample output:

ajk@ugh[22:03:04]:~/project/grep-dctrl$ ./grep-dctrl -F Maintainer -s \
 Package,Version ajk@debian.org /var/lib/dpkg/available
Package: malaga-doc
Version: 4.2.5-1

Package: chase
Version: 0.3.1-2

Package: libmalaga-dev
Version: 4.2.5-1

Package: libmalaga1
Version: 4.2.5-1

Package: malaga-bin
Version: 4.2.5-1

Package: mixal
Version: 1.08-2

The utility is ready for wider testing except that I haven't yet written any
documentation for it. I'm thinking of packaging it once the docs are ready.
Does anybody have an objection (for example: hey A-J, there already is such
a program; or hey A-J, the program is useless because ...)?  Does anybody
have any other comments?

I'm licensing the program under the GNU GPL.

%%% Antti-Juhani Kaijanaho % gaia@iki.fi % http://www.iki.fi/gaia/ %%%

                 "Fight them without becoming them."
           (J. Michael Straczynski: Babylon 5, 3rd Season)

Attachment: pgp99weAPRpNw.pgp
Description: PGP signature

Reply to: