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

Fix dpkg's preinst when alternatives dir contains unexpected subdirs

Adjust the lintian overrides accordingly.
Raphael Hertzog лет назад: 17
Родитель
Сommit
4a1e8173f6
3 измененных файлов с 8 добавлено и 5 удалено
  1. 2 0
      debian/changelog
  2. 3 3
      debian/dpkg.lintian-overrides
  3. 3 2
      debian/dpkg.preinst

+ 2 - 0
debian/changelog

@@ -17,6 +17,8 @@ dpkg (1.15.4) UNRELEASED; urgency=low
     info-browsers that do not depend on the new install-info package
     that provides the real functionality. Closes: #9771, #523980
     See http://wiki.debian.org/Transitions/DpkgToGnuInstallInfo for details.
+  * Fix dpkg's preinst in case /var/lib/dpkg/alternatives contains unexpected
+    sub-directories. Closes: #535138
 
   [ Updated dpkg translations ]
   * French (Christian Perrier).

+ 3 - 3
debian/dpkg.lintian-overrides

@@ -4,9 +4,9 @@ dpkg: arch-dep-package-has-big-usr-share
 # By design, to be able to recover from broken/missing zlib
 dpkg: embedded-zlib ./usr/bin/dpkg-deb
 # False positives, we read from a file not from a tty
-dpkg: read-in-maintainer-script preinst:38
 dpkg: read-in-maintainer-script preinst:39
-dpkg: read-in-maintainer-script preinst:41
-dpkg: read-in-maintainer-script preinst:49
+dpkg: read-in-maintainer-script preinst:40
+dpkg: read-in-maintainer-script preinst:42
+dpkg: read-in-maintainer-script preinst:50
 # On purpose, install-info is only a wrapper that will be removed soon
 dpkg: binary-without-manpage usr/sbin/install-info

+ 3 - 2
debian/dpkg.preinst

@@ -30,8 +30,9 @@ kill_bad_alternatives () {
     local IFS=""
     ALTDIR="/var/lib/dpkg/alternatives"
     for alt in $ALTDIR/*; do
-        if [ ! -e $alt ]; then
-            # In case it's been removed by the code below
+        if [ ! -f $alt ]; then
+            # In case it's been removed by the code below, or in case
+            # it's not a real file
             continue
         fi
         {