.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Dpkg::Control 3perl" .TH Dpkg::Control 3perl 2024-01-19 1.22.3 libdpkg-perl .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Dpkg::Control \- parse and manipulate official control\-like information .SH DESCRIPTION .IX Header "DESCRIPTION" The Dpkg::Control object is a smart version of Dpkg::Control::Hash. It associates a type to the control information. That type can be used to know what fields are allowed and in what order they must be output. .PP The types are constants that are exported by default. Here's the full list: .IP CTRL_UNKNOWN 4 .IX Item "CTRL_UNKNOWN" This type is the default type, it indicates that the type of control information is not yet known. .IP CTRL_TMPL_SRC 4 .IX Item "CTRL_TMPL_SRC" Corresponds to the first source package stanza in a \fIdebian/control\fR file in a Debian source package. .IP CTRL_TMPL_PKG 4 .IX Item "CTRL_TMPL_PKG" Corresponds to subsequent binary package stanza in a \fIdebian/control\fR file in a Debian source package. .IP CTRL_REPO_RELEASE 4 .IX Item "CTRL_REPO_RELEASE" Corresponds to a \fIRelease\fR file in a repository. .IP CTRL_REPO_SRC 4 .IX Item "CTRL_REPO_SRC" Corresponds to a stanza in a \fISources\fR file of a source package repository. .IP CTRL_REPO_PKG 4 .IX Item "CTRL_REPO_PKG" Corresponds to a stanza in a \fIPackages\fR file of a binary package repository. .IP CTRL_DSC 4 .IX Item "CTRL_DSC" Corresponds to a .dsc file of a Debian source package. .IP CTRL_DEB 4 .IX Item "CTRL_DEB" Corresponds to the \fIcontrol\fR file generated by dpkg-gencontrol (\fIDEBIAN/control\fR) and to the same file inside .deb packages. .IP CTRL_FILE_BUILDINFO 4 .IX Item "CTRL_FILE_BUILDINFO" Corresponds to a .buildinfo file. .IP CTRL_FILE_CHANGES 4 .IX Item "CTRL_FILE_CHANGES" Corresponds to a .changes file. .IP CTRL_FILE_VENDOR 4 .IX Item "CTRL_FILE_VENDOR" Corresponds to a vendor file in \f(CW$Dpkg::CONFDIR\fR/origins/. .IP CTRL_FILE_STATUS 4 .IX Item "CTRL_FILE_STATUS" Corresponds to a stanza in dpkg's \fIstatus\fR file ($Dpkg::ADMINDIR/status). .IP CTRL_CHANGELOG 4 .IX Item "CTRL_CHANGELOG" Corresponds to the output of dpkg-parsechangelog. .IP CTRL_COPYRIGHT_HEADER 4 .IX Item "CTRL_COPYRIGHT_HEADER" Corresponds to the header stanza in a \fIdebian/copyright\fR file in machine readable format. .IP CTRL_COPYRIGHT_FILES 4 .IX Item "CTRL_COPYRIGHT_FILES" Corresponds to a files stanza in a \fIdebian/copyright\fR file in machine readable format. .IP CTRL_COPYRIGHT_LICENSE 4 .IX Item "CTRL_COPYRIGHT_LICENSE" Corresponds to a license stanza in a \fIdebian/copyright\fR file in machine readable format. .IP CTRL_TESTS 4 .IX Item "CTRL_TESTS" Corresponds to a source package tests control file in \fIdebian/tests/control\fR. .IP CTRL_INFO_SRC 4 .IX Item "CTRL_INFO_SRC" Alias for \fBCTRL_TMPL_SRC\fR. .IP CTRL_INFO_PKG 4 .IX Item "CTRL_INFO_PKG" Alias for \fBCTRL_TMPL_PKG\fR. .IP CTRL_PKG_SRC 4 .IX Item "CTRL_PKG_SRC" Alias for \fBCTRL_DSC\fR. .IP CTRL_PKG_DEB 4 .IX Item "CTRL_PKG_DEB" Alias for \fBCTRL_DEB\fR. .IP CTRL_INDEX_SRC 4 .IX Item "CTRL_INDEX_SRC" Alias for \fBCTRL_REPO_SRC\fR. .IP CTRL_INDEX_PKG 4 .IX Item "CTRL_INDEX_PKG" Alias for \fBCTRL_REPO_PKG\fR. .SH METHODS .IX Header "METHODS" All the methods of Dpkg::Control::Hash are available. Those listed below are either new or overridden with a different behavior. .ie n .IP "$c = Dpkg::Control\->new(%opts)" 4 .el .IP "\f(CW$c\fR = Dpkg::Control\->new(%opts)" 4 .IX Item "$c = Dpkg::Control->new(%opts)" If the "type" option is given, it's used to setup default values for other options. See \fBset_options()\fR for more details. .ie n .IP $c\->set_options(%opts) 4 .el .IP \f(CW$c\fR\->set_options(%opts) 4 .IX Item "$c->set_options(%opts)" Changes the value of one or more options. If the "type" option is changed, it is used first to define default values for others options. The option "allow_pgp" is set to 1 for CTRL_DSC, CTRL_FILE_CHANGES and CTRL_REPO_RELEASE and to 0 otherwise. The option "drop_empty" is set to 0 for CTRL_TMPL_SRC and CTRL_TMPL_PKG and to 1 otherwise. The option "name" is set to a textual description of the type of control information. .Sp The output order is also set to match the ordered list returned by Dpkg::Control::Fields::field_ordered_list($type). .ie n .IP $c\->\fBget_type()\fR 4 .el .IP \f(CW$c\fR\->\fBget_type()\fR 4 .IX Item "$c->get_type()" Returns the type of control information stored. See the type parameter set during \fBnew()\fR. .SH CHANGES .IX Header "CHANGES" .SS "Version 1.04 (dpkg 1.22.2)" .IX Subsection "Version 1.04 (dpkg 1.22.2)" New types: CTRL_TMPL_SRC, CTRL_TMPL_PKG, CTRL_REPO_SRC, CTRL_REPO_PKG, CTRL_DSC, CTRL_DEB. .SS "Version 1.03 (dpkg 1.18.11)" .IX Subsection "Version 1.03 (dpkg 1.18.11)" New type: CTRL_FILE_BUILDINFO. .SS "Version 1.02 (dpkg 1.18.8)" .IX Subsection "Version 1.02 (dpkg 1.18.8)" New type: CTRL_TESTS. .SS "Version 1.01 (dpkg 1.18.5)" .IX Subsection "Version 1.01 (dpkg 1.18.5)" New types: CTRL_REPO_RELEASE, CTRL_COPYRIGHT_HEADER, CTRL_COPYRIGHT_FILES, CTRL_COPYRIGHT_LICENSE. .SS "Version 1.00 (dpkg 1.15.6)" .IX Subsection "Version 1.00 (dpkg 1.15.6)" Mark the module as public.