Bill Allombert wrote:

> Hello Dpkg maintainers,
>
> Could you fix this issue soon so that it does not interfer with the
> release of Wheezy ?

Sounds good to me.  Raphaƫl, Joey, any thoughts?

-- >8 --
Subject: dpkg-buildpackage: do not export build flags

For over 10 years policy has required packages to set compiler flags
such as CFLAGS based on settings in DEB_BUILD_OPTIONS, not the values
inherited from dpkg-buildpackage.  Stop exporting such variables from
dpkg-buildpackage, so packages relying on the exported variables can
be caught early in the wheezy release cycle and we can be sure
packages build correctly when using debian/rules directly.

(Often a good way to set CFLAGS reasonably is with makefile snippets
like "CFLAGS := -Wall $(dpkg-buildflags --get CFLAGS)".)

Signed-off-by: Jonathan Nieder <jrnie...@gmail.com>
---
 man/dpkg-buildpackage.1      |    8 +++-----
 scripts/dpkg-buildpackage.pl |    8 --------
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/man/dpkg-buildpackage.1 b/man/dpkg-buildpackage.1
index 6460e51..698bff4 100644
--- a/man/dpkg-buildpackage.1
+++ b/man/dpkg-buildpackage.1
@@ -231,15 +231,13 @@ Show the version and exit.
 Even if \fBdpkg\-buildpackage\fP export some variables, \fBdebian/rules\fP
 should not rely on their presence and should instead use the
 respective interface to retrieve the needed values.
+Versions of \fBdpkg\-buildpackage\fP before 1.16.1 also exported
+compiler flags such as \fBCFLAGS\fP with values as returned
+by \fBdpkg\-buildflags\fP.
 .SS Variables set by dpkg-architecture
 \fBdpkg\-architecture\fP is called with the \fB\-a\fP and \fB\-t\fP
 parameters forwarded. Any variable that is output by its \fB\-s\fP
 option is integrated in the build environment.
-.SS Compiler flags
-The \fBCFLAGS\fP, \fBCXXFLAGS\fP, \fBFFLAGS\fP, \fBCPPFLAGS\fP
-and \fBLDFLAGS\fP environment variables are set to the values
-that \fBdpkg\-buildflags\fP returned. See its manual page for more
-information.
 .
 .SH BUGS
 It should be possible to specify spaces and shell metacharacters in
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index aaea544..6eb241a 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -294,14 +294,6 @@ if (defined $parallel) {
     $build_opts->export();
 }
 
-my $build_flags = Dpkg::BuildFlags->new();
-$build_flags->load_config();
-foreach my $flag ($build_flags->list()) {
-    $ENV{$flag} = $build_flags->get($flag);
-    printf(_g("%s: export %s from dpkg-buildflags (origin: %s): %s\n"),
-          $progname, $flag, $build_flags->get_origin($flag), $ENV{$flag});
-}
-
 my $cwd = cwd();
 my $dir = basename($cwd);
 
-- 
1.7.5.1





--
To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to