[BACK]Return to pkg_info.1 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / pkgtools / pkg_install / files / info

Annotation of pkgsrc/pkgtools/pkg_install/files/info/pkg_info.1, Revision 1.10

1.10    ! jlam        1: .\" $NetBSD: pkg_info.1,v 1.40 2004/05/08 21:05:02 jlam Exp $
1.1       schmonz     2: .\"
1.2       jlam        3: .\" FreeBSD install - a package for the installation and maintenance
1.1       schmonz     4: .\" of non-core utilities.
                      5: .\"
                      6: .\" Redistribution and use in source and binary forms, with or without
                      7: .\" modification, are permitted provided that the following conditions
                      8: .\" are met:
                      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.
                     14: .\"
                     15: .\" Jordan K. Hubbard
                     16: .\"
                     17: .\"
                     18: .\"     @(#)pkg_info.1
                     19: .\"
1.10    ! jlam       20: .Dd May 7, 2004
1.1       schmonz    21: .Dt PKG_INFO 1
                     22: .Os
                     23: .Sh NAME
                     24: .Nm pkg_info
                     25: .Nd a utility for displaying information on software packages
                     26: .Sh SYNOPSIS
                     27: .Nm
1.2       jlam       28: .Op Fl BbcDdFfhIikLmNnpqRrSsVv
1.1       schmonz    29: .Bk -words
                     30: .Op Fl e Ar package
                     31: .Ek
                     32: .Bk -words
1.2       jlam       33: .Op Fl K Ar pkg_dbdir
                     34: .Ek
                     35: .Bk -words
1.1       schmonz    36: .Op Fl l Ar prefix
                     37: .Ek
                     38: .Ar pkg-name ...
                     39: .Nm
                     40: .Bk -words
                     41: .Op Fl a Ar flags
                     42: .Ek
1.9       jlam       43: .Nm
                     44: .Bk -words
                     45: .Op Fl Q Ar variable
                     46: .Ek
                     47: .Ar pkg-name ...
1.1       schmonz    48: .Sh DESCRIPTION
                     49: The
                     50: .Nm
                     51: command is used to dump out information for packages, which may be either
                     52: packed up in files or already installed on the system with the
                     53: .Xr pkg_create 1
                     54: command.
                     55: .Pp
                     56: The
                     57: .Ar pkg-name
                     58: may be the name of an installed package (with our without version), a
                     59: pattern matching several installed packages (see the
1.6       hubertf    60: .Sx PACKAGE WILDCARDS
                     61: section for a description of possible patterns),
1.1       schmonz    62: the pathname to a
1.6       hubertf    63: binary package, a filename belonging to an installed
1.1       schmonz    64: package (if
                     65: .Fl F
                     66: is also given), or a URL to an ftp-available package.
                     67: .Pp
                     68: The following command-line options are supported:
                     69: .Bl -tag -width indent
                     70: .It Fl a
                     71: Show information for all currently installed packages.
                     72: .It Fl B
                     73: Show some of the important definitions used when building
                     74: the binary package (the "Build information") for each package.
                     75: .It Fl b
                     76: Show the
                     77: .Nx
                     78: RCS Id strings from the files used in the construction
                     79: of the binary package (the "Build version") for each package.
                     80: These files are the package Makefile, any patch files, any checksum
                     81: files, and the packing list file.
                     82: .It Fl c
                     83: Show the one-line comment field for each package.
                     84: .It Fl D
                     85: Show the install-message file (if any) for each package.
                     86: .It Fl d
                     87: Show the long-description field for each package.
                     88: .It Fl e Ar pkg-name
                     89: This option
1.7       wiz        90: allows you to test for the existence of a given package.
1.1       schmonz    91: If the package identified by
                     92: .Ar pkg-name
1.6       hubertf    93: is currently installed, return code is 0, otherwise 1.
                     94: The names of any package(s) found installed are printed to
1.1       schmonz    95: stdout unless turned off using the
                     96: .Fl q
                     97: option.
                     98: .Ar pkg-name
1.6       hubertf    99: can contain wildcards, see the
                    100: .Sx PACKAGE WILDCARDS
                    101: section below.
