Commit 255e73e11d1365fbb1e8d78287fad751a8ebc6e5 introduced a regression with empty patches by assuming that a patch analysis would always give back at least one filename. Reported-by: Niels Thykier <niels@thykier.net>
@@ -100,6 +100,8 @@ dpkg (1.16.0) UNRELEASED; urgency=low
in Uploaders. Closes: #598922
* Ignore whitespaces after options in headers of changelog entries.
Closes: #605719
+ * Fix dpkg-source's regression with empty patches (introduced while fixing
+ #613023). Closes: #619541
[ Jonathan Nieder ]
* Remove support for use of synchronous sync(2), due to its pernicious
@@ -543,7 +543,7 @@ sub apply {
# and remove .dpkg-orig files
my @files = keys %{$analysis->{'filepatched'}};
my $now = $opts{"timestamp"};
- $now ||= fs_time($files[0]) if $opts{"force_timestamp"};
+ $now ||= fs_time($files[0]) if $opts{"force_timestamp"} and scalar @files;
foreach my $fn (@files) {
if ($opts{"force_timestamp"}) {
utime($now, $now, $fn) || $! == ENOENT ||