]> git.donarmstrong.com Git - debhelper.git/commitdiff
dpkg-buildflags is only used to set environment in v9
authorJoey Hess <joey@kitenet.net>
Sat, 6 Aug 2011 22:58:55 +0000 (18:58 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 6 Aug 2011 22:59:43 +0000 (18:59 -0400)
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
debhelper.pod
debian/changelog
dh

index 174970b010c052966e27e551a28bdd568dd907cf..5a7c3e4a696172de077ba3f387241d0fa162517b 100644 (file)
@@ -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";
index 9000d69aa63991810b1bc98aefc943bd9f328680..34a16a3512d8c2b65e0355f87e3bfb7261d1bad1 100644 (file)
@@ -191,10 +191,6 @@ in ALL packages acted on, not just the first.
 
 =head1 BUILD SYSTEM OPTIONS
 
-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.
+
 =back
 
 =back
index 02342e74810b1a0dabab6e5e9ecce6e12b43980c..ffc307849f207ea62907179e8b37303cc01d3945 100644 (file)
@@ -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 <joeyh@debian.org>  Fri, 05 Aug 2011 10:58:36 -0400
+ -- Joey Hess <joeyh@debian.org>  Sat, 06 Aug 2011 18:58:59 -0400
 
 debhelper (8.9.3) unstable; urgency=low
 
diff --git a/dh b/dh
index 474cba88f358154226bf8eb7767ea65cac2c9a09..c66d987b625956766293cf61eb84e9faae53efaa 100755 (executable)
--- 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