2 .\" Copyright 1998 Bruce A. Mah
4 .\" All rights reserved.
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.
15 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 .\" $FreeBSD: src/usr.sbin/pkg_install/version/pkg_version.1,v 1.5.2.14 2002/06/21 16:42:26 charnier Exp $
27 .\" $DragonFly: src/usr.sbin/pkg_install/version/Attic/pkg_version.1,v 1.2 2003/06/17 04:29:59 dillon Exp $
33 .Nd summarize installed versions of packages
42 .Op Fl t Ar version1 version2
46 command is used to produce a report of non-base software packages
51 Each package's version number is checked against one of two sources to
52 see if that package may require updating. If the package contains
53 information about its origin in the
55 ports tree, and a version number can be determined from the port's
57 then the version number from the
59 will be used to determine whether the installed package is up-to-date
62 If no origin for a package can be found, or if the port's
66 will search for the package in the ports collection index file
68 .Pa /usr/ports/INDEX ) .
69 Any matching version number(s) there will be used to determine whether
70 the installed package is up-to-date or requires updating.
72 Generally, using the version number from a port's
74 will provide a more accurate result, since, unlike the index file, it
75 provides an unambiguous current version number, even when multiple
76 versions of a port exist in the ports collection.
77 Moreover, the ports collection index file is only updated at
78 intervals, meaning that it may not completely reflect the version
79 numbers of the software contained in the ports collection.
81 Each package name is printed, along with a one-character status flag:
82 .Bl -tag -width indent
84 The installed version of the package is current.
86 The installed version of the package is older than the current version.
88 The installed version of the package is newer than the current version.
89 This situation can arise with an out-of-date index file, or when
92 The installed package does not appear in the index.
93 This could be due to an out of date index or a package taken from a PR
94 that has not yet been committed.
96 There are multiple versions of a particular software package
97 listed in the index file.
100 ports collection are the Tcl toolkit or the
104 The installed package exists in the index but for some reason,
106 was unable to compare the version number of the installed package
107 with the corresponding entry in the index.
112 utility supports several command-line arguments:
113 .Bl -tag -width indent
115 Enable commands output. Commands output includes the commands you should
116 type to update your installed packages to the latest versions in the ports
122 constitute an automated packages updating system.
123 The output of this command
127 be edited, in order to avoid destroying dependencies between installed
130 Enable debugging output.
134 Limit the output to those packages whose status flag matches the
137 More than one character can be specified in
139 Note that because some of the status flag characters are also special
140 to the shell, it is best to quote
144 Limit the output to those packages whose status flag doesn't match
146 You may specify more than one character to match in
148 Note that because some of the status flag characters are also special
149 to the shell, it is best to quote
153 Limit the output to those packages whose names match a given
156 Test a pair of version number strings and exit.
157 The output consists of one of the single characters
161 (right-hand number greater), or
163 (left-hand number greater) on standard output.
164 This flag is mostly useful for scripts or for testing.
166 Enable verbose output. Verbose output includes some English-text
167 interpretations of the version number comparisons, as well as the
168 version numbers compared for each package. Non-verbose output is
169 probably easier for programs or scripts to parse.
171 Specify the index to be used as a basis of comparison. This index can
172 be specified as a filename (in the local filesystem) or a URL. Any
173 URL understandable by
175 can be used here. If no
177 file is specified on the command line,
188 .Bl -tag -width /usr/ports/INDEX -compact
189 .It Pa /usr/ports/INDEX
193 The following is a typical invocation of the
195 command, which checks the installed packages against the local ports
200 The command below generates a report against
201 the version numbers in the on-line ports collection:
203 .Dl % pkg_version ftp://ftp.FreeBSD.org/pub/FreeBSD/branches/-current/ports/INDEX
205 The command below generates a file of commands to run to update the installed
211 be run without suitable editing.
212 They should be treated as suggestions, and may need to be reordered
213 to account for dependencies between installed packages, or may need to
214 be disregarded if multiple versions of an installed package can coexist.
215 Blindly running the output of this command may leave a system in an
218 .Dl % pkg_version -c > do_update
220 The following command compares two package version strings:
222 .Dl % pkg_version -t 1.5 1.5.1
224 .An Bruce A. Mah Aq bmah@FreeBSD.org
226 .An Nik Clayton Aq nik@FreeBSD.org ,
227 .An Dominic Mitchell Aq dom@palmerharvey.co.uk ,
228 .An Mark Ovens Aq marko@FreeBSD.org ,
229 .An Doug Barton Aq DougB@gorean.org ,
230 .An Akinori MUSHA Aq knu@FreeBSD.org
232 The commands output feature is
236 an automated ports/packages updating system.
237 It does not even attempt to handle dependencies between installed
238 packages correctly, and can produce incorrect results if multiple
239 versions of a package can coexist on a system.
241 Commands output assumes you install new software using the ports system,