Initial import from FreeBSD RELENG_4:
[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.24.2.13 2002/08/02 11:09:05 sobomax Exp $
19 .\"
20 .Dd February 8, 2001
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 cdDfgGiIkLmopqrRsvVx
29 .Op Fl e Ar package
30 .Op Fl l Ar prefix
31 .Op Fl t Ar template
32 .Op Ar pkg-name ...
33 .Nm
34 .Op Fl q
35 .Fl W Ar filename
36 .Nm
37 .Op Fl q
38 .Fl O Ar origin
39 .Nm
40 .Fl a
41 .Op Ar flags
42 .Sh DESCRIPTION
43 The
44 .Nm
45 command is used to dump out information for packages, either packed up in
46 files with the
47 .Xr pkg_create 1
48 command or already installed on the system
49 with the
50 .Xr pkg_add 1
51 command.
52 .Sh OPTIONS
53 The following command line options are supported:
54 .Bl -tag -width indent
55 .It Ar pkg-name ...
56 The named packages are described.  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 .It Fl a
60 Show all currently installed packages.
61 .It Fl v
62 Turn on verbose output.
63 .It Fl p
64 Show the installation prefix for each package.
65 .It Fl q
66 Be
67 .Dq quiet
68 in emitting report headers and such, just dump the
69 raw info (basically, assume a non-human reading).
70 .It Fl c
71 Show the (one line) comment field for each package.
72 .It Fl d
73 Show the long description field for each package.
74 .It Fl D
75 Show the install-message file for each package.
76 .It Fl f
77 Show the packing list instructions for each package.
78 .It Fl g
79 Show files that don't match the recorded checksum.
80 .It Fl i
81 Show the install script (if any) for each package.
82 .It Fl I
83 Show an index line for each package.  This option takes
84 precedence over all other package formatting options.
85 .It Fl k
86 Show the de-install script (if any) for each package.
87 .It Fl r
88 Show the requirements script (if any) for each package.
89 .It Fl R
90 Show the list of installed packages which require each package.
91 .It Fl m
92 Show the mtree file (if any) for each package.
93 .It Fl L
94 Show the files within each package.  This is different from just
95 viewing the packing list, since full pathnames for everything
96 are generated.
97 .It Fl s
98 Show the total size occupied by files installed within each package.
99 .It Fl o
100 Show the
101 .Dq origin
102 path recorded on package generation.  This path
103 intended to give an idea as to where the underlying port, from which
104 package was generated, is located in the
105 .Fx
106 .Em "Ports Collection" .
107 .It Fl G
108 Do not try to expand shell glob patterns in the
109 .Ar pkg-name
110 when selecting packages to be displayed (by default
111 .Nm
112 automatically expands shell glob patterns in the
113 .Ar pkg-name ) .
114 .It Fl W
115 For the specified
116 .Ar filename
117 argument show which package it belongs to.  If the file is not in the
118 current directory, and does not have an absolute path, then the
119 .Ev PATH
120 is searched using
121 .Xr which 1 .
122 .It Fl O
123 For the specified
124 .Ar origin
125 argument list all packages having this origin.
126 .It Fl x
127 Treat the
128 .Ar pkg-name
129 as a regular expression and display information only for packages
130 whose names match that regular expression.  Multiple regular
131 expressions could be provided, in that case
132 .Nm
133 displays information about all packages that match at least one
134 regular expression from the list.
135 .It Fl e Ar pkg-name
136 If the package identified by
137 .Ar pkg-name
138 is currently installed, return 0, otherwise return 1.  This option
139 allows you to easily test for the presence of another (perhaps
140 prerequisite) package from a script.
141 .It Fl l Ar str
142 Prefix each information category header (see
143 .Fl q )
144 shown with
145 .Ar str .
146 This is primarily of use to front-end programs who want to request a
147 lot of different information fields at once for a package, but don't
148 necessary want the output intermingled in such a way that they can't
149 organize it.  This lets you add a special token to the start of
150 each field.
151 .It Fl t Ar template
152 Use
153 .Ar template
154 as the input to
155 .Xr mktemp 3
156 when creating a
157 .Dq staging area .
158 By default, this is the string
159 .Pa /tmp/instmp.XXXXXX ,
160 but it may be necessary to override it in the situation where
161 space in your
162 .Pa /tmp
163 directory is limited.  Be sure to leave some number of `X' characters
164 for
165 .Xr mktemp 3
166 to fill in with a unique ID.
167 .Bd -ragged -offset indent -compact
168 Note:  This should really not be necessary with
169 .Nm ,
170 since very little information is extracted from each package
171 and one would have to have a very small
172 .Pa /tmp
173 indeed to overflow it.
174 .Ed
175 .It Fl V
176 Show revision number of the packing list format.
177 .El
178 .Sh TECHNICAL DETAILS
179 Package info is either extracted from package files named on the
180 command line, or from already installed package information
181 in
182 .Pa /var/db/pkg/ Ns Aq Ar pkg-name .
183 .Sh ENVIRONMENT
184 .Ev PKG_TMPDIR
185 points to the directory where
186 .Nm
187 creates its temporary files.
188 If this variable is not set,
189 .Ev TMPDIR
190 is used.  If both are unset, the builtin defaults are used.
191 .Pp
192 .Ev PKG_DBDIR
193 specifies an alternative location for the installed package database.
194 .Sh FILES
195 .Bl -tag -width /var/db/pkg -compact
196 .It Pa /var/tmp
197 Used if the environment variables
198 .Ev PKG_TMPDIR
199 and
200 .Ev TMPDIR
201 are not set, or if the directories named have insufficient space.
202 .It Pa /tmp
203 The next choice if
204 .Pa /var/tmp
205 does not exist or has insufficient space.
206 .It Pa /usr/tmp
207 The last choice if
208 .Pa /tmp
209 is unsuitable.
210 .It Pa /var/db/pkg
211 Default location of the installed package database.
212 .El
213 .Sh SEE ALSO
214 .Xr pkg_add 1 ,
215 .Xr pkg_create 1 ,
216 .Xr pkg_delete 1 ,
217 .Xr pkg_version 1 ,
218 .Xr mktemp 3 ,
219 .Xr mtree 8
220 .Sh AUTHORS
221 .An Jordan Hubbard
222 .Sh CONTRIBUTORS
223 .An John Kohl Aq jtk@rational.com
224 .Sh BUGS
225 Sure to be some.