The following commit has been merged in the lenny branch:
commit b292f854388956e36e5ba4c2afe084ac98c11346
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date:   Sun May 11 16:41:23 2008 +0200

    Activate triggers when a file is removed in a shared directory
    
    * src/processarc.c (process_archive): While removing files that
    disappeared, move the call to namenodetouse before the test
    that skips directory shared with other packages. This is required
    because namenodetouse() handles trigger activation and we really
    want directories containing (only) removed files to activate the
    corresponding triggers.

diff --git a/ChangeLog b/ChangeLog
index 878cce4..d0c92f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-05-11  Raphael Hertzog  <[EMAIL PROTECTED]>
+
+       * src/processarc.c (process_archive): While removing files that
+       disappeared, move the call to namenodetouse before the test
+       that skips directory shared with other packages. This is required
+       because namenodetouse() handles trigger activation and we really
+       want directories containing (only) removed files to activate the
+       corresponding triggers.
+
 2008-05-08  Raphael Hertzog  <[EMAIL PROTECTED]>
 
        * scripts/Dpkg/Source/Package/V2.pm,
diff --git a/debian/changelog b/debian/changelog
index d4fe930..b332cde 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -39,6 +39,8 @@ dpkg (1.14.19) UNRELEASED; urgency=low
   * Change the "2.0" and "3.0 (quilt)" source packages to refuse by default
     binary files in the debian sub-directory. They have to be whitelisted
     through debian/source/include-binaries. Closes: #473041
+  * Make sure triggers are activated when a file is removed in a directory
+    shared by multiple packages. Closes: #479850
   
   [ Helge Kreutzmann ]
   * Minor fixes and clarifications to man pages.
diff --git a/src/processarc.c b/src/processarc.c
index 1096e1a..3085962 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -633,14 +633,16 @@ void process_archive(const char *filename) {
     if ((namenode->flags & fnnf_new_conff) ||
         (namenode->flags & fnnf_new_inarchive))
       continue;
+
+    fnamevb.used= fnameidlu;
+    varbufaddstr(&fnamevb, namenodetouse(namenode,pkg)->name);
+    varbufaddc(&fnamevb,0);
+
     if (!stat(namenode->name,&stab) && S_ISDIR(stab.st_mode)) {
       debug(dbg_eachfiledetail, "process_archive: %s is a directory",
            namenode->name);
       if (isdirectoryinuse(namenode,pkg)) continue;
     }
-    fnamevb.used= fnameidlu;
-    varbufaddstr(&fnamevb, namenodetouse(namenode,pkg)->name);
-    varbufaddc(&fnamevb,0);
 
     if (lstat(fnamevb.buf, &oldfs)) {
       if (!(errno == ENOENT || errno == ELOOP || errno == ENOTDIR))

-- 
dpkg's main repository


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

Reply via email to