Author: adam-guest
Date: 2008-05-21 22:10:03 +0000 (Wed, 21 May 2008)
New Revision: 1456

Modified:
   trunk/debian/changelog
   trunk/scripts/debdiff.pl
Log:
debdiff: Don't apply patches when extracting a Format 3.0 (quilt) source
package, to minimise noise in the diffs (Closes: #475506)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-05-20 17:30:28 UTC (rev 1455)
+++ trunk/debian/changelog      2008-05-21 22:10:03 UTC (rev 1456)
@@ -1,5 +1,7 @@
 devscripts (2.10.29) UNRELEASED; urgency=low
 
+  * debdiff: Don't apply patches when extracting a Format 3.0 (quilt) source
+    package, to minimise noise in the diffs (Closes: #475506)
   * mergechanges: Allow changes files with Formats of 1.7 and 1.8 to be merged,
     by removing the Checksums-* fields from the Format: 1.8 files. The result
     will be a valid Format: 1.7 changes file. (Closes: #481585)

Modified: trunk/scripts/debdiff.pl
===================================================================
--- trunk/scripts/debdiff.pl    2008-05-20 17:30:28 UTC (rev 1455)
+++ trunk/scripts/debdiff.pl    2008-05-21 22:10:03 UTC (rev 1456)
@@ -387,7 +387,7 @@
     # Compare source packages
     my $pwd = cwd;
 
-    my (@origs, @diffs, @dscs);
+    my (@origs, @diffs, @dscs, @dscformats);
     foreach my $i (1,2) {
        my $dsc = shift;
        chdir dirname($dsc)
@@ -402,6 +402,8 @@
            if (/^Files:/) {
                $infiles=1;
                next;
+           } elsif (/^Format: (.*)$/) {
+               $dscformats[$i] = $1;
            }
            next unless $infiles;
            last if /^\s*$/;
@@ -474,7 +476,9 @@
        mktmpdirs();
        for my $i (1,2) {
            no strict 'refs';
-           my $cmd = qq(cd ${"dir$i"} && dpkg-source -x $dscs[$i] >/dev/null);
+           my @opts = ('-x');
+           push (@opts, '--skip-patches') if $dscformats[$i] eq '3.0 (quilt)';
+           my $cmd = qq(cd ${"dir$i"} && dpkg-source @opts $dscs[$i] 
>/dev/null);
            system $cmd;
            if ($? != 0) {
                    my $dir = dirname $dscs[1] if $i == 2;
@@ -483,7 +487,7 @@
                    system $cmdx;
                    fatal "$cmd failed" if $? != 0;
                    my $dscx = basename $dscs[$i];
-                   $cmdx = qq(cp $diffs[$i] ${"dir$i"} && cp $dscs[$i] 
${"dir$i"} && cd ${"dir$i"} && dpkg-source -x $dscx > /dev/null);
+                   $cmdx = qq(cp $diffs[$i] ${"dir$i"} && cp $dscs[$i] 
${"dir$i"} && cd ${"dir$i"} && dpkg-source @opts $dscx > /dev/null);
                    system $cmdx;
                    fatal "$cmd failed" if $? != 0;
            }



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to