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

Let dpkg-source -x touch all patched files to have the same
timestamp to mitigate time-skew problems (Denis Barbier).
Closes: #105750

Frank Lichtenheld лет назад: 20
Родитель
Сommit
f9fab0b1a4
3 измененных файлов с 15 добавлено и 2 удалено
  1. 8 1
      ChangeLog
  2. 3 0
      debian/changelog
  3. 4 1
      scripts/dpkg-source.pl

+ 8 - 1
ChangeLog

@@ -1,4 +1,11 @@
-2006-02-10  Ian Jackson <iwj@ubuntu.com>
+2006-02-10  Denis Barbier  <barbier@linuxfr.org>
+
+	* scripts/dpkg-source.pl: Touch all patched files
+	to have the same timestamp. This should mitigate
+	time-skew problems until we can finally add proper
+	timestamps to the diffs.
+
+2006-02-10  Ian Jackson  <iwj@ubuntu.com>
 
 	* src/configure.c: Differentiate between modified
 	and deleted configuration files. Gives and more

+ 3 - 0
debian/changelog

@@ -44,6 +44,9 @@ dpkg (1.13.14~) UNRELEASED; urgency=low
     variables.
   * On package configuration, differentiate between modified and
     deleted configuration files (Ian Jackson). Closes: #351361
+  * Let dpkg-source -x touch all patched files to have the same
+    timestamp to mitigate time-skew problems (Denis Barbier).
+    Closes: #105750
 
   [ Christian Perrier ]
   * Switch to po4a for manpages translation. Closes: #320122

+ 4 - 1
scripts/dpkg-source.pl

@@ -815,8 +815,11 @@ if ($opmode eq 'build') {
 	&reapgzip if $patch =~ /\.(gz|bz2)$/;
     }
 
+    my $now = time;
     for $fn (keys %filepatched) {
-	$ftr= "$newdirectory/".substr($fn,length($expectprefix)+1).".dpkg-orig";
+	$ftr= "$newdirectory/".substr($fn,length($expectprefix)+1);
+	utime($now, $now, $ftr) || &syserr("cannot change timestamp for $ftr");
+	$ftr.= ".dpkg-orig";
 	unlink($ftr) || &syserr("remove patch backup file $ftr");
     }