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

dpkg: use the correct mtime when installing a file with statoverrides

Regression introduced by commit ceb07b08dad4d5eead630064f45c7e7ded00a341.

Reported-by: Marc A. Donges
Raphaël Hertzog лет назад: 15
Родитель
Сommit
6a7a20c723
2 измененных файлов с 6 добавлено и 2 удалено
  1. 2 0
      debian/changelog
  2. 4 2
      src/archives.c

+ 2 - 0
debian/changelog

@@ -90,6 +90,8 @@ dpkg (1.16.0) UNRELEASED; urgency=low
   * Fix a regression in dpkg-divert where using --rename led to a failure when
     the rename implies crossing file systems. Thanks to Durk Strooisma for
     spotting it.
+  * Use the correct mtime when installing a file with statoverrides.
+    LP: #739179
 
   [ Jonathan Nieder ]
   * Remove support for use of synchronous sync(2), due to its pernicious

+ 4 - 2
src/archives.c

@@ -466,10 +466,12 @@ tarobject(void *ctx, struct tar_entry *ti)
     }
   }
 
-  if (nifd->namenode->statoverride)
+  if (nifd->namenode->statoverride) {
     st = nifd->namenode->statoverride;
-  else
+    st->mtime = ti->stat.mtime;
+  } else {
     st = &ti->stat;
+  }
 
   usenode = namenodetouse(nifd->namenode, tc->pkg);
   usename = usenode->name + 1; /* Skip the leading '/'. */