OpenBSD manual page server

Manual Page Search Parameters

PKG_MKLOCATEDB(1) General Commands Manual PKG_MKLOCATEDB(1)

pkg_mklocatedbcreate a locate database for packages

pkg_mklocatedb [-aCKnPqu] [-d repository] [-p portsdir] [-r release] [-s src] [-x X11src] [pkg-name [...]]

The pkg_mklocatedb command is used to create a file database for binary packages, which can be searched using the locate(1) utility.

Entries created for each package will have the package name prepended: kdelibs-3.3.2p2:/usr/local/bin/meinproc.

If the -p option is used, and SUBDIRLIST is not defined, pkg_mklocatedb will retrieve all package entries from the ports tree.

If the -p option is used together with SUBDIRLIST, pkg_mklocatedb will retrieve the package entries listed in SUBDIRLIST from the ports tree.

Otherwise, pkg_mklocatedb will build database entries for every file object for each pkg-name given on the command line, or for every package in a repository specified as the -d option. If no package name is given, pkg_mklocatedb will build database entries for all currently installed packages.

By default (unless standard output is a terminal), the list of names is fed to /usr/libexec/locate.mklocatedb and the end result should be redirected to a file.

In addition, pkg_mklocatedb can also list files in the base sets of an OpenBSD distribution, which are not exactly packages in the usual sense.

The options are as follows:

Prepend file names with pkgpath information and package names.
Check that files from the source and xenocara sets actually exist. This prevents badly out-of-synch errors.
repository
Scan directory repository for packages.
Include keyword in each object full name. This is more accurate, but defeats locate(1) compression.
Do not pipe output to /usr/libexec/locate.mklocatedb (default if standard output is a terminal).
Prepend file names with pkgpath information instead of package name.
portsdir
Retrieve packing-lists from the ports tree instead of binary packages.
Be quiet: do not report every package processed to standard error.
release
Specify the location of a release directory (see release(8)). pkg_mklocatedb will list release tar balls from that directory.
src
Specify the location of OpenBSD source. pkg_mklocatedb will list sets found under that source directory.
Update an existing list. The list must come from standard input, and contain pkgpath information for items to be replaced. This can also be used to supplement an existing database with source and x11 information.
X11src
Specify the location of X11 source. pkg_mklocatedb will list sets found under that X11 source directory.

locate(1), pkg_info(1)

Marc Espie

January 27, 2013 OpenBSD-5.4