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

dpkg: Move fileslistvalid check just before write_filelist_except()

This will allow to insert other actions before the check, and still
managing to execute them on each iteration.
Guillem Jover лет назад: 13
Родитель
Сommit
0c658b9c7d
1 измененных файлов с 7 добавлено и 4 удалено
  1. 7 4
      src/processarc.c

+ 7 - 4
src/processarc.c

@@ -1341,10 +1341,7 @@ void process_archive(const char *filename) {
     while ((otherpkg = filepackages_iter_next(iter))) {
       debug(dbg_eachfiledetail, "process_archive ... found in %s",
             pkg_name(otherpkg, pnaw_always));
-      /* If !fileslistvalid then it's one of the disappeared packages above
-       * and we don't bother with it here, clearly. */
-      if (!otherpkg->clientdata->fileslistvalid)
-        continue;
+
       /* A pkgset can share files between instances, so there's no point
        * in rewriting the file that's already in place. */
       if (otherpkg->set == pkg->set)
@@ -1354,6 +1351,12 @@ void process_archive(const char *filename) {
         continue;
       }
 
+      /* If !fileslistvalid then it's one of the disappeared packages above
+       * or we have already updated the files list file, and we don't bother
+       * with it here, clearly. */
+      if (!otherpkg->clientdata->fileslistvalid)
+        continue;
+
       /* Found one. We delete remove the list entry for this file,
        * (and any others in the same package) and then mark the package
        * as requiring a reread. */