Просмотр исходного кода

fix logic error, alternatives are now correctly restored to auto when removing a manually selected alternative

Wichert Akkerman лет назад: 24
Родитель
Сommit
c83910f4f8
3 измененных файлов с 9 добавлено и 7 удалено
  1. 6 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 1 7
      scripts/update-alternatives.pl

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+Thu Feb  7 00:28:35 CET 2002 Wichert Akkerman <wakkerma@debian.org>
+
+  * scripts/update-alternatives.pl: fix logic error, alternatives are
+    now correctly restored to auto when removing a manually selected
+    alternative
+
 Wed Feb  6 12:29:18 CET 2002 Wichert Akkerman <wakkerma@debian.org>
 
   * dselect/method.cc: check fgetc() for EOF return so we don't spin

+ 2 - 0
debian/changelog

@@ -79,6 +79,8 @@ dpkg (1.10) unstable; urgency=low
   * Use gzip -c in install-info. Closes: Bug#131758
   * start-stop-daemon works on HP-UX now. Closes: Bug#130130
   * Fix dselect spin when run without input. Closes: Bug#132476
+  * Update-alternatives correctly restored an alternative to auto mode
+    when removing a manually selected alternative. Closes: Bug#132632
 
  -- Wichert Akkerman <wakkerma@debian.org>  Mon, 20 Aug 2001 14:54:38 +0200
 

+ 1 - 7
scripts/update-alternatives.pl

@@ -249,12 +249,6 @@ if ($mode eq 'auto') {
         &quit("unable to remove $altdir/$name.dpkg-tmp: $!");
     $state= 'nonexistent';
     $manual= 'auto';
-} elsif ($state eq 'nonexistent') {
-    if ($manual eq 'manual') {
-        &pr("$altdir/$name has been deleted, returning to automatic selection.")
-          if $verbosemode > 0;
-        $manual= 'auto';
-    }
 }
 
 #   $manual      manual, auto
@@ -316,7 +310,7 @@ if ($mode eq 'install') {
 }
 
 if ($mode eq 'remove') {
-    if ($manual eq "manual" and $state eq "expected") {
+    if ($manual eq "manual" and $state ne "expected") {
     	&pr("Removing manually selected alternative - switching to auto mode");
 	$manual= "auto";
     }