The following commit has been merged in the master branch:
commit cfb793a29575db619dc86ad6286ddffd190982d5
Author: James Vega <james...@debian.org>
Date:   Mon Jul 11 22:23:27 2011 -0400

    debuild: Call dpkg-source --before-build/--after-build
    
    Newer source formats can perform actions (such as (un)applying a series of 
quilt
    patches) before/after the build takes place.  Calling dpkg-source ensures 
this
    behavior is maintained when we're emulating dpkg-buildpackage.
    
    Closes: #628481
    Signed-off-by: James Vega <james...@debian.org>

diff --git a/debian/changelog b/debian/changelog
index b98af6f..5e31fcc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ devscripts (2.11.1) UNRELEASED; urgency=low
     Christian Kastner for the patch.  (Closes: #628076)
   * mergechanges: Do not drop fields when the Files/Checksums-* fields are not
     at the end of the source files.  (Closes: #625620)
+  * debuild: Call dpkg-source --before-build/--after-build when emulating
+    dpkg-buildpackage.  (Closes: #628481)
 
   [ Christoph Berg ]
   * dscextract: new script, extracts a single file from a Debian source
diff --git a/scripts/debuild.pl b/scripts/debuild.pl
index 2ec7355..ac149a1 100755
--- a/scripts/debuild.pl
+++ b/scripts/debuild.pl
@@ -787,6 +787,8 @@ if ($command_version eq 'dpkg') {
     my $compression='';
     my $comp_level='';
 
+    my $dirn = basename(cwd());
+
     # and one for us
     my @debsign_opts = ();
     # and one for dpkg-cross if needed
@@ -1075,6 +1077,10 @@ if ($command_version eq 'dpkg') {
            }
        }
 
+       chdir '..' or fatal "can't chdir ..: $!";
+       system_withecho('dpkg-source', '--before-build', $dirn);
+       chdir $dirn or fatal "can't chdir $dirn: $!";
+
        # First dpkg-buildpackage action: run dpkg-checkbuilddeps
        if ($checkbuilddep) {
            if ($binarytarget eq 'binary-arch') {
@@ -1108,7 +1114,6 @@ EOT
 
        # Next dpkg-buildpackage action: dpkg-source
        if (! $binaryonly) {
-           my $dirn = basename(cwd());
            my @cmd = (qw(dpkg-source));
            push @cmd, @passopts;
            push @cmd, $diffignore if $diffignore;
@@ -1188,6 +1193,9 @@ EOT
            }
        }
 
+       chdir '..' or fatal "can't chdir ..: $!";
+       system_withecho('dpkg-source', '--after-build', $dirn);
+       chdir $dirn or fatal "can't chdir $dirn: $!";
 
        # identify the files listed in $changes; this will be used for the
        # emulation of the dpkg-buildpackage fileomitted() function

-- 
Git repository for devscripts


-- 
To unsubscribe, send mail to pkg-devscripts-unsubscr...@teams.debian.net.

Reply via email to