.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Dpkg::BuildFlags 3perl" .TH Dpkg::BuildFlags 3perl "2019-06-03" "1.19.7" "libdpkg-perl" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Dpkg::BuildFlags \- query build flags .SH "DESCRIPTION" .IX Header "DESCRIPTION" The Dpkg::BuildFlags object is used by dpkg-buildflags and can be used to query the same information. .SH "METHODS" .IX Header "METHODS" .ie n .IP "$bf = Dpkg::BuildFlags\->\fBnew()\fR" 4 .el .IP "\f(CW$bf\fR = Dpkg::BuildFlags\->\fBnew()\fR" 4 .IX Item "$bf = Dpkg::BuildFlags->new()" Create a new Dpkg::BuildFlags object. It will be initialized based on the value of several configuration files and environment variables. .ie n .IP "$bf\->\fBload_vendor_defaults()\fR" 4 .el .IP "\f(CW$bf\fR\->\fBload_vendor_defaults()\fR" 4 .IX Item "$bf->load_vendor_defaults()" Reset the flags stored to the default set provided by the vendor. .ie n .IP "$bf\->\fBload_system_config()\fR" 4 .el .IP "\f(CW$bf\fR\->\fBload_system_config()\fR" 4 .IX Item "$bf->load_system_config()" Update flags from the system configuration. .ie n .IP "$bf\->\fBload_user_config()\fR" 4 .el .IP "\f(CW$bf\fR\->\fBload_user_config()\fR" 4 .IX Item "$bf->load_user_config()" Update flags from the user configuration. .ie n .IP "$bf\->\fBload_environment_config()\fR" 4 .el .IP "\f(CW$bf\fR\->\fBload_environment_config()\fR" 4 .IX Item "$bf->load_environment_config()" Update flags based on user directives stored in the environment. See \&\fBdpkg\-buildflags\fR\|(1) for details. .ie n .IP "$bf\->\fBload_maintainer_config()\fR" 4 .el .IP "\f(CW$bf\fR\->\fBload_maintainer_config()\fR" 4 .IX Item "$bf->load_maintainer_config()" Update flags based on maintainer directives stored in the environment. See \&\fBdpkg\-buildflags\fR\|(1) for details. .ie n .IP "$bf\->\fBload_config()\fR" 4 .el .IP "\f(CW$bf\fR\->\fBload_config()\fR" 4 .IX Item "$bf->load_config()" Call successively \fBload_system_config()\fR, \fBload_user_config()\fR, \&\fBload_environment_config()\fR and \fBload_maintainer_config()\fR to update the default build flags defined by the vendor. .ie n .IP "$bf\->set($flag, $value, $source, $maint)" 4 .el .IP "\f(CW$bf\fR\->set($flag, \f(CW$value\fR, \f(CW$source\fR, \f(CW$maint\fR)" 4 .IX Item "$bf->set($flag, $value, $source, $maint)" Update the build flag \f(CW$flag\fR with value \f(CW$value\fR and record its origin as \&\f(CW$source\fR (if defined). Record it as maintainer modified if \f(CW$maint\fR is defined and true. .ie n .IP "$bf\->set_feature($area, $feature, $enabled)" 4 .el .IP "\f(CW$bf\fR\->set_feature($area, \f(CW$feature\fR, \f(CW$enabled\fR)" 4 .IX Item "$bf->set_feature($area, $feature, $enabled)" Update the boolean state of whether a specific feature within a known feature area has been enabled. The only currently known feature areas are \*(L"future\*(R", \*(L"qa\*(R", \*(L"sanitize\*(R", \*(L"hardening\*(R" and \*(L"reproducible\*(R". .ie n .IP "$bf\->strip($flag, $value, $source, $maint)" 4 .el .IP "\f(CW$bf\fR\->strip($flag, \f(CW$value\fR, \f(CW$source\fR, \f(CW$maint\fR)" 4 .IX Item "$bf->strip($flag, $value, $source, $maint)" Update the build flag \f(CW$flag\fR by stripping the flags listed in \f(CW$value\fR and record its origin as \f(CW$source\fR (if defined). Record it as maintainer modified if \f(CW$maint\fR is defined and true. .ie n .IP "$bf\->append($flag, $value, $source, $maint)" 4 .el .IP "\f(CW$bf\fR\->append($flag, \f(CW$value\fR, \f(CW$source\fR, \f(CW$maint\fR)" 4 .IX Item "$bf->append($flag, $value, $source, $maint)" Append the options listed in \f(CW$value\fR to the current value of the flag \f(CW$flag\fR. Record its origin as \f(CW$source\fR (if defined). Record it as maintainer modified if \f(CW$maint\fR is defined and true. .ie n .IP "$bf\->prepend($flag, $value, $source, $maint)" 4 .el .IP "\f(CW$bf\fR\->prepend($flag, \f(CW$value\fR, \f(CW$source\fR, \f(CW$maint\fR)" 4 .IX Item "$bf->prepend($flag, $value, $source, $maint)" Prepend the options listed in \f(CW$value\fR to the current value of the flag \f(CW$flag\fR. Record its origin as \f(CW$source\fR (if defined). Record it as maintainer modified if \f(CW$maint\fR is defined and true. .ie n .IP "$bf\->update_from_conffile($file, $source)" 4 .el .IP "\f(CW$bf\fR\->update_from_conffile($file, \f(CW$source\fR)" 4 .IX Item "$bf->update_from_conffile($file, $source)" Update the current build flags based on the configuration directives contained in \f(CW$file\fR. See \fBdpkg\-buildflags\fR\|(1) for the format of the directives. .Sp \&\f(CW$source\fR is the origin recorded for any build flag set or modified. .ie n .IP "$bf\->get($flag)" 4 .el .IP "\f(CW$bf\fR\->get($flag)" 4 .IX Item "$bf->get($flag)" Return the value associated to the flag. It might be undef if the flag doesn't exist. .ie n .IP "$bf\->\fBget_feature_areas()\fR" 4 .el .IP "\f(CW$bf\fR\->\fBget_feature_areas()\fR" 4 .IX Item "$bf->get_feature_areas()" Return the feature areas (i.e. the area values has_features will return true for). .ie n .IP "$bf\->get_features($area)" 4 .el .IP "\f(CW$bf\fR\->get_features($area)" 4 .IX Item "$bf->get_features($area)" Return, for the given area, a hash with keys as feature names, and values as booleans indicating whether the feature is enabled or not. .ie n .IP "$bf\->get_origin($flag)" 4 .el .IP "\f(CW$bf\fR\->get_origin($flag)" 4 .IX Item "$bf->get_origin($flag)" Return the origin associated to the flag. It might be undef if the flag doesn't exist. .ie n .IP "$bf\->is_maintainer_modified($flag)" 4 .el .IP "\f(CW$bf\fR\->is_maintainer_modified($flag)" 4 .IX Item "$bf->is_maintainer_modified($flag)" Return true if the flag is modified by the maintainer. .ie n .IP "$bf\->has_features($area)" 4 .el .IP "\f(CW$bf\fR\->has_features($area)" 4 .IX Item "$bf->has_features($area)" Returns true if the given area of features is known, and false otherwise. The only currently recognized feature areas are \*(L"future\*(R", \*(L"qa\*(R", \*(L"sanitize\*(R", \&\*(L"hardening\*(R" and \*(L"reproducible\*(R". .ie n .IP "$bf\->has($option)" 4 .el .IP "\f(CW$bf\fR\->has($option)" 4 .IX Item "$bf->has($option)" Returns a boolean indicating whether the flags exists in the object. .ie n .IP "@flags = $bf\->\fBlist()\fR" 4 .el .IP "\f(CW@flags\fR = \f(CW$bf\fR\->\fBlist()\fR" 4 .IX Item "@flags = $bf->list()" Returns the list of flags stored in the object. .SH "CHANGES" .IX Header "CHANGES" .SS "Version 1.03 (dpkg 1.16.5)" .IX Subsection "Version 1.03 (dpkg 1.16.5)" New method: \f(CW$bf\fR\->\fBget_feature_areas()\fR to list possible values for \&\f(CW$bf\fR\->get_features. .PP New method \f(CW$bf\fR\->\fBis_maintainer_modified()\fR and new optional parameter to \&\f(CW$bf\fR\->\fBset()\fR, \f(CW$bf\fR\->\fBappend()\fR, \f(CW$bf\fR\->\fBprepend()\fR, \f(CW$bf\fR\->\fBstrip()\fR. .SS "Version 1.02 (dpkg 1.16.2)" .IX Subsection "Version 1.02 (dpkg 1.16.2)" New methods: \f(CW$bf\fR\->\fBget_features()\fR, \f(CW$bf\fR\->\fBhas_features()\fR, \f(CW$bf\fR\->\fBset_feature()\fR. .SS "Version 1.01 (dpkg 1.16.1)" .IX Subsection "Version 1.01 (dpkg 1.16.1)" New method: \f(CW$bf\fR\->\fBprepend()\fR very similar to \fBappend()\fR. Implement support of the prepend operation everywhere. .PP New method: \f(CW$bf\fR\->\fBload_maintainer_config()\fR that update the build flags based on the package maintainer directives. .SS "Version 1.00 (dpkg 1.15.7)" .IX Subsection "Version 1.00 (dpkg 1.15.7)" Mark the module as public.