Package: dpkg-dev
Version: 1.14.14
Severity: important

Hi,

dpkg-buildpackage now handles parallel builds with the following code:
if ($parallel || $ENV{DEB_BUILD_OPTIONS}) {
    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";
        }
    }
    $build_opts->{parallel} = $parallel;
    Dpkg::BuildOptions::set($build_opts);
}

However, many packages don't support parallel building yet. I can see
two use cases for parallel builds:
(1) a developper that knows that his package builds fine in parallel,
and that uses dpkg-buildpackage -j.
(2) archive-wide rebuilds, or fast buildds.

In case (2), the current code is harmful. The safe way to do parallel
builds was to set parallel=<n> in DEB_BUILD_OPTIONS, so the 10 or 20
packages where parallel building is supported can use it, and all the
others will just build using one thread.

I think that the current code should be changed to:
--- dpkg-buildpackage.pl.orig   2008-01-01 23:06:39.000000000 +0100
+++ dpkg-buildpackage.pl        2008-01-01 23:07:41.000000000 +0100
@@ -240,10 +240,9 @@
     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') {


This way, dpkg-buildpackage would simply ignore parallel=<n> in
DEB_BUILD_OPTIONS.

An example of package that supports parallel=<n> but fails to build with
dpkg-buildpackage -j is glibc.

This change is very annoying: it makes it impossible for me to run
archive-wide rebuilds using parallel=n...
-- 
| Lucas Nussbaum
| [EMAIL PROTECTED]   http://www.lucas-nussbaum.net/ |
| jabber: [EMAIL PROTECTED]             GPG: 1024D/023B3F4F |




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to