1 .\" $NetBSD: pkg_info.1,v 1.2 2015/04/28 09:48:30 prlw1 Exp $
3 .\" FreeBSD install - a package for the installation and maintenance
4 .\" of non-core utilities.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
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.
25 .Nd a utility for displaying information on software packages
28 .Op Fl BbcDdFfhIikLmNnpqRrSsVvX
43 command is used to dump out information for packages, which may be either
44 packed up in files or already installed on the system with the
50 may be the name of an installed package (with or without version), a
51 pattern matching several installed packages (see the
53 section for a description of possible patterns),
55 binary package, a filename belonging to an installed
58 or a URL to an FTP-available package.
60 The following command line options are available:
61 .Bl -tag -width indent
63 Show information for all currently installed packages.
70 is given, the former is assumed.
72 Show some of the important definitions used when building
73 the binary package (the
74 .Dq Build information )
76 Additionally, any installation information variables
77 (lowercase) can be queried, too.
80 tells if a package was installed automatically
81 as a dependency of another package.
85 RCS Id strings from the files used in the construction
86 of the binary package (the
89 These files are the package Makefile, any patch files, any checksum
90 files, and the packing list file.
92 Show the one-line comment field for each package.
94 Show the install-message file (if any) for each package.
96 Show the long-description field for each package.
99 allows you to test for the existence of a given package.
100 If a package identified by
102 is currently installed, return code is 0, otherwise 1.
103 The name of the best matching package found installed is printed to
104 stdout unless turned off using the
108 can contain wildcards (see the
109 .Sx PACKAGE WILDCARDS
113 allows you to test for the existence of a given package.
114 If a package identified by
116 is currently installed, return code is 0, otherwise 1.
117 The names of any package(s) found installed are printed to
118 stdout unless turned off using the
122 can contain wildcards (see the
123 .Sx PACKAGE WILDCARDS
128 given as filename, and query information on the package that
130 This can be used to query information on a per-file basis.
132 .Sx TECHNICAL DETAILS
133 section below for more information.
135 Show the packing list instructions for each package.
137 Print usage message and exit.
139 Show the index entry for each package.
140 This option is assumed when no arguments or relevant flags are specified.
142 Show the install script (if any) for each package.
143 .It Fl K Ar pkg_dbdir
144 Override the value of the
146 configuration option with the value
149 Show the de-install script (if any) for each package.
151 Show the files within each package.
152 This is different from just viewing the packing list, since full pathnames
153 for everything are generated.
154 Files that were created dynamically during installation of the package
157 Prefix each information category header (see
161 This is primarily of use to front-end programs that want to request a
162 lot of different information fields at once for a package, but don't
163 necessary want the output intermingled in such a way that they can't
165 This lets you add a special token to the start of each field.
167 Show the mtree file (if any) for each package.
169 Show which packages each package was built with (exact dependencies), if any.
171 Show which packages each package needs (depends upon), if any.
173 Show the installation prefix for each package.
175 Show the definition of
177 from the build information for each package.
178 An empty string is returned if no such variable definition is found for
183 in emitting report headers and such, just dump the
184 raw info (basically, assume a non-human reading).
186 For each package, show the packages that require it.
188 For each package, show the packages that require it.
189 Continue recursively to show all dependents.
191 Show the size of this package and all the packages it requires,
194 Show the size of this package in bytes.
195 The size is calculated by adding up the size of each file of the package.
197 Show information for all user-installed packages:
198 automatically installed packages (as dependencies
199 of other packages) are not displayed.
203 Print version number and exit.
205 Turn on verbose output.
207 Print summary information for each package.
208 The summary format is
211 Its primary use is to contain all information about the contents of a
212 (remote) binary package repository needed by package managing software.
214 .Sh TECHNICAL DETAILS
215 Package info is either extracted from package files named on the
216 command line, or from already installed package information
218 .Pa \*[Lt]PKG_DBDIR\*[Gt]/\*[Lt]pkg-name\*[Gt] .
223 a filename can be given instead of a package name to query
224 information on the (installed) package that file belongs to.
225 The filename is resolved to a package name using the package database.
226 The filename must be absolute, as in the output of
229 .Dl pkg_info -eF /path/to/file
230 can be used to display the package the given file belongs to, and
231 .Dl pkg_info -LF /path/to/file
232 can be used to display all files belonging to the package the given
234 .Sh PACKAGE WILDCARDS
235 In the places where a package name/version is expected, e.g., for the
237 option, several forms can be used.
238 Either use a package name with or without version, or specify a
239 package wildcard that gets matched against all installed packages.
241 Package wildcards use
245 style {,} alternates have been implemented.
246 Package version numbers can also be matched in a relational manner
255 .Dl pkg_info -e 'name\*[Ge]1.3'
256 will match versions 1.3 and later of the
259 (Make sure to use shell quoting.)
260 Additionally, ranges can be defined, by giving both a lower bound
266 as well as an upper bound
272 The lower bound has to come first.
274 .Dl pkg_info -e 'name\*[Ge]1.3\*[Lt]2.0'
275 will match versions 1.3 (inclusive) to 2.0 (exclusive) of package
278 The collating sequence of the various package version numbers is
279 unusual, but strives to be consistent.
284 and sorts before a beta version.
289 and sorts before a release candidate.
293 .Dq release candidate ,
294 and sorts before a release.
305 and they both sort before
317 and has the same value as a dot
319 in the dewey-decimal ordering schemes,
320 as does the underscore
322 Additionally, alphabetic characters sort in the same place as
323 their numeric counterparts, so that
325 has the same sorting value as
329 .Xr pkg_install.conf 5
330 for options, that can also be specified using the environment.
336 .Xr pkg_install.conf 5
339 .Bl -tag -width indent -compact
347 wildcard dependency processing, pkgdb, depends displaying,
348 pkg size display, and more.