dh_listpackages - Linux
Overview
dh_listpackages
is a command used within the Debian packaging system to list all packages that a source package would produce. It is primarily intended for use within Debian package build scripts, such as those generated by dh
.
Syntax
dh_listpackages [option...]
Options/Flags
-
-a
Output all packages produced by the source package, including binary packages. -
-c
Output the package names in a format suitable for use withdpkg
. -
-f
Output the package names in a format suitable for use withdh_gencontrol
. -
-l
List the package names in a long format, including the package’s version, architecture, and description. -
-p
Output the package names in a format suitable for use withdh_make
.
Examples
List all packages produced by a source package:
dh_listpackages -a
Output package names in a format suitable for use with dpkg
:
dh_listpackages -c
List package names in a long format:
dh_listpackages -l
Common Issues
If dh_listpackages
does not output any package names, ensure that the source package has been properly configured. Check the debian/control
file to make sure that the Package:
and Source:
fields are set correctly.
Integration
dh_listpackages
is often used in conjunction with other Debian packaging commands, such as dh_make
and dh_gencontrol
. These commands allow you to automate the process of creating and building Debian packages.
Related Commands
dh
: Debian packaging helper suitedpkg
: Package management systemdh_make
: Create a Debian source packagedh_gencontrol
: Generate a Debian control file