1.\" $OpenBSD: pkg_mklocatedb.1,v 1.10 2008/05/16 22:01:27 jmc Exp $ 2.\" Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org> 3.\" 4.\" Permission to use, copy, modify, and distribute this software for any 5.\" purpose with or without fee is hereby granted, provided that the above 6.\" copyright notice and this permission notice appear in all copies. 7.\" 8.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" 16.Dd $Mdocdate: May 16 2008 $ 17.Dt PKG_MKLOCATEDB 1 18.Os 19.Sh NAME 20.Nm pkg_mklocatedb 21.Nd create a locate database for packages 22.Sh SYNOPSIS 23.Nm pkg_mklocatedb 24.Bk -words 25.Op Fl anPq 26.Op Fl d Ar repository 27.Op Fl p Ar portsdir 28.Op Fl r Ar release 29.Op Fl s Ar src 30.Op Fl x Ar X11src 31.Op Ar pkg-name Op Ar ... 32.Ek 33.Sh DESCRIPTION 34The 35.Nm 36command is used to create a file database for binary packages, 37which can be searched using the 38.Xr locate 1 39utility. 40.Pp 41Entries created for each package will have the package name prepended: 42.Li kdelibs-3.3.2p2:/usr/local/bin/meinproc . 43.Pp 44If the 45.Fl p 46option is used, 47.Nm 48will retrieve all package entries from the ports tree. 49Otherwise, 50.Nm 51will build database entries for every file object for each 52.Ar pkg-name 53given on the command line, 54or for every package in a 55.Ar repository 56specified as the 57.Fl d 58option. 59If no package name is given, 60.Nm 61will build database entries for all currently installed packages. 62.Pp 63By default (unless standard output is a terminal), 64the list of names is fed to 65.Pa /usr/libexec/locate.mklocatedb 66and the end result should be redirected to a file. 67.Pp 68In addition, 69.Nm 70can also list files in the base sets of an 71.Ox 72distribution, which are not exactly packages in the usual sense. 73.Pp 74The options are as follows: 75.Bl -tag -width Ds 76.It Fl a 77Prepend file names with pkgpath information and package names. 78.It Fl d Ar repository 79Scan directory 80.Ar repository 81for packages. 82.It Fl n 83Do not pipe output to 84.Pa /usr/libexec/locate.mklocatedb 85(default if standard output is a terminal). 86.It Fl P 87Prepend file names with pkgpath information instead of package name. 88.It Fl p Ar portsdir 89Retrieve packing lists from the ports tree instead of binary packages. 90.It Fl q 91Be quiet: do not report every package processed to standard error. 92.It Fl r Ar release 93Specify the location of a release directory 94.Po 95see 96.Xr release 8 97.Pc . 98.Nm 99will list release tar balls from that directory. 100.It Fl s Ar src 101Specify the location of 102.Ox 103source. 104.Nm 105will list sets found under that source directory. 106.It Fl x Ar X11src 107Specify the location of X11 source. 108.Nm 109will list sets found under that X11 source directory. 110.El 111.Sh SEE ALSO 112.Xr locate 1 , 113.Xr pkg_info 1 114.Sh AUTHORS 115.An Marc Espie 116