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