xref: /openbsd/usr.sbin/pkg_add/pkg_mklocatedb.1 (revision 898184e3)
1.\"	$OpenBSD: pkg_mklocatedb.1,v 1.15 2013/01/27 11:39:22 espie 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: January 27 2013 $
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 aCKnPqu
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,
47and
48.Ev SUBDIRLIST
49is not defined,
50.Nm
51will retrieve all package entries from the ports tree.
52.Pp
53If the
54.Fl p
55option is used
56together with
57.Ev SUBDIRLIST ,
58.Nm
59will retrieve the package entries listed in
60.Ev SUBDIRLIST
61from the ports tree.
62.Pp
63Otherwise,
64.Nm
65will build database entries for every file object for each
66.Ar pkg-name
67given on the command line,
68or for every package in a
69.Ar repository
70specified as the
71.Fl d
72option.
73If no package name is given,
74.Nm
75will build database entries for all currently installed packages.
76.Pp
77By default (unless standard output is a terminal),
78the list of names is fed to
79.Pa /usr/libexec/locate.mklocatedb
80and the end result should be redirected to a file.
81.Pp
82In addition,
83.Nm
84can also list files in the base sets of an
85.Ox
86distribution, which are not exactly packages in the usual sense.
87.Pp
88The options are as follows:
89.Bl -tag -width Ds
90.It Fl a
91Prepend file names with pkgpath information and package names.
92.It Fl C
93Check that files from the source and xenocara sets actually exist.
94This prevents badly out-of-synch errors.
95.It Fl d Ar repository
96Scan directory
97.Ar repository
98for packages.
99.It Fl K
100Include keyword in each object full name.
101This is more accurate, but defeats
102.Xr locate 1
103compression.
104.It Fl n
105Do not pipe output to
106.Pa /usr/libexec/locate.mklocatedb
107(default if standard output is a terminal).
108.It Fl P
109Prepend file names with pkgpath information instead of package name.
110.It Fl p Ar portsdir
111Retrieve packing-lists from the ports tree instead of binary packages.
112.It Fl q
113Be quiet: do not report every package processed to standard error.
114.It Fl r Ar release
115Specify the location of a release directory
116.Po
117see
118.Xr release 8
119.Pc .
120.Nm
121will list release tar balls from that directory.
122.It Fl s Ar src
123Specify the location of
124.Ox
125source.
126.Nm
127will list sets found under that source directory.
128.It Fl u
129Update an existing list.
130The list must come from standard input, and contain pkgpath information
131for items to be replaced.
132This can also be used to supplement an existing database with source and
133x11 information.
134.It Fl x Ar X11src
135Specify the location of X11 source.
136.Nm
137will list sets found under that X11 source directory.
138.El
139.Sh SEE ALSO
140.Xr locate 1 ,
141.Xr pkg_info 1
142.Sh AUTHORS
143.An Marc Espie
144