155 lines
3.3 KiB
HTML
155 lines
3.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Dpkg::Control::Info</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Dpkg::Control::Info</H1>
|
|
Section: libdpkg-perl (3perl)<BR>Updated: 2020-03-23<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
Dpkg::Control::Info - parse files like debian/control
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
It provides an object to access data of files that follow the same
|
|
syntax as <I>debian/control</I>.
|
|
<A NAME="lbAD"> </A>
|
|
<H2>METHODS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">$c = Dpkg::Control::Info->new(%opts)<DD>
|
|
|
|
|
|
|
|
|
|
Create a new Dpkg::Control::Info object. Loads the file from the filename
|
|
option, if no option is specified filename defaults to <I>debian/control</I>.
|
|
If a scalar is passed instead, it will be used as the filename. If filename
|
|
is ``-'', it parses the standard input. If filename is undef no loading will
|
|
be performed.
|
|
<DT id="2">$c-><B>reset()</B><DD>
|
|
|
|
|
|
|
|
|
|
Resets what got read.
|
|
<DT id="3">$c->parse($fh, $description)<DD>
|
|
|
|
|
|
|
|
|
|
Parse a control file from the given filehandle. Exits in case of errors.
|
|
<TT>$description</TT> is used to describe the filehandle, ideally it's a filename
|
|
or a description of where the data comes from. It is used in error messages.
|
|
The data in the object is reset before parsing new control files.
|
|
<DT id="4">$c->load($file)<DD>
|
|
|
|
|
|
|
|
|
|
Load the content of <TT>$file</TT>. Exits in case of errors. If file is ``-'', it
|
|
loads from the standard input.
|
|
<DT id="5">$c->[0]<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="6">$c-><B>get_source()</B><DD>
|
|
|
|
|
|
|
|
|
|
|
|
Returns a Dpkg::Control object containing the fields concerning the
|
|
source package.
|
|
<DT id="7">$c->get_pkg_by_idx($idx)<DD>
|
|
|
|
|
|
|
|
|
|
Returns a Dpkg::Control object containing the fields concerning the binary
|
|
package numbered <TT>$idx</TT> (starting at 1).
|
|
<DT id="8">$c->get_pkg_by_name($name)<DD>
|
|
|
|
|
|
|
|
|
|
Returns a Dpkg::Control object containing the fields concerning the binary
|
|
package named <TT>$name</TT>.
|
|
<DT id="9">$c-><B>get_packages()</B><DD>
|
|
|
|
|
|
|
|
|
|
Returns a list containing the Dpkg::Control objects for all binary packages.
|
|
<DT id="10">$str = $c->output([$fh])<DD>
|
|
|
|
|
|
|
|
|
|
Return the content info into a string. If <TT>$fh</TT> is specified print it into
|
|
the filehandle.
|
|
<DT id="11">"$c"<DD>
|
|
|
|
|
|
|
|
|
|
Return a string representation of the content.
|
|
<DT id="12">@{$c}<DD>
|
|
|
|
|
|
Return a list of Dpkg::Control objects, the first one is corresponding to
|
|
source information and the following ones are the binary packages
|
|
information.
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>CHANGES</H2>
|
|
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Version 1.01 (dpkg 1.18.0)</H3>
|
|
|
|
|
|
|
|
New argument: The <TT>$c</TT>-><B>new()</B> constructor accepts an <TT>%opts</TT> argument.
|
|
<A NAME="lbAG"> </A>
|
|
<H3>Version 1.00 (dpkg 1.15.6)</H3>
|
|
|
|
|
|
|
|
Mark the module as public.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="13"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="14"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DT id="15"><A HREF="#lbAD">METHODS</A><DD>
|
|
<DT id="16"><A HREF="#lbAE">CHANGES</A><DD>
|
|
<DL>
|
|
<DT id="17"><A HREF="#lbAF">Version 1.01 (dpkg 1.18.0)</A><DD>
|
|
<DT id="18"><A HREF="#lbAG">Version 1.00 (dpkg 1.15.6)</A><DD>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:39 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|