]> err.no Git - dpkg/commitdiff
Activate triggers when a file is removed in a shared directory
authorRaphael Hertzog <hertzog@debian.org>
Sun, 11 May 2008 14:41:23 +0000 (16:41 +0200)
committerRaphael Hertzog <hertzog@debian.org>
Sun, 11 May 2008 14:41:50 +0000 (16:41 +0200)
* 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.

ChangeLog
debian/changelog
src/processarc.c

index 878cce47af04dbbade91e721dd1c7448a48a5a7e..d0c92f4c88b336331f3a9fe4b5b8ce6e529c285a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-05-11  Raphael Hertzog  <hertzog@debian.org>
+
+       * 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  <hertzog@debian.org>
 
        * scripts/Dpkg/Source/Package/V2.pm,
index d4fe9305d34edb42ab032a3aad8c2a4ef816a13d..b332cde7a86ff9fedbbd3ab73292f60e086ebba0 100644 (file)
@@ -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.
index 1096e1abce3f87e03d2385c331e321d465dda4b0..3085962e6fe241dd21cb0d44d7f776280adad944 100644 (file)
@@ -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))