Subject: README: pkgdb code committed
To: None <>
From: Hubert Feyrer <>
List: current-users
Date: 01/20/1999 00:25:50
FYI, I've just committed the pkgdb code for the pkg_* tools, plus some
other (minor) bugfixed.

 * pkg_* & the pkgdb
 * pkg_admin rebuild
 * pkg_admin check

This code mainly enables us to find out which package a file belongs to
by storing that information in a database, that can be retrieveed for
that information. The database will be manipulated automatically by
pkg_add, pkg_delete and pkg_create, no additional intervention is needed.
Querying is possible via pkg_info. In general, if the -F flag is given 
to any of these tools, a filename may be given whereever a packagename
was mandatory before. Examples:

% pkg_info -F
	=> List all files and the pkg they belong to

% pkg_info -Fe /usr/X11R6/bin/fvwm2
	=> Show which pkg the named file belongs to

% pkg_info -F /usr/X11R6/bin/fvwm2
	=> Give more information about the pkg the named
	   file belongs to

% pkg_info -LF /usr/X11R6/bin/fvwm2
	=> List all the files belonging to the same pkg
	   as the named file

% pkg_delete -F /usr/X11R6/bin/fvwm2
	=> Nuke the pkg the named file belongs to

If you upgrade your pkg_* tools (either via compiling or via the 
pkgsrc/pkgtools/pkg_install package), you'll have to manually 
build the package database from the +CONTENTS files. You can do
this with the new pkg_admin command:

% pkg_admin rebuild

If this doesn't run cleanly, it's an indication that you have
done things with either the files belonging to packages or to
things under /var/db/pkg which you should not have done. Go
figure. :)

Anyways, you should be set after running this once - pkg_add,
pkg_delete and pkg_create should update the pkgdb properly.

I've added another feature that was asked for by some people
in the past: you can now check a packages' files against their
MD5 checksums noted in the +CONTENTS files:

% pkg_admin check foopkg-17.42

will check the named package(s) and report any inconsistencies.
If no packages are given, all packages will be checked - this
will take some time, please be patient. A dot ('.') will be 
shown for every package checked.

That's it - please report any problems with send-pr. Thanks!

 - Hubert

Hubert Feyrer <>