1 .\" $NetBSD: pkg_info.1,v 1.24 2009/03/02 17:13:49 joerg 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 our 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 is also given), or a URL to an ftp-available package.
60 The following command-line options are supported:
61 .Bl -tag -width indent
63 Show information for all currently installed packages.
67 Show some of the important definitions used when building
68 the binary package (the
69 .Dq Build information )
71 Additionally, any installation information variables
72 (lowercase) can be queried, too.
75 tells if a package was installed automatically
76 as a dependency of another package.
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.
85 Show the one-line comment field for each package.
87 Show the install-message file (if any) for each package.
89 Show the long-description field for each package.
92 allows you to test for the existence of a given package.
93 If a package identified by
95 is currently installed, return code is 0, otherwise 1.
96 The name of the best matching package found installed is printed to
97 stdout unless turned off using the
101 can contain wildcards (see the
102 .Sx PACKAGE WILDCARDS
106 allows you to test for the existence of a given package.
107 If a package identified by
109 is currently installed, return code is 0, otherwise 1.
110 The names of any package(s) found installed are printed to
111 stdout unless turned off using the
115 can contain wildcards (see the
116 .Sx PACKAGE WILDCARDS
119 Interpret any pkg-name given as filename, and translate it to a
120 package name using the Package Database.
121 This can be used to query information on a per-file basis, e.g. in
124 flag to find out which package a file belongs to.
126 Show the packing list instructions for each package.
128 Show the index entry for each package.
130 Show the install script (if any) for each package.
131 .It Fl K Ar pkg_dbdir
134 as the package database directory.
135 If this option isn't specified, then the package database directory is
136 taken from the value of the environment variable
138 if it's set, otherwise it defaults to
141 Show the de-install script (if any) for each package.
143 Show the files within each package.
144 This is different from just viewing the packing list, since full pathnames
145 for everything are generated.
146 Files that were created dynamically during installation of the package
149 Prefix each information category header (see
153 This is primarily of use to front-end programs that want to request a
154 lot of different information fields at once for a package, but don't
155 necessary want the output intermingled in such a way that they can't
157 This lets you add a special token to the start of each field.
159 Show the mtree file (if any) for each package.
161 Show which packages each package was built with (exact dependencies), if any.
163 Show which packages each package needs (depends upon), if any.
165 Show the installation prefix for each package.
167 Show the definition of
169 from the build information for each package.
170 An empty string is returned if no such variable definition is found for
175 in emitting report headers and such, just dump the
176 raw info (basically, assume a non-human reading).
178 For each package, show the packages that require it.
180 For each package, show the packages that require it.
181 Continue recursively to show all dependents.
183 Show the size of this package and all the packages it requires,
186 Show the size of this package in bytes.
187 The size is calculated by adding up the size of each file of the package.
189 Show information for all user-installed packages.
190 Automatically installed packages (as dependencies
191 of other packages) are not displayed.
195 Print version number and exit.
197 Turn on verbose output.
199 Print summary information for each package.
200 The summary format is
203 Its primary use is to contain all information about the contents of a
204 (remote) binary package repository needed by package managing software.
206 .Sh TECHNICAL DETAILS
207 Package info is either extracted from package files named on the
208 command line, or from already installed package information
210 .Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt] .
212 A filename can be given instead of a (installed) package name to query
213 information on the package this file belongs to.
214 This filename is then resolved to a package name using the Package Database.
215 For this translation to take place, the
218 The filename must be absolute, compare the output of pkg_info
220 .Sh PACKAGE WILDCARDS
221 In the places where a package name/version is expected, e.g. for the
223 switch, several forms can be used.
224 Either use a package name with or without version, or specify a
225 package wildcard that gets matched against all installed packages.
227 Package wildcards use
231 style {,} alternates have been implemented.
232 Package version numbers can also be matched in a relational manner
234 .Pa \*[Ge] , \*[Le] , \*[Gt] ,
239 .Pa pkg_info -e 'name\*[Ge]1.3'
240 will match versions 1.3 and later of the
243 Additionally, ranges can be defined by giving a lower bound with
244 \*[Gt] or \*[Ge] and an upper bound with \*[Lt] or \*[Le].
245 The lower bound has to come first.
247 .Pa pkg_info -e 'name\*[Ge]1.3\*[Lt]2.0'
248 will match versions 1.3 (inclusive) to 2.0 (exclusive)
252 The collating sequence of the various package version numbers is
253 unusual, but strives to be consistent.
258 and sorts before a beta version.
263 and sorts before a release candidate.
267 .Pa release candidate
268 and sorts before a release.
285 and they both sort before
287 In addition, alphabetic characters sort in the same place as
288 their numeric counterparts, so that
290 has the same sorting value as
296 and has the same value as a dot in the dewey-decimal ordering schemes.
298 .Bl -tag -width PKG_DBDIR
302 flag isn't given, then
304 is the location of the package database directory.
305 The default package database directory is
317 .Bl -tag -width indent -compact
325 wildcard dependency processing, pkgdb, depends displaying,
326 pkg size display etc.