The following commit has been merged in the master branch:
commit 4a1e8173f63c1c7a6807aa76280fc8aec128bc81
Author: Raphael Hertzog <[email protected]>
Date:   Fri Jul 3 15:43:29 2009 +0200

    Fix dpkg's preinst when alternatives dir contains unexpected subdirs
    
    Adjust the lintian overrides accordingly.

diff --git a/debian/changelog b/debian/changelog
index 5722977..2dd90db 100644
--- a/debian/changelog
+++ b/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).
diff --git a/debian/dpkg.lintian-overrides b/debian/dpkg.lintian-overrides
index 2240d14..cbbb25e 100644
--- a/debian/dpkg.lintian-overrides
+++ b/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
diff --git a/debian/dpkg.preinst b/debian/dpkg.preinst
index 4469819..ac9362a 100755
--- a/debian/dpkg.preinst
+++ b/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
         {

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to