2004-05-09 01:05:02 +04:00
|
|
|
.\" $NetBSD: pkg_info.1,v 1.40 2004/05/08 21:05:02 jlam Exp $
|
1997-06-05 12:54:23 +04:00
|
|
|
.\"
|
2002-09-26 05:41:51 +04:00
|
|
|
.\" FreeBSD install - a package for the installation and maintenance
|
1997-06-05 12:54:23 +04:00
|
|
|
.\" of non-core utilities.
|
|
|
|
.\"
|
|
|
|
.\" 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.
|
|
|
|
.\"
|
|
|
|
.\" Jordan K. Hubbard
|
|
|
|
.\"
|
|
|
|
.\"
|
|
|
|
.\" @(#)pkg_info.1
|
|
|
|
.\"
|
2004-05-09 01:05:02 +04:00
|
|
|
.Dd May 7, 2004
|
1998-08-23 14:16:19 +04:00
|
|
|
.Dt PKG_INFO 1
|
1999-03-22 21:43:46 +03:00
|
|
|
.Os
|
1997-06-05 12:54:23 +04:00
|
|
|
.Sh NAME
|
|
|
|
.Nm pkg_info
|
1997-10-16 04:31:32 +04:00
|
|
|
.Nd a utility for displaying information on software packages
|
1997-06-05 12:54:23 +04:00
|
|
|
.Sh SYNOPSIS
|
2001-04-09 16:48:37 +04:00
|
|
|
.Nm
|
2003-09-02 11:34:47 +04:00
|
|
|
.Op Fl BbcDdFfhIikLmNnpqRrSsVv
|
1999-03-07 14:58:22 +03:00
|
|
|
.Bk -words
|
1997-06-05 12:54:23 +04:00
|
|
|
.Op Fl e Ar package
|
1999-03-07 14:58:22 +03:00
|
|
|
.Ek
|
|
|
|
.Bk -words
|
2003-09-02 11:34:47 +04:00
|
|
|
.Op Fl K Ar pkg_dbdir
|
|
|
|
.Ek
|
|
|
|
.Bk -words
|
1997-06-05 12:54:23 +04:00
|
|
|
.Op Fl l Ar prefix
|
1999-03-07 14:58:22 +03:00
|
|
|
.Ek
|
|
|
|
.Ar pkg-name ...
|
2001-04-09 16:48:37 +04:00
|
|
|
.Nm
|
1999-03-07 14:58:22 +03:00
|
|
|
.Bk -words
|
1998-08-23 14:16:19 +04:00
|
|
|
.Op Fl a Ar flags
|
1999-03-07 14:58:22 +03:00
|
|
|
.Ek
|
2004-05-07 20:40:30 +04:00
|
|
|
.Nm
|
|
|
|
.Bk -words
|
|
|
|
.Op Fl Q Ar variable
|
|
|
|
.Ek
|
|
|
|
.Ar pkg-name ...
|
1997-06-05 12:54:23 +04:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
1998-08-23 14:16:19 +04:00
|
|
|
command is used to dump out information for packages, which may be either
|
|
|
|
packed up in files or already installed on the system with the
|
1997-06-05 12:54:23 +04:00
|
|
|
.Xr pkg_create 1
|
|
|
|
command.
|
1998-08-23 14:16:19 +04:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Ar pkg-name
|
1999-08-19 23:37:20 +04:00
|
|
|
may be the name of an installed package (with our without version), a
|
|
|
|
pattern matching several installed packages (see the
|
2004-01-06 19:15:06 +03:00
|
|
|
.Sx PACKAGE WILDCARDS
|
|
|
|
section for a description of possible patterns),
|
1999-08-19 23:37:20 +04:00
|
|
|
the pathname to a
|
2004-01-06 19:15:06 +03:00
|
|
|
binary package, a filename belonging to an installed
|
1999-03-22 08:02:39 +03:00
|
|
|
package (if
|
|
|
|
.Fl F
|
1999-03-04 03:35:05 +03:00
|
|
|
is also given), or a URL to an ftp-available package.
|
1998-08-23 14:16:19 +04:00
|
|
|
.Pp
|
|
|
|
The following command-line options are supported:
|
1997-06-05 12:54:23 +04:00
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl a
|
1998-08-23 14:16:19 +04:00
|
|
|
Show information for all currently installed packages.
|
1998-10-21 13:54:09 +04:00
|
|
|
.It Fl B
|
|
|
|
Show some of the important definitions used when building
|
|
|
|
the binary package (the "Build information") for each package.
|
1998-10-13 21:08:28 +04:00
|
|
|
.It Fl b
|
2002-01-19 05:01:35 +03:00
|
|
|
Show the
|
|
|
|
.Nx
|
|
|
|
RCS Id strings from the files used in the construction
|
2002-09-26 05:41:51 +04:00
|
|
|
of the binary package (the "Build version") for each package.
|
|
|
|
These files are the package Makefile, any patch files, any checksum
|
|
|
|
files, and the packing list file.
|
1997-06-05 12:54:23 +04:00
|
|
|
.It Fl c
|
1998-08-23 14:16:19 +04:00
|
|
|
Show the one-line comment field for each package.
|
1997-06-05 12:54:23 +04:00
|
|
|
.It Fl D
|
1998-08-23 14:16:19 +04:00
|
|
|
Show the install-message file (if any) for each package.
|
|
|
|
.It Fl d
|
|
|
|
Show the long-description field for each package.
|
1997-06-05 12:54:23 +04:00
|
|
|
.It Fl e Ar pkg-name
|
1998-09-13 01:59:18 +04:00
|
|
|
This option
|
2004-01-06 19:22:06 +03:00
|
|
|
allows you to test for the existence of a given package.
|
1997-06-05 12:54:23 +04:00
|
|
|
If the package identified by
|
|
|
|
.Ar pkg-name
|
2004-01-06 19:15:06 +03:00
|
|
|
is currently installed, return code is 0, otherwise 1.
|
|
|
|
The names of any package(s) found installed are printed to
|
1998-09-13 01:59:18 +04:00
|
|
|
stdout unless turned off using the
|
|
|
|
.Fl q
|
|
|
|
option.
|
|
|
|
.Ar pkg-name
|
2004-01-06 19:15:06 +03:00
|
|
|
can contain wildcards, see the
|
|
|
|
.Sx PACKAGE WILDCARDS
|
|
|
|
section below.
|
1999-01-19 20:01:56 +03:00
|
|
|
.It Fl F
|
|
|
|
Interpret any pkg-name given as filename, and translate it to a
|
2002-09-26 05:41:51 +04:00
|
|
|
package name using the Package Database.
|
|
|
|
This can be used to query information on a per-file basis, e.g. in
|
|
|
|
conjunction with the
|
1999-01-19 20:01:56 +03:00
|
|
|
.Fl e
|
2001-04-09 16:48:37 +04:00
|
|
|
flag to find out which package a file belongs to.
|
1998-08-23 14:16:19 +04:00
|
|
|
.It Fl f
|
|
|
|
Show the packing list instructions for each package.
|
|
|
|
.It Fl I
|
|
|
|
Show the index entry for each package.
|
|
|
|
.It Fl i
|
|
|
|
Show the install script (if any) for each package.
|
2003-09-02 11:34:47 +04:00
|
|
|
.It Fl K Ar pkg_dbdir
|
|
|
|
Set
|
|
|
|
.Ar pkg_dbdir
|
|
|
|
as the package database directory.
|
|
|
|
If this option isn't specified, then the package database directory is
|
|
|
|
taken from the value of the environment variable
|
|
|
|
.Ev PKG_DBDIR
|
|
|
|
if it's set, otherwise it defaults to
|
|
|
|
.Pa /var/db/pkg .
|
1998-08-23 14:16:19 +04:00
|
|
|
.It Fl k
|
|
|
|
Show the de-install script (if any) for each package.
|
|
|
|
.It Fl L
|
2002-09-26 05:41:51 +04:00
|
|
|
Show the files within each package.
|
|
|
|
This is different from just viewing the packing list, since full pathnames
|
|
|
|
for everything are generated.
|
1997-06-05 12:54:23 +04:00
|
|
|
.It Fl l Ar str
|
1997-06-09 19:24:32 +04:00
|
|
|
Prefix each information category header (see
|
1997-06-05 12:54:23 +04:00
|
|
|
.Fl q )
|
|
|
|
shown with
|
|
|
|
.Ar str .
|
1998-08-23 14:16:19 +04:00
|
|
|
This is primarily of use to front-end programs that want to request a
|
1997-06-05 12:54:23 +04:00
|
|
|
lot of different information fields at once for a package, but don't
|
|
|
|
necessary want the output intermingled in such a way that they can't
|
2002-09-26 05:41:51 +04:00
|
|
|
organize it.
|
|
|
|
This lets you add a special token to the start of each field.
|
1998-08-23 14:16:19 +04:00
|
|
|
.It Fl m
|
|
|
|
Show the mtree file (if any) for each package.
|
2003-09-02 11:34:47 +04:00
|
|
|
.It Fl N
|
|
|
|
Show which packages each package was built with (exact dependencies), if any.
|
2001-08-14 00:08:58 +04:00
|
|
|
.It Fl n
|
|
|
|
Show which packages each package needs (depends upon), if any.
|
1998-08-23 14:16:19 +04:00
|
|
|
.It Fl p
|
|
|
|
Show the installation prefix for each package.
|
2004-05-07 20:40:30 +04:00
|
|
|
.It Fl Q
|
|
|
|
Show the definition of
|
|
|
|
.Ar variable
|
|
|
|
from the build information for each package.
|
|
|
|
An empty string is returned if no such variable definition is found for
|
|
|
|
the package(s).
|
1998-08-23 14:16:19 +04:00
|
|
|
.It Fl q
|
|
|
|
Be ``quiet'' in emitting report headers and such, just dump the
|
|
|
|
raw info (basically, assume a non-human reading).
|
|
|
|
.It Fl R
|
2000-01-20 02:28:28 +03:00
|
|
|
Show which packages are required by each package.
|
1998-08-23 14:16:19 +04:00
|
|
|
.It Fl r
|
|
|
|
Show the requirements script (if any) for each package.
|
1999-11-29 22:48:44 +03:00
|
|
|
.It Fl S
|
2001-04-09 16:48:37 +04:00
|
|
|
Show the size of this package and all the packages it requires,
|
1999-11-29 22:48:44 +03:00
|
|
|
in bytes.
|
|
|
|
.It Fl s
|
2002-09-26 05:41:51 +04:00
|
|
|
Show the size of this package in bytes.
|
|
|
|
The size is calculated by adding up the size of each file of the package.
|
2001-03-05 19:53:12 +03:00
|
|
|
.It Fl V
|
|
|
|
Print version number and exit.
|
1998-08-23 14:16:19 +04:00
|
|
|
.It Fl v
|
|
|
|
Turn on verbose output.
|
|
|
|
.El
|
2004-01-06 19:15:06 +03:00
|
|
|
.Sh TECHNICAL DETAILS
|
|
|
|
Package info is either extracted from package files named on the
|
|
|
|
command line, or from already installed package information
|
|
|
|
in
|
|
|
|
.Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt] .
|
|
|
|
.Pp
|
|
|
|
A filename can be given instead of a (installed) package name to query
|
|
|
|
information on the package this file belongs to.
|
|
|
|
This filename is then resolved to a package name using the Package Database.
|
|
|
|
For this translation to take place, the
|
|
|
|
.Fl F
|
|
|
|
flag must be given.
|
|
|
|
The filename must be absolute, compare the output of pkg_info
|
|
|
|
.Fl aF .
|
|
|
|
.Sh PACKAGE WILDCARDS
|
|
|
|
In the places where a package name/version is expected, e.g. for the
|
|
|
|
.Fl e
|
2004-01-06 19:22:06 +03:00
|
|
|
switch, several forms can be used.
|
|
|
|
Either use a package name with or without version, or specify a
|
|
|
|
package wildcard that gets matched against all installed packages.
|
2004-01-06 19:15:06 +03:00
|
|
|
.Pp
|
2004-01-06 19:22:06 +03:00
|
|
|
Package wildcards use
|
2004-01-06 19:15:06 +03:00
|
|
|
.Xr fnmatch 3 .
|
|
|
|
In addition,
|
|
|
|
.Xr csh 1
|
|
|
|
style {,} alternates have also been implemented.
|
|
|
|
Package version numbers can also be matched in a relational manner
|
|
|
|
using the
|
2004-01-06 19:22:06 +03:00
|
|
|
.Pa \*[Ge] , \*[Le] , \*[Gt] ,
|
2004-01-06 19:15:06 +03:00
|
|
|
and
|
|
|
|
.Pa \*[Lt]
|
|
|
|
operators.
|
|
|
|
For example,
|
|
|
|
.Pa pkg_info -e 'name\*[Ge]1.3'
|
|
|
|
will match versions 1.3 and later of the
|
|
|
|
.Pa name
|
|
|
|
package.
|
|
|
|
The collating sequence of the various package version numbers is
|
|
|
|
unusual, but strives to be consistent.
|
|
|
|
The magic string ``alpha'' equates to
|
|
|
|
.Pa alpha version
|
|
|
|
and sorts before a beta version.
|
|
|
|
The magic string ``beta'' equates to
|
|
|
|
.Pa beta version
|
|
|
|
and sorts before a release candidate.
|
|
|
|
The magic string ``rc'' equates to
|
|
|
|
.Pa release candidate
|
|
|
|
and sorts before a release.
|
|
|
|
For example,
|
|
|
|
.Pa name-1.3rc3
|
|
|
|
will sort before
|
|
|
|
.Pa name-1.3
|
|
|
|
and after
|
|
|
|
.Pa name-1.2.9
|
|
|
|
Similarly
|
|
|
|
.Pa name-1.3alpha2
|
|
|
|
will sort before
|
|
|
|
.Pa name-1.3beta1
|
|
|
|
and they both sort before
|
2004-04-19 22:43:26 +04:00
|
|
|
.Pa name-1.3rc1 .
|
2004-01-06 19:15:06 +03:00
|
|
|
In addition, alphabetic characters sort in the same place as
|
|
|
|
their numeric counterparts, so that
|
|
|
|
.Pa name-1.2e
|
|
|
|
has the same sorting value as
|
|
|
|
.Pa name-1.2.5
|
|
|
|
The magic string ``pl'' equates to a
|
|
|
|
.Pa patch level
|
|
|
|
and has the same value as a dot in the dewey-decimal ordering schemes.
|
1998-08-23 14:16:19 +04:00
|
|
|
.Sh ENVIRONMENT
|
|
|
|
.Bl -tag -width PKG_DBDIR
|
|
|
|
.It Ev PKG_DBDIR
|
2003-09-02 11:34:47 +04:00
|
|
|
If the
|
|
|
|
.Fl K
|
|
|
|
flag isn't given, then
|
1998-08-23 14:16:19 +04:00
|
|
|
.Ev PKG_DBDIR
|
2003-09-02 11:34:47 +04:00
|
|
|
is the location of the package database directory.
|
|
|
|
The default package database directory is
|
|
|
|
.Pa /var/db/pkg .
|
1998-08-23 14:16:19 +04:00
|
|
|
.It Ev PKG_PATH
|
2000-01-20 02:28:28 +03:00
|
|
|
This can be used to specify a semicolon-separated list of paths and URLs to search for
|
2002-09-26 05:41:51 +04:00
|
|
|
package files.
|
|
|
|
If
|
1998-08-23 14:16:19 +04:00
|
|
|
.Ev PKG_PATH
|
|
|
|
is used, the suffix
|
|
|
|
.Pa .tgz
|
|
|
|
is automatically appended to the
|
|
|
|
.Ar pkg-name ,
|
|
|
|
whereas searching in the current directory uses
|
|
|
|
.Ar pkg-name
|
|
|
|
literally.
|
|
|
|
.It Ev PKG_TMPDIR , Ev TMPDIR
|
|
|
|
These are tried in turn (if set) as candidate directories in which
|
|
|
|
to create a ``staging area'' for any files extracted by
|
|
|
|
.Nm
|
2002-09-26 05:41:51 +04:00
|
|
|
from package files.
|
|
|
|
If neither
|
1998-08-23 14:16:19 +04:00
|
|
|
.Ev PKG_TMPDIR
|
|
|
|
nor
|
|
|
|
.Ev TMPDIR
|
|
|
|
yields a suitable scratch directory,
|
|
|
|
.Pa /var/tmp ,
|
|
|
|
.Pa /tmp ,
|
|
|
|
and
|
|
|
|
.Pa /usr/tmp
|
2002-09-26 05:41:51 +04:00
|
|
|
are tried in turn.
|
|
|
|
Note that
|
1998-08-23 14:16:19 +04:00
|
|
|
.Pa /usr/tmp
|
|
|
|
may be created, if it doesn't already exist.
|
|
|
|
.Pp
|
|
|
|
Since
|
|
|
|
.Nm
|
|
|
|
requires very little information to be extracted from any package
|
|
|
|
files examined, it is unlikely that these environment variables would
|
|
|
|
ever need to be used to work around limited available space in the
|
|
|
|
default locations.
|
|
|
|
.El
|
1997-06-05 12:54:23 +04:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr pkg_add 1 ,
|
1999-03-22 08:02:39 +03:00
|
|
|
.Xr pkg_admin 1 ,
|
1997-06-05 12:54:23 +04:00
|
|
|
.Xr pkg_create 1 ,
|
|
|
|
.Xr pkg_delete 1 ,
|
|
|
|
.Xr mktemp 3 ,
|
2002-09-24 07:18:00 +04:00
|
|
|
.Xr packages 7 ,
|
2000-07-05 19:45:28 +04:00
|
|
|
.Xr mtree 8
|
1997-06-05 12:54:23 +04:00
|
|
|
.Sh AUTHORS
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It "Jordan Hubbard"
|
|
|
|
most of the work
|
|
|
|
.It "John Kohl"
|
1998-02-06 08:54:12 +03:00
|
|
|
refined it for
|
|
|
|
.Nx
|
1999-01-19 20:01:56 +03:00
|
|
|
.It "Hubert Feyrer"
|
|
|
|
.Nx
|
2001-04-09 16:48:37 +04:00
|
|
|
wildcard dependency processing, pkgdb, depends displaying,
|
|
|
|
pkg size display etc.
|
1997-06-05 12:54:23 +04:00
|
|
|
.El
|