Dpkg::Vendor::Ubuntu: Fix lto feature to honor DEB_BUILD_OPTIONS
commitc5e6822d598a34d93001450c282c33f22b18efde
authorGuillem Jover <guillem@debian.org>
Thu, 19 Jan 2023 08:44:12 +0000 (19 09:44 +0100)
committerGuillem Jover <guillem@debian.org>
Tue, 24 Jan 2023 22:27:09 +0000 (24 23:27 +0100)
treee1a72627e1a0db70a36f29da13f3fb7156287d28
parente895de05f3511e5c5818366749b293af02fdaf11
Dpkg::Vendor::Ubuntu: Fix lto feature to honor DEB_BUILD_OPTIONS

The recently added lto handling for Ubuntu, did not take into account
that the DEB_BUILD_OPTIONS and DEB_BUILD_MAINT_OPTIONS environment
variables are parsed and their options applied just after setting the
defaults, and before applying any arch-specific mask.

We add a new init_build_features() internal method, which sits between
these two actions, so that the Ubuntu vendor module can modify the
defaults before any user or maintainer override are applied.

Fixes: commit df7627acfadca528e52147cc777fa01b2ed802b4
Fixes: https://bugs.launchpad.net/bugs/2002582
scripts/Dpkg/Vendor/Debian.pm
scripts/Dpkg/Vendor/Ubuntu.pm