Package: devscripts Version: 2.17.5 Severity: wishlist Tags: patch Hi!
While importing some orig tarballs into git, found out that gbp-import-dsc was using the wrong time. Regardless of the command using the current localtime, or the file mtime, the latter would be definitely wrong in this case when fetched via debsnap anyway, so it would not be usable for the commit. The attached patch, changes it to preserve the remote mtime, which I think it's a more correct behavior. Thanks, Guillem
From 31b4b6d3b16e7a4aed44bb480e91c15ec5c795ef Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Fri, 21 Apr 2017 04:51:31 +0200 Subject: [PATCH] debsnap: Use the remote mtime when creating the local file Making a more exact copy, is useful so that you can see when the orig tarball was created, and it can be used further as the timestamp when importing into git for example. --- scripts/debsnap.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/debsnap.pl b/scripts/debsnap.pl index 8a3bf0ff..4f0ae0a9 100755 --- a/scripts/debsnap.pl +++ b/scripts/debsnap.pl @@ -320,7 +320,7 @@ elsif ($opt{binary}) { if (!have_file("$opt{destdir}/$file_name", $hash)) { verbose "Getting file $file_name: $file_url"; $mkDestDir->(); - LWP::Simple::getstore($file_url, "$opt{destdir}/$file_name"); + LWP::Simple::mirror($file_url, "$opt{destdir}/$file_name"); } } } @@ -354,7 +354,7 @@ else { if (!have_file("$opt{destdir}/$file_name", $hash)) { verbose "Getting file $file_name: $file_url"; $mkDestDir->(); - LWP::Simple::getstore($file_url, "$opt{destdir}/$file_name"); + LWP::Simple::mirror($file_url, "$opt{destdir}/$file_name"); } } } -- 2.12.2.816.g2cccc81164