]> err.no Git - dpkg/commitdiff
dpkg-source: Fix diff generation for filenames containing spaces
authorFrank Lichtenheld <djpig@debian.org>
Sun, 7 Oct 2007 15:10:32 +0000 (17:10 +0200)
committerFrank Lichtenheld <djpig@debian.org>
Sun, 7 Oct 2007 15:11:38 +0000 (17:11 +0200)
Include a trailing HT character in the diff labels if
the filename contains spaces. Apparantly this is
standard but undocumented diff behaviour. Based on
a patch by Marcel Toele.

ChangeLog
debian/changelog
scripts/dpkg-source.pl

index b1eafabe1f725c27e523878f7aceafe0b770162a..f301b1a5fee5f6e055f9558f8b31a63b1a0904b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-10-07  Frank Lichtenheld  <djpig@debian.org>
+           Marcel Toele  <mtoele@kern.nl>
+
+       * scripts/dpkg-source.pl (handleformat): Include
+       a trailing HT character in the diff labels if
+       the filename contains spaces. Apparantly this is
+       standard but undocumented diff behaviour.
+
 2007-09-29  Frank Lichtenheld  <djpig@debian.org>
 
        * scripts/dpkg-buildpackage.pl: Call checkversion()
index 6c33f1cb144ab00cd67aa6209e5c8f60d94e5f2e..139d1c026d711e1401c594cdcaee257ccee0955e 100644 (file)
@@ -35,6 +35,9 @@ dpkg (1.14.7) UNRELEASED; urgency=low
     Closes: #379418
   * Let dpkg-buildpackage error out early if the version number from
     the changelog is not a valid Debian version. Closes: #216075
+  * Fix dpkg-source to create correct diffs for files with spaces in
+    their name (apparantly we don't have many of those ;).
+    Based on a patch by Marcel Toele. Closes: #445380
 
   [ Updated dpkg translations ]
   * Basque (Piarres Beobide). Closes: #440859
index 5b7802df2a5352976c48a15b3d23fc07587d2b19..da22b987ede8dbb7276b2d0d882d76a428fbbfbc 100755 (executable)
@@ -594,10 +594,11 @@ if ($opmode eq 'build') {
                    $ENV{'LC_ALL'}= 'C';
                    $ENV{'LANG'}= 'C';
                    $ENV{'TZ'}= 'UTC0';
-                    exec('diff','-u',
-                         '-L',"$basedirname.orig/$fn",
-                         '-L',"$basedirname/$fn",
-                         '--',"$ofnread","$dir/$fn") or &syserr(_g("exec diff"));
+                   my $tab = ("$basedirname/$fn" =~ / /) ? "\t" : '';
+                   exec('diff','-u',
+                        '-L',"$basedirname.orig/$fn$tab",
+                        '-L',"$basedirname/$fn$tab",
+                        '--',"$ofnread","$dir/$fn") or &syserr(_g("exec diff"));
                 }
                my $difflinefound = 0;
                 $/= "\n";