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