Bug#2662: dpkg-divert can lose diversions
Package: dpkg
Version: 1.0.17, 1.1.3
There is a typo in dpkg-divert that will cause it to possible lose
diversions. It is present in both 1.0.17 and 1.1.3.
--- dpkg-divert.pl.orig Fri Apr 5 20:41:10 1996
+++ dpkg-divert.pl Fri Apr 5 20:42:06 1996
@@ -134,11 +134,11 @@
$orgdivertto= $altname[$i];
print STDERR ">@contest<\n";
@contest= (($i > 0 ? @contest[0..$i-1] : ()),
- ($i < $#contest ? @contest[$i+1,$#contest] : ()));
+ ($i < $#contest ? @contest[$i+1..$#contest] : ()));
@altname= (($i > 0 ? @altname[0..$i-1] : ()),
- ($i < $#altname ? @altname[$i+1,$#altname] : ()));
+ ($i < $#altname ? @altname[$i+1..$#altname] : ()));
@package= (($i > 0 ? @package[0..$i-1] : ()),
- ($i < $#package ? @package[$i+1,$#package] : ()));
+ ($i < $#package ? @package[$i+1..$#package] : ()));
print STDERR ">@contest<\n";
&checkrename($orgdivertto,$orgfile);
&dorename($orgdivertto,$orgfile);
Reply to: