From d20678a503170c1c4d8cbb7db39859263ff9ded9 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 6 Jan 2019 16:24:09 +0000 Subject: [PATCH] dgit: Remove foolish uses of $b in unpack_playtree_linkorigs etc. Evidently I had forgotten that $b is weird in Perl and should not by used for things other than sorting. Signed-off-by: Ian Jackson --- dgit | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dgit b/dgit index 5684ba9a..f769eb9a 100755 --- a/dgit +++ b/dgit @@ -5793,16 +5793,16 @@ sub unpack_playtree_linkorigs ($$) { my $bpd_abs = bpd_abs(); opendir QFD, $bpd_abs or fail "buildproductsdir: $bpd_abs: $!"; - while ($!=0, defined(my $b = readdir QFD)) { - my $f = bpd_abs()."/".$b; + while ($!=0, defined(my $leaf = readdir QFD)) { + my $f = bpd_abs()."/".$leaf; { local ($debuglevel) = $debuglevel-1; - printdebug "QF linkorigs $b, $f ?\n"; + printdebug "QF linkorigs bpd $leaf, $f ?\n"; } - next unless is_orig_file_of_vsn $b, $upstreamversion; - printdebug "QF linkorigs $b, $f Y\n"; - link_ltarget $f, $b or die "$b $!"; - $fn->($b); + next unless is_orig_file_of_vsn $leaf, $upstreamversion; + printdebug "QF linkorigs $leaf, $f Y\n"; + link_ltarget $f, $leaf or die "$leaf $!"; + $fn->($leaf); } die "$buildproductsdir: $!" if $!; closedir QFD; @@ -5859,16 +5859,16 @@ Files: END my $dscaddfile=sub { - my ($b) = @_; + my ($leaf) = @_; my $md = new Digest::MD5; - my $fh = new IO::File $b, '<' or die "$b $!"; + my $fh = new IO::File $leaf, '<' or die "$leaf $!"; stat $fh or confess $!; my $size = -s _; $md->addfile($fh); - print $fakedsc " ".$md->hexdigest." $size $b\n" or confess $!; + print $fakedsc " ".$md->hexdigest." $size $leaf\n" or confess $!; }; unpack_playtree_linkorigs($upstreamversion, $dscaddfile); -- 2.30.2