The following commit has been merged in the master branch:
commit ad07629757599f8f27ec63864b0c34fd7515882c
Author: Guillem Jover <guil...@debian.org>
Date:   Sun May 15 17:33:14 2011 +0200

    dpkg: Do not preserve and check for conffiles on leftover dir removal
    
    The function removal_bulk_remove_leftover_dirs() was supposed to be
    called only w/ left over dirs, but removal_bulk_remove_configfiles()
    does not remove them from the file list when unlinking.
    
    Do not check if the directory needs to be preserved if the package has
    conffiles inside, because it should have none, although it would match
    given that the file list still contains conffiles.
    
    Do not preserve any lingering conffiles in the file list as they are
    no longer on disk anyway.

diff --git a/src/remove.c b/src/remove.c
index bb959cb..a3a8d2c 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -316,7 +316,10 @@ static void removal_bulk_remove_leftover_dirs(struct 
pkginfo *pkg) {
     debug(dbg_eachfile, "removal_bulk `%s' flags=%o",
           namenode->name, namenode->flags);
     if (namenode->flags & fnnf_old_conff) {
-      push_leftover(&leftover,namenode);
+      /* This can only happen if removal_bulk_remove_configfiles() got
+       * interrupted half way. */
+      debug(dbg_eachfiledetail, "removal_bulk expecting only left over dirs, "
+                                "ignoring conffile '%s'", namenode->name);
       continue;
     }
 
@@ -333,10 +336,6 @@ static void removal_bulk_remove_leftover_dirs(struct 
pkginfo *pkg) {
       /* Only delete a directory or a link to one if we're the only
        * package which uses it. Other files should only be listed
        * in this package (but we don't check). */
-      if (dir_has_conffiles(namenode, pkg)) {
-       push_leftover(&leftover,namenode);
-       continue;
-      }
       if (dir_is_used_by_others(namenode, pkg))
         continue;
     }

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to