summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/info/pkg_info.1
blob: 86caa7a7ded6204568668f17a04a84042d4c7442 (plain)
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" Jordan K. Hubbard
.\"
.\"
.\"     @(#)pkg_info.1
.\" $FreeBSD$
.\"
.Dd January 9, 2006
.Dt PKG_INFO 1
.Os
.Sh NAME
.Nm pkg_info
.Nd a utility for displaying information on software packages
.Sh SYNOPSIS
.Nm
.Op Fl bcdDEfgGijIkKLmopPqQrRsvVxX
.Op Fl e Ar package
.Op Fl l Ar prefix
.Op Fl t Ar template
.Fl a | Ar pkg-name ...
.Nm
.Op Fl qQ
.Fl W Ar filename
.Nm
.Op Fl qQ
.Fl O Ar origin
.Nm
.Sh DESCRIPTION
The
.Nm
command is used to dump out information for packages, either packed up in
files with the
.Xr pkg_create 1
command or already installed on the system
with the
.Xr pkg_add 1
command.
.Sh OPTIONS
The following command line options are supported:
.Bl -tag -width indent
.It Ar pkg-name ...
The named packages are described.
A package name may either be the name of
an installed package, the pathname to a package distribution file or a
URL to an FTP available package.
Package version numbers can also be matched in a relational manner using the
.Pa \*[Ge], \*[Le], \*[Gt]
and
.Pa \*[Lt]
operators.
For example,
.Pa pkg_info 'portupgrade\*[Ge]20030723'
will match versions 20030723 and later of the
.Pa portupgrade
package.
.It Fl a
Show all currently installed packages.
.It Fl b
Use the BLOCKSIZE environment variable for output even when the
.Fl q
or
.Fl Q
flag is present.
.It Fl v
Turn on verbose output.
.It Fl p
Show the installation prefix for each package.
.It Fl q
Be
.Dq quiet
in emitting report headers and such, just dump the
raw info (basically, assume a non-human reading).
.It Fl Q
Be
.Dq quiet
as above but print preface output with the package name.
.It Fl c
Show the (one line) comment field for each package.
.It Fl d
Show the long description field for each package.
.It Fl D
Show the install-message file for each package.
.It Fl f
Show the packing list instructions for each package.
.It Fl g
Show files that do not match the recorded checksum.
.It Fl i
Show the install script (if any) for each package.
.It Fl I
Show an index line for each package.
This option takes
precedence over all other package formatting options.
.It Fl j
Show the requirements script (if any) for each package.
.It Fl k
Show the de-install script (if any) for each package.
.It Fl K
Keep any downloaded package in
.Ev PKGDIR
if it is defined or in current directory by default.
.It Fl r
Show the list of packages on which each package depends.
.It Fl R
Show the list of installed packages which require each package.
.It Fl m
Show the mtree file (if any) for each package.
.It Fl L
Show the files within each package.
This is different from just
viewing the packing list, since full pathnames for everything
are generated.
.It Fl s
Show the total size occupied by files installed within each package.
.It Fl o
Show the
.Dq origin
path recorded on package generation.
This path
intended to give an idea as to where the underlying port, from which
package was generated, is located in the
.Fx
.Em "Ports Collection" .
.It Fl G
Do not try to expand shell glob patterns in the
.Ar pkg-name
when selecting packages to be displayed (by default
.Nm
automatically expands shell glob patterns in the
.Ar pkg-name ) .
.It Fl W
For the specified
.Ar filename
argument show which package it belongs to.
If the file is not in the
current directory, and does not have an absolute path, then the
.Ev PATH
is searched using
.Xr which 1 .
.It Fl O
For the specified
.Ar origin
argument list all packages having this origin.
.It Fl x
Treat the
.Ar pkg-name
as a regular expression and display information only for packages
whose names match that regular expression.
Multiple regular
expressions could be provided, in that case
.Nm
displays information about all packages that match at least one
regular expression from the list.
.It Fl X
Like
.Fl x ,
but treats the
.Ar pkg-name
as an extended regular expression.
.It Fl e Ar pkg-name
If the package identified by
.Ar pkg-name
is currently installed, return 0, otherwise return 1.
This option
allows you to easily test for the presence of another (perhaps
prerequisite) package from a script.
.It Fl E
Show only matching package names.
This option takes
precedence over all other package formatting options.
If any packages match, return 0, otherwise return 1.
.It Fl l Ar str
Prefix each information category header (see
.Fl q )
shown with
.Ar str .
This is primarily of use to front-end programs who want to request a
lot of different information fields at once for a package, but do not
necessary want the output intermingled in such a way that they cannot
organize it.
This lets you add a special token to the start of
each field.
.It Fl t Ar template
Use
.Ar template
as the input to
.Xr mktemp 3
when creating a
.Dq staging area .
By default, this is the string
.Pa /tmp/instmp.XXXXXX ,
but it may be necessary to override it in the situation where
space in your
.Pa /tmp
directory is limited.
Be sure to leave some number of `X' characters
for
.Xr mktemp 3
to fill in with a unique ID.
.Bd -ragged -offset indent -compact
Note: This should really not be necessary with
.Nm ,
since very little information is extracted from each package
and one would have to have a very small
.Pa /tmp
indeed to overflow it.
.Ed
.It Fl V
Show revision number of the packing list format.
.It Fl P
Show revision number of package tools.
.El
.Sh TECHNICAL DETAILS
Package info is either extracted from package files named on the
command line, or from already installed package information
in
.Pa /var/db/pkg/ Ns Aq Ar pkg-name .
.Sh ENVIRONMENT
.Bl -tag -width PKG_TMPDIR
.It Ev BLOCKSIZE
If the environment variable
.Ev BLOCKSIZE
is set the block counts will be displayed in units of that
size block.
.It Ev PKG_TMPDIR
Points to the directory where
.Nm
creates its temporary files.
If this variable is not set,
.Ev TMPDIR
is used.
If both are unset, the builtin defaults are used.
.It Ev PKG_DBDIR
Specifies an alternative location for the installed package database.
.It Ev PKG_PATH
Specifies an alternative package location, if a given package cannot be
found.
.It Ev PKGDIR
Specifies an alternative location to save downloaded packages to.
.El
.Sh FILES
.Bl -tag -width /var/db/pkg -compact
.It Pa /var/tmp
Used if the environment variables
.Ev PKG_TMPDIR
and
.Ev TMPDIR
are not set, or if the directories named have insufficient space.
.It Pa /tmp
The next choice if
.Pa /var/tmp
does not exist or has insufficient space.
.It Pa /usr/tmp
The last choice if
.Pa /tmp
is unsuitable.
.It Pa /var/db/pkg
Default location of the installed package database.
.El
.Sh SEE ALSO
.Xr pkg_add 1 ,
.Xr pkg_create 1 ,
.Xr pkg_delete 1 ,
.Xr pkg_version 1 ,
.Xr mktemp 3 ,
.Xr mtree 8
.Sh AUTHORS
.An Jordan Hubbard
.Sh CONTRIBUTORS
.An John Kohl Aq jtk@rational.com ,
.An Oliver Eikemeier Aq eik@FreeBSD.org
.Sh BUGS
Sure to be some.
OpenPOWER on IntegriCloud