[Reproducible-commits] [dpkg] 66/74: Dpkg::Source::Package::V2: Preset Last-Update field with current time

Mattia Rizzolo mattia at debian.org
Sun Jul 3 22:22:58 UTC 2016


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to annotated tag 1.18.8
in repository dpkg.

commit 0c945f0c9b385c9a1a3cba6089da24a61f416cc2
Author: Guillem Jover <guillem at debian.org>
Date:   Sun Jul 3 18:52:46 2016 +0200

    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 at apache.org>
---
 debian/changelog                  | 3 +++
 scripts/Dpkg/Source/Package/V2.pm | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index a79e1fd..df66b13 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 at 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 19970e5..610a741 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;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list