-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpkg-provides.8
90 lines (90 loc) · 2.69 KB
/
pkg-provides.8
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
.\"
.\" Copyright (c) 2018 Rodrigo Osorio <[email protected]>
.\"
.\" 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 February 9, 2020
.Dt PKG-PROVIDES 8
.Os
.Sh NAME
.Nm "pkg provides"
.Nd query which package provides a file matching a particular pattern
.Sh SYNOPSIS
.Nm
.Op Fl u
.Op Fl f
.Nm
.Op Fl r Ar repo
.Ar pattern
.Sh DESCRIPTION
.Nm
is used to query which package in your pkg catalog provides a particular
file given a pattern.
.Pp
The search pattern can be any perl compatible regular expression (PCRE).
.Sh OPTIONS
The following options are supported by
.Nm :
.Bl -tag -width repository
.It Fl u
Check if a new database file is available and then perform the update.
.It Fl f
Force the update.
.It Fl r Ar repo
Restrict search results to a specific repository.
.It Sy pattern
Can be any perl compatible regular expression (PCRE). The search is not case sensitive.
.El
.Sh ENVIRONMENT
.Bl -tag -width "PROVIDES_FETCH_ON_UPDATE"
.It PROVIDES_FETCH_ON_UPDATE
If set to "NO", it disables the default behaviour and doesn't perform a
.Nm
database update after updating pkg.
.It PROVIDES_SRV
When set, overrides the default
.Nm
server address.
The default value is "https://pkg-provides.osorio.me".
.It PROVIDES_FILEPATH
When set, overrides the default database file location in the remote server.
The filepath format is the following : v3/{osname}/{osver}:{arch}.
The default value is "v3/FreeBSD/12:amd64" for a FreeBSD 12 and "v3/DragonFly/6.2:x86:64"
for a DragonFly 6.2.
.It PROVIDES_URL
This environment variable is \fBdeprecated\fP. Use \fBPROVIDES_SRV\fP instead.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
Update the provides database:
.Pp
.Dl $ pkg provides -u
.Pp
Search for a package that provides bin/firefox
.Pp
.Dl $ pkg provides bin/firefox$
.Pp
Search for packages that provide a file with the pattern libbz2.so.*
.Pp
.Dl $ pkg provides ^libbz2.so.
.Pp
Look for bin/firefox but only in the
.Fx
repository
.Pp
.Dl $ pkg provides -r FreeBSD bin/firefox$
.Sh AUTHORS
.An -nosplit
.Nm
.An was written by Rodrigo Osorio <[email protected]> .