+2007-08-28 Guillem Jover <guillem@debian.org>
+
+ * scripts/update-alternatives.pl: Fix regression introduced on commit
+ from 2007-08-08, which was producing a warning due to usage of
+ uninitialized variables.
+
2007-08-28 Guillem Jover <guillem@debian.org>
* scripts/dpkg-gencontrol.pl: Add comments about the second pass
unlink("$slink") || $! == &ENOENT ||
&quit(sprintf(_g("unable to remove %s: %s"), $slink, $!));
} else {
- if (!defined($linkname= readlink($slink)) && $! != ENOENT) {
+ $linkname = readlink($slink);
+ if (!defined($linkname) && $! != ENOENT) {
pr(sprintf(_g("warning: %s is supposed to be a slave symlink to\n".
" %s, or nonexistent; however, readlink failed: %s"),
$slink, "$altdir/$sname", $!))
if $verbosemode > 0;
- } elsif ($linkname ne "$altdir/$sname") {
+ } elsif (!defined($linkname) ||
+ (defined($linkname) && $linkname ne "$altdir/$sname")) {
unlink("$slink.dpkg-tmp") || $! == ENOENT ||
quit(sprintf(_g("unable to ensure %s nonexistent: %s"),
"$slink.dpkg-tmp", $!));