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

File: [cvs.NetBSD.org] / pkgsrc / pkgtools / pkg_install / files / info / Attic / pkg_info.cat1 (download)

Revision 1.6, Sat Feb 7 10:37:53 2004 UTC (18 years, 3 months ago) by grant
Branch: MAIN
CVS Tags: pkgsrc-2004Q1-base, pkgsrc-2004Q1
Changes since 1.5: +45 -43 lines

sync with NetBSD-current's pkg_install from 20040207.

PKG_INFO(1)             NetBSD General Commands Manual             PKG_INFO(1)

     ppkkgg__iinnffoo - a utility for displaying information on software packages

     ppkkgg__iinnffoo [--BBbbccDDddFFffhhIIiikkLLmmNNnnppqqRRrrSSssVVvv] [--ee _p_a_c_k_a_g_e] [--KK _p_k_g___d_b_d_i_r]
              [--ll _p_r_e_f_i_x] _p_k_g_-_n_a_m_e _._._.
     ppkkgg__iinnffoo [--aa _f_l_a_g_s]

     The ppkkgg__iinnffoo 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 pkg_create(1) command.

     The _p_k_g_-_n_a_m_e may be the name of an installed package (with our without
     version), a pattern matching several installed packages (see the _P_A_C_K_A_G_E
     _W_I_L_D_C_A_R_D_S section for a description of possible patterns), the pathname
     to a binary package, a filename belonging to an installed package (if --FF
     is also given), or a URL to an ftp-available package.

     The following command-line options are supported:

     --aa      Show information for all currently installed packages.

     --BB      Show some of the important definitions used when building the
             binary package (the "Build information") for each package.

     --bb      Show the NetBSD RCS Id strings from the files used in the con-
             struction 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.

     --cc      Show the one-line comment field for each package.

     --DD      Show the install-message file (if any) for each package.

     --dd      Show the long-description field for each package.

     --ee _p_k_g_-_n_a_m_e
             This option allows you to test for the existence of a given pack-
             age.  If the package identified by _p_k_g_-_n_a_m_e is currently
             installed, return code is 0, otherwise 1.  The names of any pack-
             age(s) found installed are printed to stdout unless turned off
             using the --qq option.  _p_k_g_-_n_a_m_e can contain wildcards, see the
             _P_A_C_K_A_G_E _W_I_L_D_C_A_R_D_S section below.

     --FF      Interpret any pkg-name given as filename, and translate it to a
             package name using the Package Database.  This can be used to
             query information on a per-file basis, e.g. in conjunction with
             the --ee flag to find out which package a file belongs to.

     --ff      Show the packing list instructions for each package.

     --II      Show the index entry for each package.

     --ii      Show the install script (if any) for each package.

     --KK _p_k_g___d_b_d_i_r
             Set _p_k_g___d_b_d_i_r 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 PKG_DBDIR if it's set,
             otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g.

     --kk      Show the de-install script (if any) for each package.

     --LL      Show the files within each package.  This is different from just
             viewing the packing list, since full pathnames for everything are

     --ll _s_t_r  Prefix each information category header (see --qq) shown with _s_t_r.
             This is primarily of use to front-end programs that want to
             request a lot of different information fields at once for a pack-
             age, 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.

     --mm      Show the mtree file (if any) for each package.

     --NN      Show which packages each package was built with (exact dependen-
             cies), if any.

     --nn      Show which packages each package needs (depends upon), if any.

     --pp      Show the installation prefix for each package.

     --qq      Be ``quiet'' in emitting report headers and such, just dump the
             raw info (basically, assume a non-human reading).

     --RR      Show which packages are required by each package.

     --rr      Show the requirements script (if any) for each package.

     --SS      Show the size of this package and all the packages it requires,
             in bytes.

     --ss      Show the size of this package in bytes.  The size is calculated
             by adding up the size of each file of the package.

     --VV      Print version number and exit.

     --vv      Turn on verbose output.

     Package info is either extracted from package files named on the command
     line, or from already installed package information in

     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 transla-
     tion to take place, the --FF flag must be given.  The filename must be
     absolute, compare the output of pkg_info --aaFF.

     In the places where a package name/version is expected, e.g. for the --ee
     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.

     Package wildcards use fnmatch(3).  In addition, csh(1) style {,} alter-
     nates have also been implemented.  Package version numbers can also be
     matched in a relational manner using the _>_=, _<_=, _>, and _< operators.  For
     example, _p_k_g___i_n_f_o _-_e _'_n_a_m_e_>_=_1_._3_' will match versions 1.3 and later of the
     _n_a_m_e package.  The collating sequence of the various package version num-
     bers is unusual, but strives to be consistent.  The magic string
     ``alpha'' equates to _a_l_p_h_a _v_e_r_s_i_o_n and sorts before a beta version.  The
     magic string ``beta'' equates to _b_e_t_a _v_e_r_s_i_o_n and sorts before a release
     candidate.  The magic string ``rc'' equates to _r_e_l_e_a_s_e _c_a_n_d_i_d_a_t_e and
     sorts before a release.  For example, _n_a_m_e_-_1_._3_r_c_3 will sort before
     _n_a_m_e_-_1_._3 and after _n_a_m_e_-_1_._2_._9 Similarly _n_a_m_e_-_1_._3_a_l_p_h_a_2 will sort before
     _n_a_m_e_-_1_._3_b_e_t_a_1 and they both sort before _n_a_m_e_-_1_._3_r_c_1 In addition, alpha-
     betic characters sort in the same place as their numeric counterparts, so
     that _n_a_m_e_-_1_._2_e has the same sorting value as _n_a_m_e_-_1_._2_._5 The magic string
     ``pl'' equates to a _p_a_t_c_h _l_e_v_e_l and has the same value as a dot in the
     dewey-decimal ordering schemes.

     PKG_DBDIR  If the --KK flag isn't given, then PKG_DBDIR is the location of
                the package database directory.  The default package database
                directory is _/_v_a_r_/_d_b_/_p_k_g.

     PKG_PATH   This can be used to specify a semicolon-separated list of
                paths and URLs to search for package files.  If PKG_PATH is
                used, the suffix _._t_g_z is automatically appended to the
                _p_k_g_-_n_a_m_e, whereas searching in the current directory uses
                _p_k_g_-_n_a_m_e literally.

                These are tried in turn (if set) as candidate directories in
                which to create a ``staging area'' for any files extracted by
                ppkkgg__iinnffoo from package files.  If neither PKG_TMPDIR nor TMPDIR
                yields a suitable scratch directory, _/_v_a_r_/_t_m_p, _/_t_m_p, and
                _/_u_s_r_/_t_m_p are tried in turn.  Note that _/_u_s_r_/_t_m_p may be cre-
                ated, if it doesn't already exist.

                Since ppkkgg__iinnffoo 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.

     pkg_add(1), pkg_admin(1), pkg_create(1), pkg_delete(1), mktemp(3),
     packages(7), mtree(8)

     Jordan Hubbard
             most of the work
     John Kohl
             refined it for NetBSD
     Hubert Feyrer
             NetBSD wildcard dependency processing, pkgdb, depends displaying,
             pkg size display etc.

NetBSD 1.6                      January 6, 2004                     NetBSD 1.6