dpkg-parsechangelog
parse Debian changelog files
- Provided by: dpkg-dev (Version: 1.18.4ubuntu1.7)
- Source: dpkg
- Report a bug
parse Debian changelog files
dpkg-parsechangelog [option...]
dpkg-parsechangelog reads and parses the changelog of an unpacked Debian source tree and outputs the information in it to standard output in a machine-readable form.
The following options can be used to influence the output of the changelog parser, e.g. the range of entries or the format of the output. They need to be supported by the parser script in question. See also NOTES.
It is possible to use a different format to the standard one, by providing a parser for that alternative format.
In order to have dpkg-parsechangelog run the new parser, a line must be included within the last 40 lines of the changelog file, matching the Perl regular expression: “\schangelog-format:\s+([0-9a-z]+)\W”. The part in parentheses should be the name of the format. For example:
@@@ changelog-format: otherformat @@@
Changelog format names are non-empty strings of alphanumerics.
If such a line exists then dpkg-parsechangelog will look for the parser as /usr/lib/dpkg/parsechangelog/otherformat or /usr/local/lib/dpkg/parsechangelog/otherformat; it is an error for it not being present or not being an executable program. The default changelog format is debian, and a parser for it is provided by default.
The parser will be invoked with the changelog open on standard input at the start of the file. It should read the file (it may seek if it wishes) to determine the information required and return the parsed information to standard output in the format specified by the --format option. It should accept all Parser Options.
If the changelog format which is being parsed always or almost always leaves a blank line between individual change notes, these blank lines should be stripped out, so as to make the resulting output compact.
If the changelog format does not contain date or package name information this information should be omitted from the output. The parser should not attempt to synthesize it or find it from other sources.
If the changelog does not have the expected format the parser should exit with a nonzero exit status, rather than trying to muddle through and possibly generating incorrect output.
A changelog parser may not interact with the user at all.
All Parser Options except for -v are only supported since dpkg 1.14.16. Third party parsers for changelog formats other than debian might not support all options.
Short option parsing with non-bundled values available only since dpkg 1.18.0.