1999-11-26 20:31:58 +00:00
|
|
|
.\"
|
|
|
|
.\" Copyright 1998 Bruce A. Mah
|
|
|
|
.\"
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
2004-06-29 18:54:47 +00:00
|
|
|
.Dd June 29, 2004
|
1999-11-26 20:31:58 +00:00
|
|
|
.Dt PKG_VERSION 1
|
2001-07-10 15:12:08 +00:00
|
|
|
.Os
|
1999-11-26 20:31:58 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm pkg_version
|
|
|
|
.Nd summarize installed versions of packages
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2002-06-24 16:03:24 +00:00
|
|
|
.Op Fl hv
|
1999-12-03 06:08:11 +00:00
|
|
|
.Op Fl l Ar limchar
|
2000-10-20 06:16:18 +00:00
|
|
|
.Op Fl L Ar limchar
|
2004-06-29 18:54:47 +00:00
|
|
|
.Oo
|
|
|
|
.Op Fl X
|
|
|
|
.Fl s Ar string
|
|
|
|
.Oc
|
1999-11-26 20:31:58 +00:00
|
|
|
.Op Ar index
|
2001-04-04 11:19:09 +00:00
|
|
|
.Nm
|
2001-04-03 21:26:32 +00:00
|
|
|
.Op Fl t Ar version1 version2
|
2004-06-29 18:54:47 +00:00
|
|
|
.Nm
|
|
|
|
.Op Fl T Ar pkgname pattern
|
1999-11-26 20:31:58 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command is used to produce a report of non-base software packages
|
2001-07-15 08:06:20 +00:00
|
|
|
installed using the
|
1999-11-26 20:31:58 +00:00
|
|
|
.Xr pkg_add 1
|
2001-07-15 08:06:20 +00:00
|
|
|
command.
|
2000-10-25 17:10:20 +00:00
|
|
|
.Pp
|
|
|
|
Each package's version number is checked against one of two sources to
|
|
|
|
see if that package may require updating. If the package contains
|
|
|
|
information about its origin in the
|
|
|
|
.Fx
|
|
|
|
ports tree, and a version number can be determined from the port's
|
|
|
|
.Pa Makefile ,
|
2001-07-15 08:06:20 +00:00
|
|
|
then the version number from the
|
2000-10-25 17:10:20 +00:00
|
|
|
.Pa Makefile
|
|
|
|
will be used to determine whether the installed package is up-to-date
|
|
|
|
or requires updating.
|
|
|
|
.Pp
|
2001-07-15 08:06:20 +00:00
|
|
|
If no origin for a package can be found, or if the port's
|
2000-10-25 17:10:20 +00:00
|
|
|
.Pa Makefile
|
2001-07-15 08:06:20 +00:00
|
|
|
cannot be located,
|
2000-10-25 17:10:20 +00:00
|
|
|
.Nm
|
|
|
|
will search for the package in the ports collection index file
|
|
|
|
(typically
|
2002-12-04 17:22:48 +00:00
|
|
|
.Pa /usr/ports/INDEX-5 ) .
|
2000-10-25 17:10:20 +00:00
|
|
|
Any matching version number(s) there will be used to determine whether
|
|
|
|
the installed package is up-to-date or requires updating.
|
|
|
|
.Pp
|
2001-07-15 08:06:20 +00:00
|
|
|
Generally, using the version number from a port's
|
2000-10-25 17:10:20 +00:00
|
|
|
.Pa Makefile
|
2001-07-15 08:06:20 +00:00
|
|
|
will provide a more accurate result, since, unlike the index file, it
|
2000-10-25 17:10:20 +00:00
|
|
|
provides an unambiguous current version number, even when multiple
|
|
|
|
versions of a port exist in the ports collection.
|
|
|
|
Moreover, the ports collection index file is only updated at
|
|
|
|
intervals, meaning that it may not completely reflect the version
|
|
|
|
numbers of the software contained in the ports collection.
|
1999-11-26 20:31:58 +00:00
|
|
|
.Pp
|
|
|
|
Each package name is printed, along with a one-character status flag:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Li =
|
2000-10-25 17:10:20 +00:00
|
|
|
The installed version of the package is current.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Li \&<
|
2000-10-25 17:10:20 +00:00
|
|
|
The installed version of the package is older than the current version.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Li \&>
|
2000-10-25 17:10:20 +00:00
|
|
|
The installed version of the package is newer than the current version.
|
|
|
|
This situation can arise with an out-of-date index file, or when
|
|
|
|
testing new ports.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Li \&?
|
2001-07-15 08:06:20 +00:00
|
|
|
The installed package does not appear in the index.
|
|
|
|
This could be due to an out of date index or a package taken from a PR
|
2000-09-15 04:16:20 +00:00
|
|
|
that has not yet been committed.
|
|
|
|
.It Li *
|
|
|
|
There are multiple versions of a particular software package
|
2000-10-25 17:10:20 +00:00
|
|
|
listed in the index file.
|
1999-11-26 20:31:58 +00:00
|
|
|
Examples from the
|
1999-12-03 06:08:11 +00:00
|
|
|
.Fx
|
1999-11-26 20:31:58 +00:00
|
|
|
ports collection are the Tcl toolkit or the
|
|
|
|
.Tn EMACS
|
|
|
|
editor.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Li \&!
|
2000-09-15 04:16:20 +00:00
|
|
|
The installed package exists in the index but for some reason,
|
|
|
|
.Nm
|
|
|
|
was unable to compare the version number of the installed package
|
|
|
|
with the corresponding entry in the index.
|
2000-12-27 15:30:30 +00:00
|
|
|
.El
|
1999-11-26 20:31:58 +00:00
|
|
|
.Sh OPTIONS
|
2002-04-20 12:27:18 +00:00
|
|
|
The
|
2001-07-15 08:06:20 +00:00
|
|
|
.Nm
|
2002-04-20 12:27:18 +00:00
|
|
|
utility supports several command-line arguments:
|
1999-11-26 20:31:58 +00:00
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl h
|
|
|
|
Print help message.
|
1999-12-03 06:08:11 +00:00
|
|
|
.It Fl l
|
2001-07-15 08:06:20 +00:00
|
|
|
Limit the output to those packages whose status flag matches the
|
2000-10-25 17:10:20 +00:00
|
|
|
character(s) in
|
1999-12-03 06:08:11 +00:00
|
|
|
.Ar limchar .
|
2000-10-25 17:10:20 +00:00
|
|
|
More than one character can be specified in
|
2001-07-15 08:06:20 +00:00
|
|
|
.Ar limchar .
|
1999-12-03 06:08:11 +00:00
|
|
|
Note that because some of the status flag characters are also special
|
|
|
|
to the shell, it is best to quote
|
|
|
|
.Ar limchar
|
|
|
|
with single quotes.
|
2000-10-20 06:16:18 +00:00
|
|
|
.It Fl L
|
|
|
|
Limit the output to those packages whose status flag doesn't match
|
|
|
|
.Ar limchar .
|
|
|
|
You may specify more than one character to match in
|
2001-07-15 08:06:20 +00:00
|
|
|
.Ar limchar .
|
2000-10-20 06:16:18 +00:00
|
|
|
Note that because some of the status flag characters are also special
|
|
|
|
to the shell, it is best to quote
|
|
|
|
.Ar limchar
|
|
|
|
with single quotes.
|
2001-06-13 20:38:46 +00:00
|
|
|
.It Fl s
|
|
|
|
Limit the output to those packages whose names match a given
|
|
|
|
.Ar string .
|
2004-06-29 18:54:47 +00:00
|
|
|
.It Fl X
|
|
|
|
Interpret
|
|
|
|
.Ar string
|
|
|
|
as a extended regular expression.
|
2001-04-03 21:26:32 +00:00
|
|
|
.It Fl t
|
|
|
|
Test a pair of version number strings and exit.
|
|
|
|
The output consists of one of the single characters
|
|
|
|
.Li =
|
|
|
|
(equal),
|
|
|
|
.Li \&<
|
|
|
|
(right-hand number greater), or
|
|
|
|
.Li \&>
|
|
|
|
(left-hand number greater) on standard output.
|
|
|
|
This flag is mostly useful for scripts or for testing.
|
2004-06-29 18:54:47 +00:00
|
|
|
.It Fl T
|
|
|
|
Test whether
|
|
|
|
.Ar pkgname
|
|
|
|
is matched by
|
|
|
|
.Ar pattern
|
|
|
|
and set the exit code accordingly.
|
|
|
|
.Fl T
|
|
|
|
can also be used in `filter mode':
|
|
|
|
When one of the arguments is `-', standard input is used, and lines
|
|
|
|
with matching package names/patterns are echoed to standard output.
|
1999-11-26 20:31:58 +00:00
|
|
|
.It Fl v
|
|
|
|
Enable verbose output. Verbose output includes some English-text
|
|
|
|
interpretations of the version number comparisons, as well as the
|
|
|
|
version numbers compared for each package. Non-verbose output is
|
|
|
|
probably easier for programs or scripts to parse.
|
|
|
|
.It Ar index
|
|
|
|
Specify the index to be used as a basis of comparison. This index can
|
2002-12-12 17:26:04 +00:00
|
|
|
be specified as a filename (in the local file system) or a URL. Any
|
1999-11-26 20:31:58 +00:00
|
|
|
URL understandable by
|
|
|
|
.Xr fetch 1
|
|
|
|
can be used here. If no
|
|
|
|
.Ar index
|
|
|
|
file is specified on the command line,
|
2004-06-29 18:54:47 +00:00
|
|
|
.Pa /usr/ports/INDEX-5
|
1999-11-26 20:31:58 +00:00
|
|
|
is used.
|
|
|
|
.El
|
2003-01-27 02:05:59 +00:00
|
|
|
.Sh COMPATIBILITY
|
|
|
|
The
|
|
|
|
.Fl c
|
|
|
|
option has been deprecated and is no longer supported.
|
1999-11-26 20:31:58 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr fetch 1 ,
|
|
|
|
.Xr pkg_add 1 ,
|
|
|
|
.Xr pkg_create 1 ,
|
2000-02-29 15:13:55 +00:00
|
|
|
.Xr pkg_delete 1 ,
|
|
|
|
.Xr pkg_info 1
|
1999-11-26 20:31:58 +00:00
|
|
|
.Sh FILES
|
2004-06-29 18:54:47 +00:00
|
|
|
.Bl -tag -width /usr/ports/INDEX-5 -compact
|
|
|
|
.It Pa /usr/ports/INDEX-5
|
1999-11-26 20:31:58 +00:00
|
|
|
Default index file.
|
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
|
|
|
The following is a typical invocation of the
|
|
|
|
.Nm
|
|
|
|
command, which checks the installed packages against the local ports
|
|
|
|
index file:
|
|
|
|
.Pp
|
|
|
|
.Dl % pkg_version -v
|
|
|
|
.Pp
|
|
|
|
The command below generates a report against
|
|
|
|
the version numbers in the on-line ports collection:
|
|
|
|
.Pp
|
2004-06-29 18:54:47 +00:00
|
|
|
.Dl % pkg_version http://www.FreeBSD.org/ports/INDEX-5
|
1999-11-26 20:31:58 +00:00
|
|
|
.Pp
|
2001-04-03 21:26:32 +00:00
|
|
|
The following command compares two package version strings:
|
|
|
|
.Pp
|
|
|
|
.Dl % pkg_version -t 1.5 1.5.1
|
2000-11-17 11:44:16 +00:00
|
|
|
.Sh AUTHORS
|
2002-06-24 16:03:24 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility was written by
|
|
|
|
.An Jeremy D. Lea Aq reg@FreeBSD.org ,
|
|
|
|
partially based on a Perl script written by
|
|
|
|
.An Bruce A. Mah Aq bmah@FreeBSD.org .
|
1999-11-26 20:31:58 +00:00
|
|
|
.Sh CONTRIBUTORS
|
1999-12-03 06:08:11 +00:00
|
|
|
.An Nik Clayton Aq nik@FreeBSD.org ,
|
2000-09-15 04:16:20 +00:00
|
|
|
.An Dominic Mitchell Aq dom@palmerharvey.co.uk ,
|
2000-10-20 06:16:18 +00:00
|
|
|
.An Mark Ovens Aq marko@FreeBSD.org ,
|
2001-04-03 21:26:32 +00:00
|
|
|
.An Doug Barton Aq DougB@gorean.org ,
|
2004-06-29 18:54:47 +00:00
|
|
|
.An Akinori MUSHA Aq knu@FreeBSD.org ,
|
|
|
|
.An Oliver Eikemeier Aq eik@FreeBSD.org
|