Kaynağa Gözat

update-alternatives: remove unneeded slavelinks in --set/--config too

* scripts/update-alternatives.pl (set_links): Remove slavelinks
if needed as well. We create slave links automatically, we should
remove them in the same way. Otherwise --config or --set will let
dangling symlinks on the system.
Raphael Hertzog 17 yıl önce
ebeveyn
işleme
7994776cc4
3 değiştirilmiş dosya ile 10 ekleme ve 0 silme
  1. 7 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 1 0
      scripts/update-alternatives.pl

+ 7 - 0
ChangeLog

@@ -3,6 +3,13 @@
 	* 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 (set_links): Remove slavelinks
+	if needed as well. We create slave links automatically, we should
+	remove them in the same way. Otherwise --config or --set will let
+	dangling symlinks on the system.
+
 2009-02-06  Guillem Jover  <guillem@debian.org>
 
 	* man/deb.5: Add detailed information of the currently supported

+ 2 - 0
debian/changelog

@@ -129,6 +129,8 @@ dpkg (1.15.0) UNRELEASED; urgency=low
     This also makes update-alternatives less noisy when this happens since we
     don't call mv when we know that it's going to fail.
     Closes: #98822
+  * Properly remove inappropriate slave links in update-alternatives even when
+    we switch to manual mode with --set or --config. Closes: #388313
 
   [ Pierre Habouzit ]
   * Add a --query option to update-alternatives. Closes: #336091, #441904

+ 1 - 0
scripts/update-alternatives.pl

@@ -309,6 +309,7 @@ sub set_links($$)
 	               $slavelinks[$slnum], $versions[$preferred]))
 	        if $verbosemode > 0;
 	    checked_rm("$altdir/$slave");
+            checked_rm($slavelinks[$slnum]);
 	}
     }
 }