Subject: pkgdb - testers wanted
To: None <tech-pkg@netbsd.org>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: tech-pkg
Date: 01/09/1999 23:43:09
I've finished implementing the most important parts of the pkgdb which
stores a mapping from filename to the package the file belongs to. If
anyone wants to test the code, please let me know. People with CVS-Access
can find the patch at cvs.netbsd.org:~hubertf/pkgdb.patch.gz.

The file contains a patch against src/usr.sbin/pkg_install as of 19990109,
plus one new file, lib/pkgdb.c, a list of things to do can be found at the
top of the patch. To use the new feature, use the -F flag to pkg_info and
pkg_delete - you can then specify a pathname where a packagename is
expected else. A dump of the pkgdb can be made with "pkg_info -F". 

Example usages:

% pkg_info -Fe /usr/X11R6/bin/pload
	=> Shows you which package the named file belongs to

% pkg_info -F /usr/X11R6/bin/pload
	=> Get mode information on the package the named file belongs to

% pkg_info -LF /usr/X11R6/bin/pload
	=> Get a list of files that belong to the same package as the
	   named file

% pkg_info -F
	=> List files in the pkgdb and the pkgs they belong to (this is
	   a simple, full dump of the pkgdb)

% pkg_delete -F /usr/X11R6/bin/pload
	=> Delete the package the named file belongs to


Things not done yet but coming soon: 
 - rewrite lib/pkgdb.c to not use the ypdb.c file (we can't distribute
   that one with pkgsrc easily)
 - update documentation (manpages, probably Packages.txt)
 - add a utility to list, add & delete single entries from the pkgdb,
   plus (most importantly) rebuild it from the +CONTENTS files.

If you want to test out the patch, please let me know.


Enjoy,

	 Hubert

-- 
Hubert Feyrer <hubert.feyrer@rz.uni-regensburg.de>