summaryrefslogtreecommitdiff
path: root/scripts/dpkg-source.pl
diff options
context:
space:
mode:
authorFrank Lichtenheld <djpig@debian.org>2006-02-10 14:56:15 +0000
committerFrank Lichtenheld <djpig@debian.org>2006-02-10 14:56:15 +0000
commitf9fab0b1a4afd66af3d3d9a3d26119732050dcf4 (patch)
tree38470520488c7f8d970f6479a3c00e1965c4bb28 /scripts/dpkg-source.pl
parent5df03bfaaa5c56db661814a300310ce664f12860 (diff)
downloaddpkg-f9fab0b1a4afd66af3d3d9a3d26119732050dcf4.tar.gz
Let dpkg-source -x touch all patched files to have the same
timestamp to mitigate time-skew problems (Denis Barbier). Closes: #105750
Diffstat (limited to 'scripts/dpkg-source.pl')
-rwxr-xr-xscripts/dpkg-source.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index 4306d2f92..4159b5bae 100755
--- a/scripts/dpkg-source.pl
+++ b/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");
}