Kaynağa Gözat

update-alternatives: switch non-existant alternative to auto

* scripts/update-alternatives.pl: Ensure that a non-existant
alternative result in automatic mode configuration.
Raphael Hertzog 17 yıl önce
ebeveyn
işleme
ed1ab8e968
2 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 5 0
      ChangeLog
  2. 1 1
      scripts/update-alternatives.pl

+ 5 - 0
ChangeLog

@@ -3,6 +3,11 @@
 	* lib/dpkg.h (ohshitvb): Remove function prototype.
 	* lib/ehandle.c (ohshitvb): Remove function definition.
 
+2009-02-06  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/update-alternatives.pl: Ensure that a non-existant
+	alternative result in automatic mode configuration.
+
 2009-02-06  Raphael Hertzog  <hertzog@debian.org>
 
 	* scripts/update-alternatives.pl: Change set_links() to

+ 1 - 1
scripts/update-alternatives.pl

@@ -465,7 +465,7 @@ if (defined($linkname= readlink("$altdir/$name"))) {
 #   $action      auto, install, remove, remove-all
 # all independent
 
-if ($action eq 'auto') {
+if (($action eq 'auto') || ($state eq 'nonexistent')) {
     pr(sprintf(_g("Setting up automatic selection of %s."), $name))
       if $verbosemode > 0;
     checked_rm("$altdir/$name.dpkg-tmp");