1.1       schmonz   102: .It Fl F
                    103: Interpret any pkg-name given as filename, and translate it to a
                    104: package name using the Package Database.
                    105: This can be used to query information on a per-file basis, e.g. in
                    106: conjunction with the
                    107: .Fl e
                    108: flag to find out which package a file belongs to.
                    109: .It Fl f
                    110: Show the packing list instructions for each package.
                    111: .It Fl I
                    112: Show the index entry for each package.
                    113: .It Fl i
                    114: Show the install script (if any) for each package.
1.2       jlam      115: .It Fl K Ar pkg_dbdir
                    116: Set
                    117: .Ar pkg_dbdir
                    118: as the package database directory.
                    119: If this option isn't specified, then the package database directory is
                    120: taken from the value of the environment variable
                    121: .Ev PKG_DBDIR
                    122: if it's set, otherwise it defaults to
                    123: .Pa /var/db/pkg .
1.1       schmonz   124: .It Fl k
                    125: Show the de-install script (if any) for each package.
                    126: .It Fl L
                    127: Show the files within each package.
                    128: This is different from just viewing the packing list, since full pathnames
                    129: for everything are generated.
                    130: .It Fl l Ar str
                    131: Prefix each information category header (see
                    132: .Fl q )
                    133: shown with
                    134: .Ar str .
                    135: This is primarily of use to front-end programs that want to request a
                    136: lot of different information fields at once for a package, but don't
                    137: necessary want the output intermingled in such a way that they can't
                    138: organize it.
                    139: This lets you add a special token to the start of each field.
                    140: .It Fl m
                    141: Show the mtree file (if any) for each package.
1.2       jlam      142: .It Fl N
                    143: Show which packages each package was built with (exact dependencies), if any.
1.1       schmonz   144: .It Fl n
                    145: Show which packages each package needs (depends upon), if any.
                    146: .It Fl p
                    147: Show the installation prefix for each package.
1.9       jlam      148: .It Fl Q
                    149: Show the definition of
                    150: .Ar variable
                    151: from the build information for each package.
                    152: An empty string is returned if no such variable definition is found for
                    153: the package(s).
1.1       schmonz   154: .It Fl q
                    155: Be ``quiet'' in emitting report headers and such, just dump the
                    156: raw info (basically, assume a non-human reading).
                    157: .It Fl R
                    158: Show which packages are required by each package.
                    159: .It Fl r
                    160: Show the requirements script (if any) for each package.
                    161: .It Fl S
                    162: Show the size of this package and all the packages it requires,
                    163: in bytes.
                    164: .It Fl s
                    165: Show the size of this package in bytes.
                    166: The size is calculated by adding up the size of each file of the package.
                    167: .It Fl V
                    168: Print version number and exit.
                    169: .It Fl v
                    170: Turn on verbose output.
                    171: .El
1.6       hubertf   172: .Sh TECHNICAL DETAILS
                    173: Package info is either extracted from package files named on the
                    174: command line, or from already installed package information
                    175: in
                    176: .Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt] .
                    177: .Pp
                    178: A filename can be given instead of a (installed) package name to query
                    179: information on the package this file belongs to.
                    180: This filename is then resolved to a package name using the Package Database.
                    181: For this translation to take place, the
                    182: .Fl F
                    183: flag must be given.
                    184: The filename must be absolute, compare the output of pkg_info
                    185: .Fl aF .
                    186: .Sh PACKAGE WILDCARDS
                    187: In the places where a package name/version is expected, e.g. for the
                    188: .Fl e
1.7       wiz       189: switch, several forms can be used.
                    190: Either use a package name with or without version, or specify a
                    191: package wildcard that gets matched against all installed packages.
1.6       hubertf   192: .Pp
1.7       wiz       193: Package wildcards use
1.6       hubertf   194: .Xr fnmatch 3 .
                    195: In addition,
                    196: .Xr csh 1
                    197: style {,} alternates have also been implemented.
                    198: Package version numbers can also be matched in a relational manner
                    199: using the
