GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DPKG::CHANGELOG::PARSE (3)

.ds Aq ’

NAME

Dpkg::Changelog::Parse - generic changelog parser for dpkg-parsechangelog

CONTENTS

DESCRIPTION

This module provides a set of functions which reproduce all the features of dpkg-parsechangelog.

FUNCTIONS

$fields = changelog_parse_debian(%opt) This function will parse a changelog. In list context, it returns as many Dpkg::Control objects as the parser did create. In scalar context, it will return only the first one. If the parser did not return any data, it will return an empty list in list context or undef on scalar context. If the parser failed, it will die.

The changelog file that is parsed is debian/changelog by default but it can be overridden with $opt{file}. The default output format is dpkg but it can be overridden with $opt{format}.

The parsing itself is done by Dpkg::Changelog::Debian.

$fields = changelog_parse_plugin(%opt) This function will parse a changelog. In list context, it returns as many Dpkg::Control objects as the parser did output. In scalar context, it will return only the first one. If the parser did not return any data, it will return an empty list in list context or undef on scalar context. If the parser failed, it will die.

The parsing itself is done by an external program (searched in the following list of directories: $opt{libdir}, /usr/local/lib/dpkg/parsechangelog, /usr/lib/dpkg/parsechangelog). That program is named according to the format that it is able to parse. By default it is either debian or the format name looked up in the 40 last lines of the changelog itself (extracted with this perl regular expression \schangelog-format:\s+([0-9a-z]+)\W). But it can be overridden with $opt{changelogformat}. The program expects the content of the changelog file on its standard input.

The changelog file that is parsed is debian/changelog by default but it can be overridden with $opt{file}.

All the other keys in %opt are forwarded as parameter to the external parser. If the key starts with -, it is passed as is. If not, it is passed as --<key>. If the value of the corresponding hash entry is defined, then it is passed as the parameter that follows.

$fields = changelog_parse(%opt) This function will parse a changelog. In list context, it returns as many Dpkg::Control objects as the parser did create. In scalar context, it will return only the first one. If the parser did not return any data, it will return an empty list in list context or undef on scalar context. If the parser failed, it will die.

If $opt{forceplugin} is false and $opt{changelogformat} is debian, then changelog_parse_debian() is called to perform the parsing. Otherwise changelog_parse_plugin() is used.

The changelog file that is parsed is debian/changelog by default but it can be overridden with $opt{file}.

CHANGES

    Version 1.01 (dpkg 1.18.2)

New functions: changelog_parse_debian(), changelog_parse_plugin().

    Version 1.00 (dpkg 1.15.6)

Mark the module as public.
Search for    or go to Top of page |  Section 3 |  Main Index


1.18.4 DPKG::CHANGELOG::PARSE (3) 2015-11-26

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.