wpkg --show | -W

Short Hand

wpkg -W

Options Comments
--admindir Define the administration directory, where the database of the installed packages resides.
--debug Define a set of flags of things to print out for debug purposes.
--instdir Define the installation directory, where the data files are installed on the target.
--quiet Request for warning messages to not be displayed.
--root Define the installation root path.
--showformat Define the format to use to print out the fields. The default is "${Package}\t${Version}\n".
--verbose Display log information of level INFO.

The --show command allows you to easily print control file fields in a formatted manner. This is more advanced than the --field, --status and --info command line options.

By default this command prints out the name of the package and its version separated by a tab character (\t) and ended with a newline character (\n).

prompt% wpkg --show gcc
gcc 4.6.3

It is possible to define the format of the --show command with the --showformat option. The show format is expected to be composed of strings, references to the fields, and escape characters. The following lists the available capabilities.

Note that field names are case insensitive so a reference to Package or package or PACKAGE are all to the same field. In the format they are written between ${ and }. For example, the package name is written as in:

wpkg --showformat '${Package}\n'

The default format looks like this:

wpkg --showformat '${Package}\t${Version}\n' package_name.deb

You may specify a width in the field by adding a colon character followed by a number. If the number is negative, then the content of the field is left aligned (similar to the width in a printf(3C) format):

wpkg --showformat '${Installed-Size:16}\t${Package}\n'

Note that the width cannot be used to truncate the content of a field. If the field has more characters, then all the characters are printed out. The show format also supports some escape characters.