From c8fc37f708b5fadf4f9a1759d7dfe026ef9e41ec Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Sat, 21 Apr 2001 00:58:59 +0000 Subject: [PATCH] Import fix for broken dpkg-source.pl from 1.8.3 version. --- scripts/dpkg-source.pl | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index 09bb6210..16d8544f 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -368,10 +368,8 @@ if ($opmode eq 'build') { $type{$fn}= 'plain file'; if (!lstat("$origdir/$fn")) { $! == ENOENT || &syserr("cannot stat orig file $origdir/$fn"); - $ofn= '/dev/null'; $ofnread= '/dev/null'; } elsif (-f _) { - $ofn= "$basedirname.orig/$fn"; $ofnread= "$origdir/$fn"; } else { &unrepdiff2("something else","plain file"); @@ -383,7 +381,7 @@ if ($opmode eq 'build') { $ENV{'LC_ALL'}= 'C'; exec('diff','-u', '-L',"$basedirname.orig/$fn", - '-L',"$ofn", + '-L',"$basedirname/$fn", '--',"$ofnread","$dir/$fn"); &syserr("exec diff"); } $difflinefound= 0; @@ -949,11 +947,9 @@ sub extracttar { @dirchdirfiles = grep($_ ne "." && $_ ne "..",readdir(D)); closedir(D) || &syserr("Unable to close dir $dirchdir"); if (@dirchdirfiles==1 && -d "$dirchdir/$dirchdirfiles[0]") { - if ("$dirchdir/$dirchdirfiles[0]" ne "$dirchdir/$newtopdir") { - rename("$dirchdir/$dirchdirfiles[0]", "$dirchdir/$newtopdir") || - &syserr("Unable to rename $dirchdir/$dirchdirfiles[0] to ". - "$dirchdir/$newtopdir"); - } + rename("$dirchdir/$dirchdirfiles[0]", "$dirchdir/$newtopdir") || + &syserr("Unable to rename $dirchdir/$dirchdirfiles[0] to ". + "$dirchdir/$newtopdir"); } else { mkdir("$dirchdir/$newtopdir", 0777) || &syserr("Unable to mkdir $dirchdir/$newtopdir"); -- 2.39.5