1998-09-13 01:59:18 +04:00
|
|
|
.\" $NetBSD: pkg_info.1,v 1.10 1998/09/12 21:59:18 hubertf Exp $
|
1997-06-05 12:54:23 +04:00
|
|
|
.\"
|
|
|
|
.\" FreeBSD install - a package for the installation and maintainance
|
|
|
|
.\" 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
|
|
|
|
.\"
|
1998-08-23 14:16:19 +04:00
|
|
|
.Dd August 22, 1998
|
|
|
|
.Dt PKG_INFO 1
|
1997-10-16 04:31:32 +04:00
|
|
|
.Os FreeBSD
|
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
|
|
|
|
.Nm pkg_info
|
1998-08-23 14:16:19 +04:00
|
|
|
.Op Fl cDdfIikLmpqRrvh
|
1997-06-05 12:54:23 +04:00
|
|
|
.Op Fl e Ar package
|
|
|
|
.Op Fl l Ar prefix
|
|
|
|
.Ar pkg-name [pkg-name ...]
|
|
|
|
.Nm pkg_info
|
1998-08-23 14:16:19 +04:00
|
|
|
.Op Fl a Ar flags
|
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
|
|
|
|
may be the name of an installed package, the pathname to a package
|
|
|
|
distribution file, or a URL to an ftp-available package.
|
|
|
|
.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.
|
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
|
|
|
|
allows you to test for the presence of another (perhaps
|
|
|
|
prerequisite) package from a script.
|
1997-06-05 12:54:23 +04:00
|
|
|
If the package identified by
|
|
|
|
.Ar pkg-name
|
1998-07-09 21:49:51 +04:00
|
|
|
is currently installed, return 0, otherwise return 1.
|
1998-09-13 01:59:18 +04:00
|
|
|
In addition, the names of any package(s) found installed are printed to
|
|
|
|
stdout unless turned off using the
|
|
|
|
.Fl q
|
|
|
|
option.
|
|
|
|
|
|
|
|
If the given
|
|
|
|
.Ar pkg-name
|
|
|
|
contains a
|
1998-07-09 21:49:51 +04:00
|
|
|
shell metacharacter, it will be matched against all installed
|
|
|
|
packages using
|
1998-09-13 01:59:18 +04:00
|
|
|
.Xr fnmatch 3 .
|
1998-08-27 16:54:03 +04:00
|
|
|
.Xr csh 1
|
1998-09-13 01:59:18 +04:00
|
|
|
style {,} alternates have also been implemented in addition to this.
|
|
|
|
Package version numbers can also be matched in a relational manner
|
1998-08-27 16:54:03 +04:00
|
|
|
using the
|
|
|
|
.Pa >=, <=, >
|
|
|
|
and
|
|
|
|
.Pa <
|
|
|
|
operators.
|
|
|
|
For example,
|
|
|
|
.Pa pkg_info -e 'name>=1.3'
|
|
|
|
will match versions 1.3 and later of the
|
|
|
|
.Pa name
|
|
|
|
package.
|
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.
|
|
|
|
.It Fl k
|
|
|
|
Show the de-install script (if any) for each package.
|
|
|
|
.It Fl L
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
.It Fl p
|
|
|
|
Show the installation prefix for each package.
|
|
|
|
.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
|
|
|
|
Show which packages are required by each package.
|
|
|
|
.It Fl r
|
|
|
|
Show the requirements script (if any) for each package.
|
|
|
|
.It Fl v
|
|
|
|
Turn on verbose output.
|
|
|
|
.El
|
|
|
|
.Sh ENVIRONMENT
|
|
|
|
.Bl -tag -width PKG_DBDIR
|
|
|
|
.It Ev PKG_DBDIR
|
|
|
|
The standard package database directory,
|
|
|
|
.Pa /var/db/pkg ,
|
|
|
|
can be overridden by specifying an alternative directory in the
|
|
|
|
.Ev PKG_DBDIR
|
|
|
|
environment variable.
|
|
|
|
.It Ev PKG_PATH
|
|
|
|
This can be used to specify a colon-separated list of paths to search for
|
|
|
|
package files. The current directory is always searched first, even if
|
|
|
|
.Ev PKG_PATH
|
|
|
|
is set. If
|
|
|
|
.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
|
|
|
|
from package files. If neither
|
|
|
|
.Ev PKG_TMPDIR
|
|
|
|
nor
|
|
|
|
.Ev TMPDIR
|
|
|
|
yields a suitable scratch directory,
|
|
|
|
.Pa /var/tmp ,
|
|
|
|
.Pa /tmp ,
|
|
|
|
and
|
|
|
|
.Pa /usr/tmp
|
|
|
|
are tried in turn. Note that
|
|
|
|
.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 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/<pkg-name> .
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr pkg_add 1 ,
|
|
|
|
.Xr pkg_create 1 ,
|
|
|
|
.Xr pkg_delete 1 ,
|
|
|
|
.Xr mktemp 3 ,
|
|
|
|
.Xr mtree 8 .
|
|
|
|
.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
|
1997-06-05 12:54:23 +04:00
|
|
|
.El
|