Sat Sep 9 21:17:37 CEST 2000 Wichert Akkerman <wakkerma@debian.org>
+ * debian/control: add dependency on binutils for dpkg-dev (needed for
+ objdump)
* scripts/dpkg-shlibdeps.pl: really make it do what the documentation
says it does.
+ * scripts/update-alternatives.pl:
+ + set alternative to manual mode when doing --config
+ + Fix typo in test for removed manual alternative
+ + Merge patch from Camm Maguire to fix updating of slave links
Fri Sep 8 12:28:34 CEST 2000 Wichert Akkerman <wakkerma@debian.org>
* Allow the administrator to override file mode and ownership
* Use objdump instead of ldd in dpkg-shlibdeps
+ * Fix logic in dpkg-shlibdeps so it looks for dependencies as specified
+ in the documentation
+ * Make update-alternatives update slave links with --config and properly
+ switch the alternative to manual mode
* HURD updates, Closes: Bug#57753,#57754,#57755
* dpkg-architecture: -q should not imply -f, Closes: Bug#57761
* add dpkg:UpstreamVersion and dpkg:Version substvars in dpkg-genchanges
# expected: alternative with highest priority is the active alternative
# expected-inprogress: busy selecting alternative with highest priority
# unexpected: alternative another alternative is active / error during readlink
-# nonexistant: alternative-symlink does not exist
+# nonexistent: alternative-symlink does not exist
# $link Link we are working with
# @slavenames List with names of slavelinks
# %slavenum Map from name of slavelink to slave-index (into @slavelinks)
&pr("No alternatives for $name.");
} else {
&config_alternatives($name);
- exit 0;
}
}
}
if ($mode eq 'remove') {
- if ($manual eq "manual" and $state = "expected") {
+ if ($manual eq "manual" and $state eq "expected") {
&pr("Removing manually selected alternative - switching to auto mode");
$manual= "auto";
}
} until $preferred eq '' || $preferred>=1 && $preferred<=$#versions+1 &&
($preferred =~ m/[0-9]*/);
if ($preferred ne '') {
+ $manual = "manual";
$preferred--;
print STDOUT "Using \`$versions[$preferred]' to provide \`$name'.\n";
my $spath = $versions[$preferred];
&quit("unable to make $altdir/$name.dpkg-tmp a symlink to $spath: $!");
rename_mv("$altdir/$name.dpkg-tmp","$altdir/$name") ||
&quit("unable to install $altdir/$name.dpkg-tmp as $altdir/$name: $!");
+ # Link slaves...
+ for( my $slnum = 0; $slnum < @slavenames; $slnum++ ) {
+ my $slave = $slavenames[$slnum];
+ if ($slavepath{$preferred,$slnum} ne '') {
+ checked_symlink($slavepath{$preferred,$slnum},
+ "$altdir/$slave.dpkg-tmp");
+ checked_mv("$altdir/$slave.dpkg-tmp", "$altdir/$slave");
+ } else {
+ &pr("Removing $slave ($slavelinks[$slnum]), not appropriate with $versions[$preferred].")
+ if $verbosemode > 0;
+ unlink("$altdir/$slave") || $! == &ENOENT ||
+ &quit("unable to remove $altdir/$slave: $!");
+ }
+ }
+
}
}
&quit("internal error: $admindir/$name corrupt: $_[0]");
}
sub rename_mv {
- return (rename($_[0], $_[1]) || (system(("mv", $_[0], $_[1])) == 0));
+ return (rename($_[0], $_[1]) || (system(("mv", $_[0], $_[1])) == 0));
+}
+sub checked_symlink {
+ my ($filename, $linkname) = @_;
+ symlink($filename, $linkname) ||
+ &quit("unable to make $linkname a symlink to $filename: $!");
}
+sub checked_mv {
+ my ($source, $dest) = @_;
+ rename_mv($source, $dest) ||
+ &quit("unable to install $source as $dest: $!");
+}
+
exit(0);
# vim: nowrap ts=8 sw=4