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

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
Родитель
Сommit
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;
   static struct varbuf fnvb;
   struct stat stab;
   struct stat stab;
 
 
+  /* We may have modified this previously. */
+  ensure_packagefiles_available(pkg);
+
   modstatdb_note(pkg);
   modstatdb_note(pkg);
   push_checkpoint(~ehflag_bombout, ehflag_normaltidy);
   push_checkpoint(~ehflag_bombout, ehflag_normaltidy);
 
 
@@ -498,6 +501,9 @@ static void removal_bulk_remove_configfiles(struct pkginfo *pkg) {
       pop_cleanup(ehflag_normaltidy); /* closedir */
       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;
     pkg->installed.conffiles = NULL;
     modstatdb_note(pkg);
     modstatdb_note(pkg);