Package: libdpkg-perl
Version: 1.18.7
Severity: wishlist
Tags: patch

Dear Maintainer,

Please find attached a trivial enhancement to 'dpkg-source --commit' to save
maintainers a manual step.

Cheers,

Daniel
(similar to #802561, which is against quilt)
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 6268b55..d32cbd3 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -30,6 +30,7 @@ use File::Path qw(make_path);
 use File::Spec;
 use File::Find;
 use File::Copy;
+use POSIX qw(strftime);
 
 use Dpkg::Gettext;
 use Dpkg::ErrorHandling;
@@ -632,6 +633,7 @@ it.\n";
     $header->{'Author'} = $ch_info->{'Maintainer'};
     $text = "$header";
     run_vendor_hook('extend-patch-header', \$text, $ch_info);
+    my $yyyy_mm_dd = strftime "%Y-%m-%d", gmtime;
     $text .= "\n---
 The information above should follow the Patch Tagging Guidelines, please
 checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
@@ -643,7 +645,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;
 }
 

Reply via email to