From: Frank Lichtenheld Date: Sun, 7 Oct 2007 15:10:32 +0000 (+0200) Subject: dpkg-source: Fix diff generation for filenames containing spaces X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c22031a81b0933bd90309637a83ced532449406;p=dpkg dpkg-source: Fix diff generation for filenames containing spaces 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. --- diff --git a/ChangeLog b/ChangeLog index b1eafabe..f301b1a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-10-07 Frank Lichtenheld + Marcel Toele + + * 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 * scripts/dpkg-buildpackage.pl: Call checkversion() diff --git a/debian/changelog b/debian/changelog index 6c33f1cb..139d1c02 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index 5b7802df..da22b987 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -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";