summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2016-07-03 18:52:46 +0200
committerGuillem Jover <guillem@debian.org>2016-07-03 21:02:25 +0200
commit0c945f0c9b385c9a1a3cba6089da24a61f416cc2 (patch)
tree83b04959bf4baf123e821ee0298f05472c66bc3a
parent92ca32c34f39f011c993e11746170c0258efb541 (diff)
downloaddpkg-0c945f0c9b385c9a1a3cba6089da24a61f416cc2.tar.gz
Dpkg::Source::Package::V2: Preset Last-Update field with current time
We know the current date, so let's make it easier on maintainers by presetting the field value when generating the patch header template. Closes: #828146 Based-on-patch-by: Daniel Shahaf <danielsh@apache.org>
-rw-r--r--debian/changelog3
-rw-r--r--scripts/Dpkg/Source/Package/V2.pm4
2 files changed, 6 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index a79e1fd82..df66b1321 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -77,6 +77,9 @@ dpkg (1.18.8) UNRELEASED; urgency=medium
- Disable upstream tar signature when building format 1.0 source packages
in Dpkg::Source::Package::V1, as the current stable dpkg series do not
support extracting them.
+ - Preset Last-Update field in patch header template with current time in
+ Dpkg::Source::Package::V2. Thanks to Daniel Shahaf <danielsh@apache.org>.
+ Closes: #828146
* Test suite:
- Bump perlcritic ValuesAndExpressions::RequireNumberSeparators minimum
to 99999.
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 19970e5be..610a74171 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -634,6 +634,8 @@ information below has been extracted from the changelog. Adjust it or drop
it.\n";
$header->{'Description'} .= $ch_info->{'Changes'} . "\n";
$header->{'Author'} = $ch_info->{'Maintainer'};
+ my $yyyy_mm_dd = POSIX::strftime('%Y-%m-%d', gmtime);
+
$text = "$header";
run_vendor_hook('extend-patch-header', \$text, $ch_info);
$text .= "\n---
@@ -647,7 +649,7 @@ Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
-Last-Update: <YYYY-MM-DD>\n\n";
+Last-Update: $yyyy_mm_dd\n\n";
return $text;
}