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

dpkg: Activate all path components for file triggers on removal

Because directory processing might get skipped on removal (contrary to
unpack), as they might be shared with other packages, some file triggers
will not get activated as the code was changed to do more optimal
activation. The problem is that the removed paths need to activate all
parent paths to be effective.

Regression introduced in commit 65ade6390b47fe3ec6a0e2ba341f3d553bf4bbc6.

Closes: #725437
Guillem Jover лет назад: 12
Родитель
Сommit
e00a290311
2 измененных файлов с 4 добавлено и 2 удалено
  1. 2 0
      debian/changelog
  2. 2 2
      src/remove.c

+ 2 - 0
debian/changelog

@@ -33,6 +33,8 @@ dpkg (1.17.2) UNRELEASED; urgency=low
   * Do not capitalize error and warning messages.
   * When ignoring invalid remove requests in dpkg consider that progress,
     reset the loop detector and avoid the assert. Closes: #143307
+  * Activate all path components for file triggers on removal.
+    Regression introduced in 1.17.0. Closes: #725437
 
   [ Updated programs translations ]
   * German (Sven Joachim).

+ 2 - 2
src/remove.c

@@ -304,7 +304,7 @@ removal_bulk_remove_files(struct pkginfo *pkg)
           continue;
       }
 
-      trig_file_activate(usenode, pkg);
+      trig_path_activate(usenode, pkg);
 
       varbuf_trunc(&fnvb, before);
       varbuf_add_str(&fnvb, DPKGTEMPEXT);
@@ -412,7 +412,7 @@ static void removal_bulk_remove_leftover_dirs(struct pkginfo *pkg) {
         continue;
     }
 
-    trig_file_activate(usenode, pkg);
+    trig_path_activate(usenode, pkg);
 
     debug(dbg_eachfiledetail, "removal_bulk removing '%s'", fnvb.buf);
     if (!rmdir(fnvb.buf) || errno == ENOENT || errno == ELOOP) continue;