Преглед на файлове

Do not automatically enable -j if DEB_BUILD_OPTIONS contains parallel=n

Allow overriding its value from the environment. Closes: #458589
Guillem Jover преди 18 години
родител
ревизия
a24fa4c525
променени са 5 файла, в които са добавени 22 реда и са изтрити 12 реда
  1. 6 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 4 0
      man/ChangeLog
  4. 3 3
      man/dpkg-buildpackage.1
  5. 7 9
      scripts/dpkg-buildpackage.pl

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2008-01-03  Guillem Jover  <guillem@debian.org>
+
+	* scripts/dpkg-buildpackage.pl: Do not automatically enable '-j'
+	if DEB_BUILD_OPTIONS contains parallel=n, and allow overriding
+	its value from the environment.
+
 2008-01-02  Guillem Jover  <guillem@debian.org>
 
 	* utils/start-stop-daemon.c [!__GNUC__] (fatal, badusage): Remove

+ 2 - 0
debian/changelog

@@ -29,6 +29,8 @@ dpkg (1.14.15) UNRELEASED; urgency=low
     compressed sources. Closes: #458519
   * Promote bzip2 Recommends to Depends for dpkg-dev. Closes: #458521
   * Add lzma to dpkg-dev Depends.
+  * Do not automatically enable -j if DEB_BUILD_OPTIONS contains parallel=n,
+    and allow overriding its value from the environment. Closes: #458589
 
   [ Updated dpkg translations ]
   * Norwegian Bokmål (Hans Fredrik Nordhaug). Closes: #457918, #458732

+ 4 - 0
man/ChangeLog

@@ -1,3 +1,7 @@
+2008-01-03  Guillem Jover  <guillem@debian.org>
+
+	* dpkg-buildpackage.1: Document new -j behaviour.
+
 2008-01-02  Christian Perrier  <bubulle@debian.org>
 
 	* po/fr.po: converted to UTF-8. Updated to 1171t139f74u

+ 3 - 3
man/dpkg-buildpackage.1

@@ -1,4 +1,4 @@
-.TH dpkg\-buildpackage 1 "2007-09-28" "Debian Project" "dpkg utilities"
+.TH dpkg\-buildpackage 1 "2008-01-03" "Debian Project" "dpkg utilities"
 .SH NAME
 dpkg\-buildpackage \- build binary or source packages from sources
 .
@@ -55,8 +55,8 @@ environment variable, which should cause all subsequent make
 invocations to inherit the option. Also adds \fBparallel=\fP\fIjobs\fP
 to the DEB_BUILD_OPTIONS environment variable which allows
 debian/rules files to use this information for their own purposes.
-If no \fB-j\fP option is given, an existing value for \fBparallel\fP will be
-honoured and added to MAKEFLAGS.
+The \fBparallel=\fP\fIjobs\fP in DEB_BUILD_OPTIONS environment variable
+will override the \fB-j\fP value if this option is given.
 .TP
 .BI \-v version
 Use changelog information from all versions strictly later than

+ 7 - 9
scripts/dpkg-buildpackage.pl

@@ -241,17 +241,15 @@ if ($signcommand && ($signinterface !~ /^(gpg|pgp)$/)) {
     warning(_g("unknown sign command, assuming pgp style interface"));
 }
 
-if ($parallel || $ENV{DEB_BUILD_OPTIONS}) {
+if ($parallel) {
     my $build_opts = Dpkg::BuildOptions::parse();
 
-    $parallel ||= $build_opts->{parallel};
-    if (defined $parallel) {
-	$ENV{MAKEFLAGS} ||= '';
-	if ($parallel eq '-1') {
-	    $ENV{MAKEFLAGS} .= " -j";
-	} else {
-	    $ENV{MAKEFLAGS} .= " -j$parallel";
-	}
+    $parallel = $build_opts->{parallel} if (defined $build_opts->{parallel});
+    $ENV{MAKEFLAGS} ||= '';
+    if ($parallel eq '-1') {
+	$ENV{MAKEFLAGS} .= " -j";
+    } else {
+	$ENV{MAKEFLAGS} .= " -j$parallel";
     }
     $build_opts->{parallel} = $parallel;
     Dpkg::BuildOptions::set($build_opts);