wpkg --field | -f
Short Hand
wpkg -f
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 | Not used. |
--root | Define the installation root path. |
--verbose | Not used. |
The --field command extracts fields from the control file of a package and prints their value in standard output. The command works with compatible .deb files or installed packages. For installed packages, fields defined in the wpkg status file are also accessible. So you may check the status of a package with the following command:
wpkg --field <name> X-Status
Since version 0.9.0, the --status command is a synonym of the --field command. The example shown above is an equivalent to the old --status command behavior.
Note also that packages that were removed or even purged still have some information available in the database. That information can still be accessed with the --field command as wpkg doesn't generate an error if the package isn't currently installed or unpacked.
When the command is used just with the name of a package, then all the fields of that package are printed out.
When the command is followed by the name of one field, then the value of that one field is printed out without its name. This can be used in scripts to extract values that you need without having to parse the output of a multi-field display. However, keep in mind that each time the control.tar.gz file needs to be decompressed in order for wpkg to extract the control file and its contents.
When the command is followed by several field names, it prints out the name of the field, a colon, a space, and the value of the field.
For full control of the output format, you may want to use the --show command instead.