1.7       wiz       200: .Pa \*[Ge] , \*[Le] , \*[Gt] ,
1.6       hubertf   201: and
                    202: .Pa \*[Lt]
                    203: operators.
                    204: For example,
                    205: .Pa pkg_info -e 'name\*[Ge]1.3'
                    206: will match versions 1.3 and later of the
                    207: .Pa name
                    208: package.
                    209: The collating sequence of the various package version numbers is
                    210: unusual, but strives to be consistent.
                    211: The magic string ``alpha'' equates to
                    212: .Pa alpha version
                    213: and sorts before a beta version.
                    214: The magic string ``beta'' equates to
                    215: .Pa beta version
                    216: and sorts before a release candidate.
                    217: The magic string ``rc'' equates to
                    218: .Pa release candidate
                    219: and sorts before a release.
                    220: For example,
                    221: .Pa name-1.3rc3
                    222: will sort before
                    223: .Pa name-1.3
                    224: and after
                    225: .Pa name-1.2.9
                    226: Similarly
                    227: .Pa name-1.3alpha2
                    228: will sort before
                    229: .Pa name-1.3beta1
                    230: and they both sort before
1.10    ! jlam      231: .Pa name-1.3rc1 .
1.6       hubertf   232: In addition, alphabetic characters sort in the same place as
                    233: their numeric counterparts, so that
                    234: .Pa name-1.2e
                    235: has the same sorting value as
                    236: .Pa name-1.2.5
                    237: The magic string ``pl'' equates to a
                    238: .Pa patch level
                    239: and has the same value as a dot in the dewey-decimal ordering schemes.
1.1       schmonz   240: .Sh ENVIRONMENT
                    241: .Bl -tag -width PKG_DBDIR
                    242: .It Ev PKG_DBDIR
1.2       jlam      243: If the
                    244: .Fl K
                    245: flag isn't given, then
1.1       schmonz   246: .Ev PKG_DBDIR
1.2       jlam      247: is the location of the package database directory.
                    248: The default package database directory is
                    249: .Pa /var/db/pkg .
1.1       schmonz   250: .It Ev PKG_PATH
                    251: This can be used to specify a semicolon-separated list of paths and URLs to search for
                    252: package files.
                    253: If
                    254: .Ev PKG_PATH
                    255: is used, the suffix
                    256: .Pa .tgz
                    257: is automatically appended to the
                    258: .Ar pkg-name ,
                    259: whereas searching in the current directory uses
                    260: .Ar pkg-name
                    261: literally.
                    262: .It Ev PKG_TMPDIR , Ev TMPDIR
                    263: These are tried in turn (if set) as candidate directories in which
                    264: to create a ``staging area'' for any files extracted by
                    265: .Nm
                    266: from package files.
                    267: If neither
                    268: .Ev PKG_TMPDIR
                    269: nor
                    270: .Ev TMPDIR
                    271: yields a suitable scratch directory,
                    272: .Pa /var/tmp ,
                    273: .Pa /tmp ,
                    274: and
                    275: .Pa /usr/tmp
                    276: are tried in turn.
                    277: Note that
                    278: .Pa /usr/tmp
                    279: may be created, if it doesn't already exist.
                    280: .Pp
                    281: Since
                    282: .Nm
                    283: requires very little information to be extracted from any package
                    284: files examined, it is unlikely that these environment variables would
                    285: ever need to be used to work around limited available space in the
                    286: default locations.
                    287: .El
                    288: .Sh SEE ALSO
                    289: .Xr pkg_add 1 ,
                    290: .Xr pkg_admin 1 ,
                    291: .Xr pkg_create 1 ,
                    292: .Xr pkg_delete 1 ,
                    293: .Xr mktemp 3 ,
                    294: .Xr packages 7 ,
                    295: .Xr mtree 8
                    296: .Sh AUTHORS
                    297: .Bl -tag -width indent -compact
                    298: .It "Jordan Hubbard"
                    299: most of the work
                    300: .It "John Kohl"
                    301: refined it for
                    302: .Nx
                    303: .It "Hubert Feyrer"
                    304: .Nx
                    305: wildcard dependency processing, pkgdb, depends displaying,
                    306: pkg size display etc.
                    307: .El

CVSweb <webmaster@jp.NetBSD.org>