diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | man/update-alternatives.8 | 2 | ||||
-rwxr-xr-x | scripts/update-alternatives.pl | 2 |
4 files changed, 14 insertions, 1 deletions
@@ -1,5 +1,14 @@ 2009-02-22 Raphael Hertzog <hertzog@debian.org> + * man/update-alternatives.8: Document how --all can be used to + repair all alternatives on the system in a single command. + * scripts/update-alternatives.pl: Ensure the above explanation + is true by ensuring that --config does something sensible when + no alternative is currently selected and when the user input is + empty: it will auto-select the best alternative. + +2009-02-22 Raphael Hertzog <hertzog@debian.org> + * scripts/update-alternatives.pl: Implement --set-selections. It's the the counterpart of --get-selections, it reads configuration on standard input and reconfigures alternatives diff --git a/debian/changelog b/debian/changelog index a2422fae6..09c6bb74e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -168,6 +168,8 @@ dpkg (1.15.0) UNRELEASED; urgency=low alternatives. Closes: #273406, #392429 - new option --set-selections to reconfigure a set of alternatives in a single command. + * Document in update-alternatives(8) how one can repair all broken + alternatives with a single command. Closes: #250258, #395556 [ Pierre Habouzit ] * Add a --query option to update-alternatives. Closes: #336091, #441904 diff --git a/man/update-alternatives.8 b/man/update-alternatives.8 index 4b8a4b934..daba7f7a4 100644 --- a/man/update-alternatives.8 +++ b/man/update-alternatives.8 @@ -270,6 +270,8 @@ is a name in the alternatives directory. Call \fB\-\-config\fP on all alternatives. It can be usefully combined with \fB\-\-skip\-auto\fP to review and configure all alternatives which are not configured in automatic mode. Broken alternatives are also displayed. +Thus a simple way to fix all broken alternatives is to call +\fByes \[aq]\[aq] | update-alternatives \-\-force \-\-all\fR. .TP \fB\-\-auto\fR \fIname\fR Switch the link group behind the alternative name diff --git a/scripts/update-alternatives.pl b/scripts/update-alternatives.pl index 18c147dee..c6c30d88c 100755 --- a/scripts/update-alternatives.pl +++ b/scripts/update-alternatives.pl @@ -908,7 +908,7 @@ sub select_choice { my $selection = <STDIN>; return undef unless defined($selection); chomp($selection); - return $current if $selection eq ""; + return ($current || $best) if $selection eq ""; if (exists $sel{$selection}) { $self->set_status(($selection eq "0") ? "auto" : "manual"); return $sel{$selection}; |