From cf88cb54bfc44e8a48eacc3bd6e852d7413780f7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 6 Aug 2011 18:58:55 -0400 Subject: dpkg-buildflags is only used to set environment in v9 To avoid re-breaking packages that were already broken a first time by dpkg-buildpackage unconditionally setting the environment, and unbroke it by unsetting variables in the rules file. (Example: numpy) --- Debian/Debhelper/Dh_Lib.pm | 3 +-- debhelper.pod | 10 ++++++---- debian/changelog | 9 +++++++-- dh | 3 --- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index 174970b0..5a7c3e4a 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -903,8 +903,7 @@ sub cross_command { # Sets environment variables from dpkg-buildflags. Avoids changing # any existing environment variables. sub set_buildflags { - # optimisation - return if $ENV{DH_INTERNAL_BUILDFLAGS}; + return if $ENV{DH_INTERNAL_BUILDFLAGS} || compat(8); $ENV{DH_INTERNAL_BUILDFLAGS}=1; eval "use Dpkg::BuildFlags"; diff --git a/debhelper.pod b/debhelper.pod index 9000d69a..34a16a35 100644 --- a/debhelper.pod +++ b/debhelper.pod @@ -191,10 +191,6 @@ in ALL packages acted on, not just the first. =head1 BUILD SYSTEM OPTIONS -All of the BI<*> debhelper programs set environment variables -listed by B, unless they are already set. They -support DEB_BUILD_OPTIONS=noopt too. - The following command line options are supported by all of the BI<*> debhelper programs. These programs support a variety of build systems, and normally heuristically determine which to use, and how to use them. @@ -489,6 +485,12 @@ in --libexecdir when using autoconf. B does not default to enabling --with=python-support +=item - + +All of the BI<*> debhelper programs and B set +environment variables listed by B, unless +they are already set. They support DEB_BUILD_OPTIONS=noopt too. + =back =back diff --git a/debian/changelog b/debian/changelog index 02342e74..ffc30784 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -debhelper (8.9.4) UNRELEASED; urgency=low +debhelper (8.9.4) unstable; urgency=low * dh: The --before --after --until and --remaining options are deprecated. Use override targets instead. @@ -8,8 +8,13 @@ debhelper (8.9.4) UNRELEASED; urgency=low (Modestas Vainius) Closes: #601590 * dh_auto_test: Run cmake tests in parallel when allowed by DEB_BUILD_OPTIONS. (Modestas Vainius) Closes: #587885 + * dpkg-buildflags is only used to set environment in v9, to avoid + re-breaking packages that were already broken a first time by + dpkg-buildpackage unconditionally setting the environment, and + worked around that by unsetting variables in the rules file. + (Example: numpy) - -- Joey Hess Fri, 05 Aug 2011 10:58:36 -0400 + -- Joey Hess Sat, 06 Aug 2011 18:58:59 -0400 debhelper (8.9.3) unstable; urgency=low diff --git a/dh b/dh index 474cba88..c66d987b 100755 --- a/dh +++ b/dh @@ -283,9 +283,6 @@ options can override this behavior. A sequence can also run dependent targets in debian/rules. For example, the "binary" sequence runs the "install" target. -B sets environment variables listed by B, unless -they are already set. It supports DEB_BUILD_OPTIONS=noopt too. - B uses the B environment variable to pass information through to debhelper commands that are run inside override targets. The contents (and indeed, existence) of this environment variable, as the name -- cgit v1.2.3