1Dpkg::BuildFlags(3perl)          libdpkg-perl          Dpkg::BuildFlags(3perl)
2
3
4

NAME

6       Dpkg::BuildFlags - query build flags
7

DESCRIPTION

9       The Dpkg::BuildFlags object is used by dpkg-buildflags and can be used
10       to query the same information.
11

METHODS

13       $bf = Dpkg::BuildFlags->new()
14           Create a new Dpkg::BuildFlags object. It will be initialized based
15           on the value of several configuration files and environment
16           variables.
17
18       $bf->load_vendor_defaults()
19           Reset the flags stored to the default set provided by the vendor.
20
21       $bf->load_system_config()
22           Update flags from the system configuration.
23
24       $bf->load_user_config()
25           Update flags from the user configuration.
26
27       $bf->load_environment_config()
28           Update flags based on user directives stored in the environment.
29           See dpkg-buildflags(1) for details.
30
31       $bf->load_maintainer_config()
32           Update flags based on maintainer directives stored in the
33           environment. See dpkg-buildflags(1) for details.
34
35       $bf->load_config()
36           Call successively load_system_config(), load_user_config(),
37           load_environment_config() and load_maintainer_config() to update
38           the default build flags defined by the vendor.
39
40       $bf->set($flag, $value, $source, $maint)
41           Update the build flag $flag with value $value and record its origin
42           as $source (if defined). Record it as maintainer modified if $maint
43           is defined and true.
44
45       $bf->set_feature($area, $feature, $enabled)
46           Update the boolean state of whether a specific feature within a
47           known feature area has been enabled. The only currently known
48           feature areas are "future", "qa", "sanitize", "hardening" and
49           "reproducible".
50
51       $bf->strip($flag, $value, $source, $maint)
52           Update the build flag $flag by stripping the flags listed in $value
53           and record its origin as $source (if defined). Record it as
54           maintainer modified if $maint is defined and true.
55
56       $bf->append($flag, $value, $source, $maint)
57           Append the options listed in $value to the current value of the
58           flag $flag.  Record its origin as $source (if defined). Record it
59           as maintainer modified if $maint is defined and true.
60
61       $bf->prepend($flag, $value, $source, $maint)
62           Prepend the options listed in $value to the current value of the
63           flag $flag.  Record its origin as $source (if defined). Record it
64           as maintainer modified if $maint is defined and true.
65
66       $bf->update_from_conffile($file, $source)
67           Update the current build flags based on the configuration
68           directives contained in $file. See dpkg-buildflags(1) for the
69           format of the directives.
70
71           $source is the origin recorded for any build flag set or modified.
72
73       $bf->get($flag)
74           Return the value associated to the flag. It might be undef if the
75           flag doesn't exist.
76
77       $bf->get_feature_areas()
78           Return the feature areas (i.e. the area values has_features will
79           return true for).
80
81       $bf->get_features($area)
82           Return, for the given area, a hash with keys as feature names, and
83           values as booleans indicating whether the feature is enabled or
84           not.
85
86       $bf->get_origin($flag)
87           Return the origin associated to the flag. It might be undef if the
88           flag doesn't exist.
89
90       $bf->is_maintainer_modified($flag)
91           Return true if the flag is modified by the maintainer.
92
93       $bf->has_features($area)
94           Returns true if the given area of features is known, and false
95           otherwise.  The only currently recognized feature areas are
96           "future", "qa", "sanitize", "hardening" and "reproducible".
97
98       $bf->has($option)
99           Returns a boolean indicating whether the flags exists in the
100           object.
101
102       @flags = $bf->list()
103           Returns the list of flags stored in the object.
104

CHANGES

106   Version 1.03 (dpkg 1.16.5)
107       New method: $bf->get_feature_areas() to list possible values for
108       $bf->get_features.
109
110       New method $bf->is_maintainer_modified() and new optional parameter to
111       $bf->set(), $bf->append(), $bf->prepend(), $bf->strip().
112
113   Version 1.02 (dpkg 1.16.2)
114       New methods: $bf->get_features(), $bf->has_features(),
115       $bf->set_feature().
116
117   Version 1.01 (dpkg 1.16.1)
118       New method: $bf->prepend() very similar to append(). Implement support
119       of the prepend operation everywhere.
120
121       New method: $bf->load_maintainer_config() that update the build flags
122       based on the package maintainer directives.
123
124   Version 1.00 (dpkg 1.15.7)
125       Mark the module as public.
126
127
128
1291.19.7                            2020-07-27           Dpkg::BuildFlags(3perl)
Impressum