|
@@ -361,6 +361,7 @@ if ($opmode eq 'build') {
|
|
|
}
|
|
}
|
|
|
defined($c3= open(DIFFGEN,"-|")) || &syserr("fork for diff");
|
|
defined($c3= open(DIFFGEN,"-|")) || &syserr("fork for diff");
|
|
|
if (!$c3) {
|
|
if (!$c3) {
|
|
|
|
|
+ $ENV{'LANG'}= 'C';
|
|
|
exec('diff','-u',
|
|
exec('diff','-u',
|
|
|
'-L',"$basedirname.orig/$fn",
|
|
'-L',"$basedirname.orig/$fn",
|
|
|
'-L',"$basedirname/$fn",
|
|
'-L',"$basedirname/$fn",
|
|
@@ -535,6 +536,7 @@ if ($opmode eq 'build') {
|
|
|
while (($_ = <GZIP>) && !/^--- /) {
|
|
while (($_ = <GZIP>) && !/^--- /) {
|
|
|
# read hunk header (@@)
|
|
# read hunk header (@@)
|
|
|
s/\n$// or &error("diff is missing trailing newline");
|
|
s/\n$// or &error("diff is missing trailing newline");
|
|
|
|
|
+ next if /^\\ No newline/;
|
|
|
/^@@ -\d+(,(\d+))? \+\d+(,(\d+))? @\@$/ or
|
|
/^@@ -\d+(,(\d+))? \+\d+(,(\d+))? @\@$/ or
|
|
|
&error("Expected ^@@ in line $. of diff");
|
|
&error("Expected ^@@ in line $. of diff");
|
|
|
my ($olines, $nlines) = ($1 ? $2 : 1, $3 ? $4 : 1);
|
|
my ($olines, $nlines) = ($1 ? $2 : 1, $3 ? $4 : 1);
|
|
@@ -543,6 +545,7 @@ if ($opmode eq 'build') {
|
|
|
while ($olines || $nlines) {
|
|
while ($olines || $nlines) {
|
|
|
$_ = <GZIP> or &error("unexpected end of diff");
|
|
$_ = <GZIP> or &error("unexpected end of diff");
|
|
|
s/\n$// or &error("diff is missing trailing newline");
|
|
s/\n$// or &error("diff is missing trailing newline");
|
|
|
|
|
+ next if /^\\ No newline/;
|
|
|
if (/^ /) { --$olines; --$nlines; }
|
|
if (/^ /) { --$olines; --$nlines; }
|
|
|
elsif (/^-/) { --$olines; }
|
|
elsif (/^-/) { --$olines; }
|
|
|
elsif (/^\+/) { --$nlines; }
|
|
elsif (/^\+/) { --$nlines; }
|
|
@@ -626,6 +629,7 @@ if ($opmode eq 'build') {
|
|
|
if (!$c2) {
|
|
if (!$c2) {
|
|
|
open(STDIN,"<&GZIP") || &syserr("reopen gzip for patch");
|
|
open(STDIN,"<&GZIP") || &syserr("reopen gzip for patch");
|
|
|
chdir($newdirectory) || &syserr("chdir to $newdirectory for patch");
|
|
chdir($newdirectory) || &syserr("chdir to $newdirectory for patch");
|
|
|
|
|
+ $ENV{'LANG'}= 'C';
|
|
|
exec('patch','-s','-t','-F','0','-N','-p1','-u',
|
|
exec('patch','-s','-t','-F','0','-N','-p1','-u',
|
|
|
'-V','never','-g0','-b','-z','.dpkg-orig');
|
|
'-V','never','-g0','-b','-z','.dpkg-orig');
|
|
|
&syserr("exec patch");
|
|
&syserr("exec patch");
|