1Dpkg::BuildFlags(3perl) libdpkg-perl Dpkg::BuildFlags(3perl)
2
3
4
6 Dpkg::BuildFlags - query build flags
7
9 This class is used by dpkg-buildflags and can be used to query the same
10 information.
11
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->unset($flag)
41 Unset the build flag $flag, so that it will not be known anymore.
42
43 $bf->set($flag, $value, $source, $maint)
44 Update the build flag $flag with value $value and record its origin
45 as $source (if defined). Record it as maintainer modified if $maint
46 is defined and true.
47
48 $bf->set_feature($area, $feature, $enabled)
49 Update the boolean state of whether a specific feature within a
50 known feature area has been enabled. The only currently known
51 feature areas are "future", "qa", "sanitize", "hardening" and
52 "reproducible".
53
54 $bf->strip($flag, $value, $source, $maint)
55 Update the build flag $flag by stripping the flags listed in $value
56 and record its origin as $source (if defined). Record it as
57 maintainer modified if $maint is defined and true.
58
59 $bf->append($flag, $value, $source, $maint)
60 Append the options listed in $value to the current value of the
61 flag $flag. Record its origin as $source (if defined). Record it
62 as maintainer modified if $maint is defined and true.
63
64 $bf->prepend($flag, $value, $source, $maint)
65 Prepend the options listed in $value to the current value of the
66 flag $flag. Record its origin as $source (if defined). Record it
67 as maintainer modified if $maint is defined and true.
68
69 $bf->update_from_conffile($file, $source)
70 Update the current build flags based on the configuration
71 directives contained in $file. See dpkg-buildflags(1) for the
72 format of the directives.
73
74 $source is the origin recorded for any build flag set or modified.
75
76 $bf->get($flag)
77 Return the value associated to the flag. It might be undef if the
78 flag doesn't exist.
79
80 $bf->get_feature_areas()
81 Return the feature areas (i.e. the area values has_features will
82 return true for).
83
84 $bf->get_features($area)
85 Return, for the given area, a hash with keys as feature names, and
86 values as booleans indicating whether the feature is enabled or
87 not.
88
89 $bf->get_origin($flag)
90 Return the origin associated to the flag. It might be undef if the
91 flag doesn't exist.
92
93 $bf->is_maintainer_modified($flag)
94 Return true if the flag is modified by the maintainer.
95
96 $bf->has_features($area)
97 Returns true if the given area of features is known, and false
98 otherwise. The only currently recognized feature areas are
99 "future", "qa", "sanitize", "hardening" and "reproducible".
100
101 $bf->has($option)
102 Returns a boolean indicating whether the flags exists in the
103 object.
104
105 @flags = $bf->list()
106 Returns the list of flags stored in the object.
107
109 Version 1.04 (dpkg 1.20.0)
110 New method: $bf->unset().
111
112 Version 1.03 (dpkg 1.16.5)
113 New method: $bf->get_feature_areas() to list possible values for
114 $bf->get_features.
115
116 New method $bf->is_maintainer_modified() and new optional parameter to
117 $bf->set(), $bf->append(), $bf->prepend(), $bf->strip().
118
119 Version 1.02 (dpkg 1.16.2)
120 New methods: $bf->get_features(), $bf->has_features(),
121 $bf->set_feature().
122
123 Version 1.01 (dpkg 1.16.1)
124 New method: $bf->prepend() very similar to append(). Implement support
125 of the prepend operation everywhere.
126
127 New method: $bf->load_maintainer_config() that update the build flags
128 based on the package maintainer directives.
129
130 Version 1.00 (dpkg 1.15.7)
131 Mark the module as public.
132
133
134
1351.20.9 2021-07-21 Dpkg::BuildFlags(3perl)