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