Annotation of pkgsrc/pkgtools/pkg_install/files/info/pkg_info.1, Revision 1.8
1.8 ! grant 1: .\" $NetBSD: pkg_info.1,v 1.37 2004/01/06 16:22:06 wiz Exp $
1.1 schmonz 2: .\"
1.2 jlam 3: .\" FreeBSD install - a package for the installation and maintenance
1.1 schmonz 4: .\" of non-core utilities.
5: .\"
6: .\" Redistribution and use in source and binary forms, with or without
7: .\" modification, are permitted provided that the following conditions
8: .\" are met:
9: .\" 1. Redistributions of source code must retain the above copyright
10: .\" notice, this list of conditions and the following disclaimer.
11: .\" 2. Redistributions in binary form must reproduce the above copyright
12: .\" notice, this list of conditions and the following disclaimer in the
13: .\" documentation and/or other materials provided with the distribution.
14: .\"
15: .\" Jordan K. Hubbard
16: .\"
17: .\"
18: .\" @(#)pkg_info.1
19: .\"
1.6 hubertf 20: .Dd January 6, 2004
1.1 schmonz 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
1.2 jlam 28: .Op Fl BbcDdFfhIikLmNnpqRrSsVv
1.1 schmonz 29: .Bk -words
30: .Op Fl e Ar package
31: .Ek
32: .Bk -words
1.2 jlam 33: .Op Fl K Ar pkg_dbdir
34: .Ek
35: .Bk -words
1.1 schmonz 36: .Op Fl l Ar prefix
37: .Ek
38: .Ar pkg-name ...
39: .Nm
40: .Bk -words
41: .Op Fl a Ar flags
42: .Ek
43: .Sh DESCRIPTION
44: The
45: .Nm
46: command is used to dump out information for packages, which may be either
47: packed up in files or already installed on the system with the
48: .Xr pkg_create 1
49: command.
50: .Pp
51: The
52: .Ar pkg-name
53: may be the name of an installed package (with our without version), a
54: pattern matching several installed packages (see the
1.6 hubertf 55: .Sx PACKAGE WILDCARDS
56: section for a description of possible patterns),
1.1 schmonz 57: the pathname to a
1.6 hubertf 58: binary package, a filename belonging to an installed
1.1 schmonz 59: package (if
60: .Fl F
61: is also given), or a URL to an ftp-available package.
62: .Pp
63: The following command-line options are supported:
64: .Bl -tag -width indent
65: .It Fl a
66: Show information for all currently installed packages.
67: .It Fl B
68: Show some of the important definitions used when building
69: the binary package (the "Build information") for each package.
70: .It Fl b
71: Show the
72: .Nx
73: RCS Id strings from the files used in the construction
74: of the binary package (the "Build version") for each package.
75: These files are the package Makefile, any patch files, any checksum
76: files, and the packing list file.
77: .It Fl c
78: Show the one-line comment field for each package.
79: .It Fl D
80: Show the install-message file (if any) for each package.
81: .It Fl d
82: Show the long-description field for each package.
83: .It Fl e Ar pkg-name
84: This option
1.7 wiz 85: allows you to test for the existence of a given package.
1.1 schmonz 86: If the package identified by
87: .Ar pkg-name
1.6 hubertf 88: is currently installed, return code is 0, otherwise 1.
89: The names of any package(s) found installed are printed to
1.1 schmonz 90: stdout unless turned off using the
91: .Fl q
92: option.
93: .Ar pkg-name
1.6 hubertf 94: can contain wildcards, see the
95: .Sx PACKAGE WILDCARDS
96: section below.
1.1 schmonz 97: .It Fl F
98: Interpret any pkg-name given as filename, and translate it to a
99: package name using the Package Database.
100: This can be used to query information on a per-file basis, e.g. in
101: conjunction with the
102: .Fl e
103: flag to find out which package a file belongs to.
104: .It Fl f
105: Show the packing list instructions for each package.
106: .It Fl I
107: Show the index entry for each package.
108: .It Fl i
109: Show the install script (if any) for each package.
1.2 jlam 110: .It Fl K Ar pkg_dbdir
111: Set
112: .Ar pkg_dbdir
113: as the package database directory.
114: If this option isn't specified, then the package database directory is
115: taken from the value of the environment variable
116: .Ev PKG_DBDIR
117: if it's set, otherwise it defaults to
118: .Pa /var/db/pkg .
1.1 schmonz 119: .It Fl k
120: Show the de-install script (if any) for each package.
121: .It Fl L
122: Show the files within each package.
123: This is different from just viewing the packing list, since full pathnames
124: for everything are generated.
125: .It Fl l Ar str
126: Prefix each information category header (see
127: .Fl q )
128: shown with
129: .Ar str .
130: This is primarily of use to front-end programs that want to request a
131: lot of different information fields at once for a package, but don't
132: necessary want the output intermingled in such a way that they can't
133: organize it.
134: This lets you add a special token to the start of each field.
135: .It Fl m
136: Show the mtree file (if any) for each package.
1.2 jlam 137: .It Fl N
138: Show which packages each package was built with (exact dependencies), if any.
1.1 schmonz 139: .It Fl n
140: Show which packages each package needs (depends upon), if any.
141: .It Fl p
142: Show the installation prefix for each package.
143: .It Fl q
144: Be ``quiet'' in emitting report headers and such, just dump the
145: raw info (basically, assume a non-human reading).
146: .It Fl R
147: Show which packages are required by each package.
148: .It Fl r
149: Show the requirements script (if any) for each package.
150: .It Fl S
151: Show the size of this package and all the packages it requires,
152: in bytes.
153: .It Fl s
154: Show the size of this package in bytes.
155: The size is calculated by adding up the size of each file of the package.
156: .It Fl V
157: Print version number and exit.
158: .It Fl v
159: Turn on verbose output.
160: .El
1.6 hubertf 161: .Sh TECHNICAL DETAILS
162: Package info is either extracted from package files named on the
163: command line, or from already installed package information
164: in
165: .Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt] .
166: .Pp
167: A filename can be given instead of a (installed) package name to query
168: information on the package this file belongs to.
169: This filename is then resolved to a package name using the Package Database.
170: For this translation to take place, the
171: .Fl F
172: flag must be given.
173: The filename must be absolute, compare the output of pkg_info
174: .Fl aF .
175: .Sh PACKAGE WILDCARDS
176: In the places where a package name/version is expected, e.g. for the
177: .Fl e
1.7 wiz 178: switch, several forms can be used.
179: Either use a package name with or without version, or specify a
180: package wildcard that gets matched against all installed packages.
1.6 hubertf 181: .Pp
1.7 wiz 182: Package wildcards use
1.6 hubertf 183: .Xr fnmatch 3 .
184: In addition,
185: .Xr csh 1
186: style {,} alternates have also been implemented.
187: Package version numbers can also be matched in a relational manner
188: using the
1.7 wiz 189: .Pa \*[Ge] , \*[Le] , \*[Gt] ,
1.6 hubertf 190: and
191: .Pa \*[Lt]
192: operators.
193: For example,
194: .Pa pkg_info -e 'name\*[Ge]1.3'
195: will match versions 1.3 and later of the
196: .Pa name
197: package.
198: The collating sequence of the various package version numbers is
199: unusual, but strives to be consistent.
200: The magic string ``alpha'' equates to
201: .Pa alpha version
202: and sorts before a beta version.
203: The magic string ``beta'' equates to
204: .Pa beta version
205: and sorts before a release candidate.
206: The magic string ``rc'' equates to
207: .Pa release candidate
208: and sorts before a release.
209: For example,
210: .Pa name-1.3rc3
211: will sort before
212: .Pa name-1.3
213: and after
214: .Pa name-1.2.9
215: Similarly
216: .Pa name-1.3alpha2
217: will sort before
218: .Pa name-1.3beta1
219: and they both sort before
220: .Pa name-1.3rc1
221: In addition, alphabetic characters sort in the same place as
222: their numeric counterparts, so that
223: .Pa name-1.2e
224: has the same sorting value as
225: .Pa name-1.2.5
226: The magic string ``pl'' equates to a
227: .Pa patch level
228: and has the same value as a dot in the dewey-decimal ordering schemes.
1.1 schmonz 229: .Sh ENVIRONMENT
230: .Bl -tag -width PKG_DBDIR
231: .It Ev PKG_DBDIR
1.2 jlam 232: If the
233: .Fl K
234: flag isn't given, then
1.1 schmonz 235: .Ev PKG_DBDIR
1.2 jlam 236: is the location of the package database directory.
237: The default package database directory is
238: .Pa /var/db/pkg .
1.1 schmonz 239: .It Ev PKG_PATH
240: This can be used to specify a semicolon-separated list of paths and URLs to search for
241: package files.
242: If
243: .Ev PKG_PATH
244: is used, the suffix
245: .Pa .tgz
246: is automatically appended to the
247: .Ar pkg-name ,
248: whereas searching in the current directory uses
249: .Ar pkg-name
250: literally.
251: .It Ev PKG_TMPDIR , Ev TMPDIR
252: These are tried in turn (if set) as candidate directories in which
253: to create a ``staging area'' for any files extracted by
254: .Nm
255: from package files.
256: If neither
257: .Ev PKG_TMPDIR
258: nor
259: .Ev TMPDIR
260: yields a suitable scratch directory,
261: .Pa /var/tmp ,
262: .Pa /tmp ,
263: and
264: .Pa /usr/tmp
265: are tried in turn.
266: Note that
267: .Pa /usr/tmp
268: may be created, if it doesn't already exist.
269: .Pp
270: Since
271: .Nm
272: requires very little information to be extracted from any package
273: files examined, it is unlikely that these environment variables would
274: ever need to be used to work around limited available space in the
275: default locations.
276: .El
277: .Sh SEE ALSO
278: .Xr pkg_add 1 ,
279: .Xr pkg_admin 1 ,
280: .Xr pkg_create 1 ,
281: .Xr pkg_delete 1 ,
282: .Xr mktemp 3 ,
283: .Xr packages 7 ,
284: .Xr mtree 8
285: .Sh AUTHORS
286: .Bl -tag -width indent -compact
287: .It "Jordan Hubbard"
288: most of the work
289: .It "John Kohl"
290: refined it for
291: .Nx
292: .It "Hubert Feyrer"
293: .Nx
294: wildcard dependency processing, pkgdb, depends displaying,
295: pkg size display etc.
296: .El
CVSweb <webmaster@jp.NetBSD.org>