+2007-05-02 Guillem Jover <guillem@debian.org>
+
+ * scripts/update-alternatives.pl: Move the ENOENT errno check from
+ the if conditionals to the block body to avoid comparing against an
+ undef value on the next elsif conditional.
+
2007-04-28 Aaron M. Ucko <ucko@debian.org>
* scripts/dpkg-shlibdeps.pl (unique_libfiles): New variable. Do not
&quit(sprintf(_g("unable to remove %s: %s"), "$admindir/$name", $!));
exit(0);
} else {
- if (!defined($linkname= readlink($link)) && $! != &ENOENT) {
+ if (!defined($linkname = readlink($link))) {
&pr(sprintf(_g("warning: %s is supposed to be a symlink to %s\n".
" (or nonexistent); however, readlink failed: %s"), $link, "$altdir/$name", $!))
- if $verbosemode > 0;
+ if $! != ENOENT && $verbosemode > 0;
} elsif ($linkname ne "$altdir/$name") {
unlink("$link.dpkg-tmp") || $! == &ENOENT ||
&quit(sprintf(_g("unable to ensure %s nonexistent: %s"), "$link.dpkg-tmp", $!));
for (my $j = 0; $j <= $#slavenames; $j++) {
$sname= $slavenames[$j];
$slink= $slavelinks[$j];
- if (!defined($linkname= readlink($slink)) && $! != &ENOENT) {
+ if (!defined($linkname = readlink($slink))) {
&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;
+ if $! != ENOENT && $verbosemode > 0;
} elsif ($linkname ne "$altdir/$sname") {
unlink("$slink.dpkg-tmp") || $! == &ENOENT ||
&quit(sprintf(_g("unable to ensure %s nonexistent: %s"), "$slink.dpkg-tmp", $!));