Browse Source

dpkg: fix deferred rename/fsync processing

It was scanning the old list of files so it would never install
new files.
Colin Watson 16 years ago
parent
commit
8467206b51
3 changed files with 4 additions and 4 deletions
  1. 2 2
      src/archives.c
  2. 1 1
      src/archives.h
  3. 1 1
      src/processarc.c

+ 2 - 2
src/archives.c

@@ -802,13 +802,13 @@ int tarobject(struct TarInfo *ti) {
 }
 
 void
-tar_deferred_extract(struct pkginfo *pkg)
+tar_deferred_extract(struct fileinlist *files, struct pkginfo *pkg)
 {
   struct fileinlist *cfile;
   struct filenamenode *usenode;
   const char *usename;
 
-  for (cfile = pkg->clientdata->files; cfile; cfile = cfile->next) {
+  for (cfile = files; cfile; cfile = cfile->next) {
     debug(dbg_eachfile, "deferred extract of '%.255s'", cfile->namenode->name);
 
     if (!(cfile->namenode->flags & fnnf_deferred_rename))

+ 1 - 1
src/archives.h

@@ -66,7 +66,7 @@ int unlinkorrmdir(const char *filename);
 
 int tarobject(struct TarInfo *ti);
 int tarfileread(void *ud, char *buf, int len);
-void tar_deferred_extract(struct pkginfo *pkg);
+void tar_deferred_extract(struct fileinlist *files, struct pkginfo *pkg);
 
 bool filesavespackage(struct fileinlist *, struct pkginfo *,
                       struct pkginfo *pkgbeinginstalled);

+ 1 - 1
src/processarc.c

@@ -646,7 +646,7 @@ void process_archive(const char *filename) {
   p1[0] = -1;
   subproc_wait_check(c1, BACKEND " --fsys-tarfile", PROCPIPE);
 
-  tar_deferred_extract(pkg);
+  tar_deferred_extract(newfileslist, pkg);
 
   if (oldversionstatus == stat_halfinstalled || oldversionstatus == stat_unpacked) {
     /* Packages that were in `installed' and `postinstfailed' have been reduced