Переглянути джерело

dpkg: On purge remove the conffiles from the file list file

This makes sure the files list is correct after the conffiles have been
removed from disk and the status db has been updated.
Guillem Jover 15 роки тому
батько
коміт
e67e071e58
1 змінених файлів з 6 додано та 0 видалено
  1. 6 0
      src/remove.c

+ 6 - 0
src/remove.c

@@ -305,6 +305,9 @@ static void removal_bulk_remove_leftover_dirs(struct pkginfo *pkg) {
   static struct varbuf fnvb;
   struct stat stab;
 
+  /* We may have modified this previously. */
+  ensure_packagefiles_available(pkg);
+
   modstatdb_note(pkg);
   push_checkpoint(~ehflag_bombout, ehflag_normaltidy);
 
@@ -498,6 +501,9 @@ static void removal_bulk_remove_configfiles(struct pkginfo *pkg) {
       pop_cleanup(ehflag_normaltidy); /* closedir */
     }
 
+    /* Remove the conffiles from the file list file. */
+    write_filelist_except(pkg, pkg->clientdata->files, fnnf_old_conff);
+
     pkg->installed.conffiles = NULL;
     modstatdb_note(pkg);