Package information (pkg-info )
The pkg-info tool is used to display information
about a package. In addition to displaying the installation path
component of a file (used in configuration files) it can be used to
display a list of installed packages, what subpackages are installed,
if common links have been created for the package, what the common
links are, and populate the package installation database. As with the
pkg-inst tool, pkg-info is independent of
the underlying package managment system.
The --link-listing option displays the subpackage
components that have common links associated with them. A sample run
of pkg-info with --link-listing=short on
Solaris follows:
$ pkg-info --link-listing=short python
python
checking if v2.1.2-12 installed (TWW.python212) ... yes
installed instances ... TWW.python212.man TWW.python212.pkg
TWW.python212.doc TWW.python212.rte
searching for common links ... found
common links ...
bin: TWW.python212.pkg TWW.python212.rte
man: TWW.python212.man
A sample run with --link-listing=long to display
the common links created follows:
$ pkg-info --link-listing=long python
python
checking if v2.1.2-12 installed (TWW.python212) ... yes
installed instances ... TWW.python212.man TWW.python212.pkg
TWW.python212.doc TWW.python212.rte
searching for common links ... found
links/wrappers in common directories ...
l /opt/TWWfsw/man/man1/python.1 -> /opt/TWWfsw/python212/man/man1/python.1
l /opt/TWWfsw/bin/gfplus -> /opt/TWWfsw/python212p/bin/gfplus
l /opt/TWWfsw/bin/gfserver -> /opt/TWWfsw/python212p/bin/gfserver
l /opt/TWWfsw/bin/xmlproc_parse -> /opt/TWWfsw/python212p/bin/xmlproc_parse
l /opt/TWWfsw/bin/xmlproc_val -> /opt/TWWfsw/python212p/bin/xmlproc_val
W /opt/TWWfsw/bin/pydoc
W /opt/TWWfsw/bin/python
W /opt/TWWfsw/bin/python2.1
If a description entry exists for a package, a description can
be printed using the --print=description option:
$ pkg-info --print=description python
python
checking if v2.1.2-12 installed (TWW.python212) ... yes
installed instances ... TWW.python212.man TWW.python212.pkg
TWW.python212.doc TWW.python212.rte
description ...
Python is an interpreted, interactive, object-oriented
programming language. Python combines remarkable power with very
clear syntax. It has modules, classes, exceptions, very high
level dynamic data types, and dynamic typing. There are
interfaces to many system calls and libraries, as well as to
various windowing systems (X11, Motif, Tk, Mac, MFC). New
built-in modules are easily written in C or C++. Python is also
usable as an extension language for applications that need a
programmable interface. It is also usable as an extension
language for applications that need a programmable interface.
A repository can also be queried for information about a
package:
$ pkg-info --depot=http://updates.thewrittenword.com --dist-ver=6.1
--login=<login> --password=<password> --print=description python-2.2.2
python
depot containing v2.2.2-6 of this package ...
http://updates.il.thewrittenword.com
installation path component for v2.2.2 ... python222
instances ... TWW.python222.man TWW.python222.pkg TWW.python222.doc
TWW.python222.rte
dependencies ...
TWW.openssl097.rte [openssl] (v>=0.9.7.3)
description ...
Python is an interpreted, interactive, object-oriented programming
language. Python combines remarkable power with very clear syntax.
It has modules, classes, exceptions, very high level dynamic data
types, and dynamic typing. There are interfaces to many system
calls and libraries, as well as to various windowing systems (X11,
Motif, Tk, Mac, MFC). New built-in modules are easily written in C
or C++. Python is also usable as an extension language for
applications that need a programmable interface. It is also usable
as an extension language for applications that need a programmable
interface.
While each package management system has a utility to display a
list of installed packages, the pkg-info tool was
designed primarily to provide a list of the installed packages
independent of those already installed on the operating system.
The package installation database is used to obtain a list of
installed packages. The old pre-1.4 global package database, "/opt/TWWfsw/pkgutils15/share/pkg-db.xml ", is used as a fallback if
the package is not found in the installation database. All packages in
the installation database and global package database are queried to
determine which packages are installed. In time, the global package
database will be deprecated and the package installation database will
become the sole source of installed packages. To populate the package
installation database from an existing installation, use the
--update-pkg-db option as follows:
$ ls -ld /var/opt/TWWfsw/pkgutils15/libpng-1.0.14
/var/opt/TWWfsw/pkgutils15/libpng-1.0.14: No such file or directory
$ pkg-info --update-pkg-db --verbose
...
libpng
checking if v1.0.14 installed (TWWpng10) ... yes
installed instances ... TWWpng10u TWWpng10m
updating package database entry for runtime fileset ... done
updating package database entry for man fileset ... done
...
$ ls -ld /var/opt/TWWfsw/pkgutils15/libpng-1.0.14
-rw-r--r-- 1 root root 510 Jul 16 18:27 libpng-1.0.14
|