187 lines
5.0 KiB
HTML
187 lines
5.0 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Dpkg::Control::FieldsCore</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Dpkg::Control::FieldsCore</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::FieldsCore - manage (list of official) control fields
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
The modules contains a list of fieldnames with associated meta-data explaining
|
|
in which type of control information they are allowed. The types are the
|
|
CTRL_* constants exported by Dpkg::Control.
|
|
<A NAME="lbAD"> </A>
|
|
<H2>FUNCTIONS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">$f = field_capitalize($field_name)<DD>
|
|
|
|
|
|
|
|
|
|
Returns the field name properly capitalized. All characters are lowercase,
|
|
except the first of each word (words are separated by a hyphen in field names).
|
|
<DT id="2">field_is_official($fname)<DD>
|
|
|
|
|
|
Returns true if the field is official and known.
|
|
<DT id="3">field_is_allowed_in($fname, @types)<DD>
|
|
|
|
|
|
|
|
|
|
Returns true (1) if the field <TT>$fname</TT> is allowed in all the types listed in
|
|
the list. Note that you can use type sets instead of individual types (ex:
|
|
<FONT SIZE="-1">CTRL_FILE_CHANGES</FONT> | <FONT SIZE="-1">CTRL_CHANGELOG</FONT>).
|
|
|
|
|
|
<P>
|
|
|
|
|
|
field_allowed_in(A|B, C) returns true only if the field is allowed in C
|
|
and either A or B.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
Undef is returned for non-official fields.
|
|
<DT id="4">field_transfer_single($from, $to, $field)<DD>
|
|
|
|
|
|
|
|
|
|
If appropriate, copy the value of the field named <TT>$field</TT> taken from the
|
|
<TT>$from</TT> Dpkg::Control object to the <TT>$to</TT> Dpkg::Control object.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
Official fields are copied only if the field is allowed in both types of
|
|
objects. Custom fields are treated in a specific manner. When the target
|
|
is not among <FONT SIZE="-1">CTRL_PKG_SRC, CTRL_PKG_DEB</FONT> or <FONT SIZE="-1">CTRL_FILE_CHANGES,</FONT> then they
|
|
are always copied as is (the X- prefix is kept). Otherwise they are not
|
|
copied except if the target object matches the target destination encoded
|
|
in the field name. The initial X denoting custom fields can be followed by
|
|
one or more letters among ``S'' (Source: corresponds to <FONT SIZE="-1">CTRL_PKG_SRC</FONT>), ``B''
|
|
(Binary: corresponds to <FONT SIZE="-1">CTRL_PKG_DEB</FONT>) or ``C'' (Changes: corresponds to
|
|
<FONT SIZE="-1">CTRL_FILE_CHANGES</FONT>).
|
|
|
|
|
|
<P>
|
|
|
|
|
|
Returns undef if nothing has been copied or the name of the new field
|
|
added to <TT>$to</TT> otherwise.
|
|
<DT id="5">field_transfer_all($from, $to)<DD>
|
|
|
|
|
|
|
|
|
|
Transfer all appropriate fields from <TT>$from</TT> to <TT>$to</TT>. Calls
|
|
<B>field_transfer_single()</B> on all fields available in <TT>$from</TT>.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
Returns the list of fields that have been added to <TT>$to</TT>.
|
|
<DT id="6">field_ordered_list($type)<DD>
|
|
|
|
|
|
Returns an ordered list of fields for a given type of control information.
|
|
This list can be used to output the fields in a predictable order.
|
|
The list might be empty for types where the order does not matter much.
|
|
<DT id="7"><B>field_list_src_dep()</B><DD>
|
|
|
|
|
|
List of fields that contains dependencies-like information in a source
|
|
Debian package.
|
|
<DT id="8"><B>field_list_pkg_dep()</B><DD>
|
|
|
|
|
|
List of fields that contains dependencies-like information in a binary
|
|
Debian package. The fields that express real dependencies are sorted from
|
|
the stronger to the weaker.
|
|
<DT id="9">field_get_dep_type($field)<DD>
|
|
|
|
|
|
Return the type of the dependency expressed by the given field. Can
|
|
either be ``normal'' for a real dependency field (Pre-Depends, Depends, ...)
|
|
or ``union'' for other relation fields sharing the same syntax (Conflicts,
|
|
Breaks, ...). Returns undef for fields which are not dependencies.
|
|
<DT id="10">field_get_sep_type($field)<DD>
|
|
|
|
|
|
Return the type of the field value separator. Can be one of <FONT SIZE="-1">FIELD_SEP_UNKNOWN,
|
|
FIELD_SEP_SPACE, FIELD_SEP_COMMA</FONT> or <FONT SIZE="-1">FIELD_SEP_LINE.</FONT>
|
|
<DT id="11">field_register($field, $allowed_types, %opts)<DD>
|
|
|
|
|
|
|
|
|
|
Register a new field as being allowed in control information of specified
|
|
types. <TT>%opts</TT> is optional
|
|
<DT id="12">field_insert_after($type, $ref, @fields)<DD>
|
|
|
|
|
|
|
|
|
|
Place field after another one ($ref) in output of control information of
|
|
type <TT>$type</TT>.
|
|
<DT id="13">field_insert_before($type, $ref, @fields)<DD>
|
|
|
|
|
|
|
|
|
|
Place field before another one ($ref) in output of control information of
|
|
type <TT>$type</TT>.
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>CHANGES</H2>
|
|
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Version 1.00 (dpkg 1.17.0)</H3>
|
|
|
|
|
|
|
|
Mark the module as public.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="14"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="15"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DT id="16"><A HREF="#lbAD">FUNCTIONS</A><DD>
|
|
<DT id="17"><A HREF="#lbAE">CHANGES</A><DD>
|
|
<DL>
|
|
<DT id="18"><A HREF="#lbAF">Version 1.00 (dpkg 1.17.0)</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:38 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|