This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=b5c80eeaf5d17825b9294f8212bfa3e65c779706 commit b5c80eeaf5d17825b9294f8212bfa3e65c779706 Author: Guillem Jover <[email protected]> AuthorDate: Mon Dec 26 00:38:53 2022 +0100 Dpkg::BuildFlags: Add a new set/get_option_value() private methods This will be used to track the values for some options, so that they can be overridden (such as the optimization level). They are private for now as it's not clear whether this interface is general enough for other uses. --- scripts/Dpkg/BuildFlags.pm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/scripts/Dpkg/BuildFlags.pm b/scripts/Dpkg/BuildFlags.pm index fb7c57a1b..82d91c08b 100644 --- a/scripts/Dpkg/BuildFlags.pm +++ b/scripts/Dpkg/BuildFlags.pm @@ -74,6 +74,7 @@ sub _init_vendor_defaults { my $self = shift; $self->{features} = {}; + $self->{optvals} = {}; $self->{flags} = { ASFLAGS => '', CPPFLAGS => '', @@ -295,6 +296,32 @@ sub use_feature { return 1; } +=item $bf->set_option_value($option, $value) + +B<Private> method to set the value of a build option. +Do not use outside of the dpkg project. + +=cut + +sub set_option_value { + my ($self, $option, $value) = @_; + + $self->{optvals}{$option} = $value; +} + +=item $bf->get_option_value($option) + +B<Private> method to get the value of a build option. +Do not use outside of the dpkg project. + +=cut + +sub get_option_value { + my ($self, $option) = @_; + + return $self->{optvals}{$option}; +} + =item $bf->strip($flag, $value, $source, $maint) Update the build flag $flag by stripping the flags listed in $value and -- Dpkg.Org's dpkg

