summaryrefslogtreecommitdiff
path: root/src/processarc.c
diff options
context:
space:
mode:
authorRaphael Hertzog <hertzog@debian.org>2008-05-11 16:41:23 +0200
committerRaphael Hertzog <hertzog@debian.org>2008-05-11 16:41:50 +0200
commitb292f854388956e36e5ba4c2afe084ac98c11346 (patch)
tree060957b160e860b5b7a42035b393aa2b971564e0 /src/processarc.c
parent391bade105211da6a8af39868926cc6cb9428640 (diff)
downloaddpkg-b292f854388956e36e5ba4c2afe084ac98c11346.tar.gz
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.
Diffstat (limited to 'src/processarc.c')
-rw-r--r--src/processarc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/processarc.c b/src/processarc.c
index 1096e1abc..3085962e6 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))