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