diff options
4 files changed, 14 insertions, 11 deletions
diff --git a/Debian/Debhelper/ b/Debian/Debhelper/
index 174970b..5a7c3e4 100644
--- a/Debian/Debhelper/
+++ b/Debian/Debhelper/
@@ -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} || compat(8);
eval "use Dpkg::BuildFlags";
diff --git a/debhelper.pod b/debhelper.pod
index 9000d69..34a16a3 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -191,10 +191,6 @@ in ALL packages acted on, not just the first.
-All of the B<dh_auto_>I<*> debhelper programs set environment variables
-listed by B<dpkg-buildflags>, unless they are already set. They
-support DEB_BUILD_OPTIONS=noopt too.
The following command line options are supported by all of the B<dh_auto_>I<*>
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<dh> does not default to enabling --with=python-support
+=item -
+All of the B<dh_auto_>I<*> debhelper programs and B<dh> set
+environment variables listed by B<dpkg-buildflags>, unless
+they are already set. They support DEB_BUILD_OPTIONS=noopt too.
diff --git a/debian/changelog b/debian/changelog
index 02342e7..ffc3078 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 474cba8..c66d987 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<dh> sets environment variables listed by B<dpkg-buildflags>, unless
-they are already set. It supports DEB_BUILD_OPTIONS=noopt too.
B<dh> uses the B<DH_INTERNAL_OPTIONS> 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