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