]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - usr.sbin/pkg_install/info/pkg_info.1
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / usr.sbin / pkg_install / info / pkg_info.1
1 .\"
2 .\" FreeBSD install - a package for the installation and maintenance
3 .\" of non-core utilities.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" Jordan K. Hubbard
15 .\"
16 .\"
17 .\"     @(#)pkg_info.1
18 .\" $FreeBSD$
19 .\"
20 .Dd November 9, 2012
21 .Dt PKG_INFO 1
22 .Os
23 .Sh NAME
24 .Nm pkg_info
25 .Nd a utility for displaying information on software packages
26 .Sh SYNOPSIS
27 .Nm
28 .Op Fl bcdDEfghGiIjkKLmopPqQrRsvVxX
29 .Op Fl e Ar package
30 .Op Fl l Ar prefix
31 .Op Fl t Ar template
32 .Fl a | Ar pkg-name ...
33 .Nm
34 .Op Fl qQ
35 .Fl W Ar filename
36 .Nm
37 .Op Fl qQ
38 .Fl O Ar origin
39 .Nm
40 .Sh DESCRIPTION
41 The
42 .Nm
43 command is used to dump out information for packages, either packed up in
44 files with the
45 .Xr pkg_create 1
46 command or already installed on the system
47 with the
48 .Xr pkg_add 1
49 command.
50 .Sh OPTIONS
51 The following command line options are supported:
52 .Bl -tag -width indent
53 .It Ar pkg-name ...
54 The named packages are described.
55 A package name may either be the name of
56 an installed package, the pathname to a package distribution file or a
57 URL to an FTP available package.
58 Package version numbers can also be matched in a relational manner using the
59 .Pa >= , <= , >
60 and
61 .Pa <
62 operators.
63 For example,
64 .Pp
65 .Dl "pkg_info 'portupgrade>=20030723'"
66 .Pp
67 will match versions 20030723 and later of the
68 .Pa portupgrade
69 package.
70 .It Fl a , -all
71 Show all currently installed packages.
72 .It Fl b , -blocksize
73 Use the
74 .Ev BLOCKSIZE
75 environment variable for output even when the
76 .Fl q
77 or
78 .Fl Q
79 flag is present.
80 .It Fl h , -help
81 Print help message.
82 .It Fl v , -verbose
83 Turn on verbose output.
84 .It Fl p
85 Show the installation prefix for each package.
86 .It Fl q , -quiet
87 Be
88 .Dq quiet
89 in emitting report headers and such, just dump the
90 raw info (basically, assume a non-human reading).
91 .It Fl Q
92 Be
93 .Dq quiet
94 as above but print preface output with the package name.
95 .It Fl c
96 Show the (one line) comment field for each package.
97 .It Fl d
98 Show the long description field for each package.
99 .It Fl D
100 Show the install-message file for each package.
101 .It Fl f
102 Show the packing list instructions for each package.
103 .It Fl g
104 Show files that do not match the recorded checksum.
105 .It Fl i
106 Show the install script (if any) for each package.
107 .It Fl I
108 Show an index line for each package.
109 This option takes
110 precedence over all other package formatting options.
111 .It Fl j
112 Show the requirements script (if any) for each package.
113 .It Fl k
114 Show the de-install script (if any) for each package.
115 .It Fl K , -keep
116 Keep any downloaded package in
117 .Ev PKGDIR
118 if it is defined or in current directory by default.
119 .It Fl r
120 For each of the specified packages,
121 show the list of packages on which it depends.
122 .It Fl R
123 For each of the specified packages,
124 show the list of installed packages which require it.
125 .It Fl m
126 Show the
127 .Xr mtree 8
128 file (if any) for each package.
129 .It Fl L
130 Show the files within each package.
131 This is different from just
132 viewing the packing list, since full pathnames for everything
133 are generated.
134 .It Fl s
135 Show the total size occupied by files installed within each package.
136 .It Fl o
137 Show the
138 .Dq origin
139 path recorded on package generation.
140 This path is the directory name in the
141 .Fx
142 .Em "Ports Collection"
143 of the underlying port from which the package was generated.
144 .It Fl G , -no-glob
145 Do not try to expand shell glob patterns in the
146 .Ar pkg-name
147 when selecting packages to be displayed (by default
148 .Nm
149 automatically expands shell glob patterns in the
150 .Ar pkg-name ) .
151 .It Fl W , -which Ar filename
152 For the specified
153 .Ar filename
154 argument show which package it belongs to.
155 If the file is not in the
156 current directory, and does not have an absolute path, then the
157 directories specified in the environment variable
158 .Ev PATH
159 are searched using
160 .Xr which 1 .
161 .It Fl O , -origin Ar origin
162 List all packages having the specified
163 .Ar origin .
164 .It Fl x , -regex
165 Treat the
166 .Ar pkg-name
167 as a regular expression and display information only for packages
168 whose names match that regular expression.
169 Multiple regular
170 expressions could be provided, in that case
171 .Nm
172 displays information about all packages that match at least one
173 regular expression from the list.
174 .It Fl X , -extended
175 Like
176 .Fl x ,
177 but treats the
178 .Ar pkg-name
179 as an extended regular expression.
180 .It Fl e , -exists Ar package
181 If the package identified by
182 .Ar package
183 is currently installed, return 0, otherwise return 1.
184 This option
185 allows you to easily test for the presence of another (perhaps
186 prerequisite) package from a script.
187 .It Fl E
188 Show only matching package names.
189 This option takes
190 precedence over all other package formatting options.
191 If any packages match, return 0, otherwise return 1.
192 .It Fl l Ar prefix
193 Prefix each information category header (see
194 .Fl q )
195 shown with
196 .Ar prefix .
197 This is primarily of use to front-end programs that want to request a
198 lot of different information fields at once for a package, but do not
199 necessarily want the output intermingled in such a way that they cannot
200 organize it.
201 This lets you add a special token to the start of
202 each field.
203 .It Fl t , -template Ar template
204 Use
205 .Ar template
206 as the argument to
207 .Xr mktemp 3
208 when creating a
209 .Dq staging area .
210 By default, this is the string
211 .Pa /tmp/instmp.XXXXXX ,
212 but it may be necessary to override it in the situation where
213 space in your
214 .Pa /tmp
215 directory is limited.
216 Be sure to leave some number of
217 .Ql X
218 characters for
219 .Xr mktemp 3
220 to fill in with a unique ID.
221 .Bd -ragged -offset indent -compact
222 Note: This should really not be necessary with
223 .Nm ,
224 since very little information is extracted from each package
225 and one would have to have a very small
226 .Pa /tmp
227 indeed to overflow it.
228 .Ed
229 .It Fl V
230 Show revision number of the packing list format.
231 .It Fl P , -version
232 Show revision number of package tools.
233 .El
234 .Sh TECHNICAL DETAILS
235 Package info is either extracted from package files named on the
236 command line, or from already installed package information
237 in
238 .Pa /var/db/pkg/ Ns Aq Ar pkg-name .
239 .Sh ENVIRONMENT
240 .Bl -tag -width ".Ev PKG_TMPDIR"
241 .It Ev BLOCKSIZE
242 If the environment variable
243 .Ev BLOCKSIZE
244 is set the block counts will be displayed in units of that
245 size block.
246 .It Ev PKG_TMPDIR
247 Points to the directory where
248 .Nm
249 creates its temporary files.
250 If this variable is not set,
251 .Ev TMPDIR
252 is used.
253 If both are unset, the builtin defaults are used.
254 .It Ev PKG_DBDIR
255 Specifies an alternative location for the installed package database.
256 .It Ev PKG_PATH
257 Specifies an alternative package location, if a given package cannot be
258 found.
259 .It Ev PKGDIR
260 Specifies an alternative location to save downloaded packages to.
261 .It Ev PKG_OLD_NOWARN
262 If set
263 .Nm
264 will not warn about its use in the presence of pkgng databases.
265 .El
266 .Sh FILES
267 .Bl -tag -width ".Pa /var/db/pkg" -compact
268 .It Pa /var/tmp
269 Used if the environment variables
270 .Ev PKG_TMPDIR
271 and
272 .Ev TMPDIR
273 are not set, or if the directories named have insufficient space.
274 .It Pa /tmp
275 The next choice if
276 .Pa /var/tmp
277 does not exist or has insufficient space.
278 .It Pa /usr/tmp
279 The last choice if
280 .Pa /tmp
281 is unsuitable.
282 .It Pa /var/db/pkg
283 Default location of the installed package database.
284 .It Ev PKG_OLD_NOWARN
285 If set
286 .Nm
287 will not warn about its use in the presence of pkgng databases.
288 .El
289 .Sh SEE ALSO
290 .Xr pkg_add 1 ,
291 .Xr pkg_create 1 ,
292 .Xr pkg_delete 1 ,
293 .Xr pkg_version 1 ,
294 .Xr mktemp 3 ,
295 .Xr mtree 8
296 .Sh AUTHORS
297 .An Jordan Hubbard
298 .Sh CONTRIBUTORS
299 .An John Kohl Aq jtk@rational.com ,
300 .An Oliver Eikemeier Aq eik@FreeBSD.org
301 .Sh BUGS
302 Sure to be some.