1Dpkg::Control::FieldsCore(3perl) libdpkg-perl Dpkg::Control::FieldsCore(3perl)
2
3
4

NAME

6       Dpkg::Control::FieldsCore - manage (list of official) control fields
7

DESCRIPTION

9       The modules contains a list of fieldnames with associated meta-data
10       explaining in which type of control information they are allowed. The
11       types are the CTRL_* constants exported by Dpkg::Control.
12

FUNCTIONS

14       $f = field_capitalize($field_name)
15           Returns the field name properly capitalized. All characters are
16           lowercase, except the first of each word (words are separated by a
17           hyphen in field names).
18
19       field_is_official($fname)
20           Returns true if the field is official and known.
21
22       field_is_allowed_in($fname, @types)
23           Returns true (1) if the field $fname is allowed in all the types
24           listed in the list. Note that you can use type sets instead of
25           individual types (ex: CTRL_FILE_CHANGES | CTRL_CHANGELOG).
26
27           field_allowed_in(A|B, C) returns true only if the field is allowed
28           in C and either A or B.
29
30           Undef is returned for non-official fields.
31
32       field_transfer_single($from, $to, $field)
33           If appropriate, copy the value of the field named $field taken from
34           the $from Dpkg::Control object to the $to Dpkg::Control object.
35
36           Official fields are copied only if the field is allowed in both
37           types of objects. Custom fields are treated in a specific manner.
38           When the target is not among CTRL_PKG_SRC, CTRL_PKG_DEB or
39           CTRL_FILE_CHANGES, then they are always copied as is (the X- prefix
40           is kept). Otherwise they are not copied except if the target object
41           matches the target destination encoded in the field name. The
42           initial X denoting custom fields can be followed by one or more
43           letters among "S" (Source: corresponds to CTRL_PKG_SRC), "B"
44           (Binary: corresponds to CTRL_PKG_DEB) or "C" (Changes: corresponds
45           to CTRL_FILE_CHANGES).
46
47           Returns undef if nothing has been copied or the name of the new
48           field added to $to otherwise.
49
50       field_transfer_all($from, $to)
51           Transfer all appropriate fields from $from to $to. Calls
52           field_transfer_single() on all fields available in $from.
53
54           Returns the list of fields that have been added to $to.
55
56       field_ordered_list($type)
57           Returns an ordered list of fields for a given type of control
58           information.  This list can be used to output the fields in a
59           predictable order.  The list might be empty for types where the
60           order does not matter much.
61
62       field_list_src_dep()
63           List of fields that contains dependencies-like information in a
64           source Debian package.
65
66       field_list_pkg_dep()
67           List of fields that contains dependencies-like information in a
68           binary Debian package. The fields that express real dependencies
69           are sorted from the stronger to the weaker.
70
71       field_get_dep_type($field)
72           Return the type of the dependency expressed by the given field. Can
73           either be "normal" for a real dependency field (Pre-Depends,
74           Depends, ...)  or "union" for other relation fields sharing the
75           same syntax (Conflicts, Breaks, ...). Returns undef for fields
76           which are not dependencies.
77
78       field_get_sep_type($field)
79           Return the type of the field value separator. Can be one of
80           FIELD_SEP_UNKNOWN, FIELD_SEP_SPACE, FIELD_SEP_COMMA or
81           FIELD_SEP_LINE.
82
83       field_register($field, $allowed_types, %opts)
84           Register a new field as being allowed in control information of
85           specified types. %opts is optional
86
87       field_insert_after($type, $ref, @fields)
88           Place field after another one ($ref) in output of control
89           information of type $type.
90
91       field_insert_before($type, $ref, @fields)
92           Place field before another one ($ref) in output of control
93           information of type $type.
94

CHANGES

96   Version 1.00 (dpkg 1.17.0)
97       Mark the module as public.
98
99
100
1011.19.7                            2020-02-18  Dpkg::Control::FieldsCore(3perl)
Impressum