Explorar el Código

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 hace 15 años
padre
commit
e67e071e58
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  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);