rpmgdb.pl v1.0                        by Laust Brock-Nannestad, February, 1999

  An RPM info to GDB database converter.

  This program will create a database of all the RPMs found in a list of 
  user-specified directories. It will also flag those which are installed on 
  the current system as such, so that you can see which RPMs you have
  installed and which not. If an installed program is found, but the 
  corresponding RPM isn't found, then it will still be added to the
  database, but with the string "N/A" in the RPM field of the database. If
  you do not wish to have these packages included, then you can specify so
  with the '-i' switch.

  A list of installed programs which were not found as RPMs will also be
  shown after the program has been run (or rather, list of source packages
  will be shown, but this should be more than enough to identify the original
  package).

Usage:

       perl [-w] rpmgdb.pl [-iv] <output filename> <dir1> <dir2> .. <dirN>

  or if renamed and made executable and placed a suitable place in
  your filesystem (recommended):

       rpmgdb [-iv] <output filename> <dir1> <dir2> .. <dirN>

Key:

  <output filename> is the name of the GDB file you wish to create
  (i.e. rpmgdb.gdb - extension must be specified)

  <dir1> .. <dirN> is a list of directories to search for '.rpm' files.
  (ending slash on the directory name is not required)

Options:

  -i        Do not include the installed packages for which the corresponding
            RPM file is not available.
  -v        Verbose - show more information (the name of each package as it is
            queried).


Requirements:

  - A UNIX system that uses RPMs for installation purposes. This usually
    means Red Hat Linux...  
  - the script  
  - Perl version 5 (should be standard on most systems)
  - a compiled version of "gdbload", available from SUPER (source only). 
    Gdbload must reside somewhere in the path (for instance in 
	/usr/local/bin/).


Bugs and Future ideas:

  - the line-splitting "algorithm" is not working correctly. It may never
    be perfect, but it can probably be improved. Perhaps it should be abandoned
	altogether (just replace newlines with spaces)...
  - The current program is rather slow, as it executes "rpm" for each of the
    found RPMs. This process could be made faster by querying the RPMs
    directly from Perl (and there may indeed already be modules that do this 
	on CPAN)
  - The program is still dependent on the gdbload utility. If the Perl GDB
    modules were used instead and combined with the idea above, the tool
    could be made independent of all other programs (except perl :-)
  - The Perl code in the script may not be optimal (but shouldn't be
    totally inefficient either!), but then, Perl code doesn't have to be ;-)

Legal Status:

  This program is hereby placed in the Public Domain. However, if you find it
  useful, or have questions/comments, then I would appreciate feedback. My
  e-mail address can be found below. There is no guarantee that I will time
  to implement any changes or ideas, though.

Author:

  Programming:                     Laust Brock-Nannestad <laustbn@diku.dk>

  Thanks must also go to Mitchell Hamm, for telling me that he wanted a 
  program that could do this :-)

For more information about the RPM package format, visit Red Hat Software
at <URL:http://www.redhat.com>.
