[lintian] 01/04: coll: Pass -m to tar to save a few utimenat calls in tar
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 02d7fe46f53c078b64472782c991c572b2477af0
Author: Niels Thykier <niels@thykier.net>
Date: Mon Oct 6 21:45:44 2014 +0200
coll: Pass -m to tar to save a few utimenat calls in tar
Signed-off-by: Niels Thykier <niels@thykier.net>
---
collection/bin-pkg-control | 2 +-
collection/unpacked | 2 +-
debian/changelog | 6 ++++++
t/debs/deb-format-ancient-file/desc | 1 -
t/debs/deb-format-ancient-file/tags | 1 -
5 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/collection/bin-pkg-control b/collection/bin-pkg-control
index 7615aa0..0db1779 100755
--- a/collection/bin-pkg-control
+++ b/collection/bin-pkg-control
@@ -58,7 +58,7 @@ sub collect {
$job = { fail => 'error', err => "$dir/control-errors" };
push @jobs, $job;
# extract the tarball's contents
- spawn($job, ['tar', 'xf', "$dir/control.tar", '-C', "$dir/control", '&']);
+ spawn($job, ['tar', '-mxf', "$dir/control.tar", '-C', "$dir/control", '&']);
$job = {
fail => 'error',
diff --git a/collection/unpacked b/collection/unpacked
index 4a5298a..dcdbe24 100755
--- a/collection/unpacked
+++ b/collection/unpacked
@@ -157,7 +157,7 @@ sub extract_and_index_deb {
@jobs,
{
'fail' => 'error',
- '_pipeline' => [['tar', 'xf', '-', '-C', "$dir/unpacked"]],
+ '_pipeline' => [['tar', '-mxf', '-', '-C', "$dir/unpacked"]],
'pipe_in' => FileHandle->new,
'err' => "$dir/unpacked-errors",
});
diff --git a/debian/changelog b/debian/changelog
index 4042d7c..fe40557 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,12 @@ lintian (2.5.29) UNRELEASED; urgency=medium
XXX: generate tag summary with private/generate-tag-summary
+ * collection/{bin-pkg-control,unpacked}:
+ + [NT] Pass "-m" to tar to make it avoid "correcting" the
+ timestamp of the extracted files. Lintian does not need
+ it for correctness, so it can make tar save a few syscalls
+ here.
+
-- Niels Thykier <niels@thykier.net> Thu, 02 Oct 2014 22:22:31 +0200
lintian (2.5.28) unstable; urgency=medium
diff --git a/t/debs/deb-format-ancient-file/desc b/t/debs/deb-format-ancient-file/desc
index c63a29d..f24af31 100644
--- a/t/debs/deb-format-ancient-file/desc
+++ b/t/debs/deb-format-ancient-file/desc
@@ -4,4 +4,3 @@ Version: 1.0
Description: Test package containing an ancient file
Test-For:
package-contains-ancient-file
- tar-errors-from-control
diff --git a/t/debs/deb-format-ancient-file/tags b/t/debs/deb-format-ancient-file/tags
index c00701c..2d03776 100644
--- a/t/debs/deb-format-ancient-file/tags
+++ b/t/debs/deb-format-ancient-file/tags
@@ -1,2 +1 @@
E: deb-format-ancient-file: package-contains-ancient-file usr/share/doc/deb-format-ancient-file/changelog.gz 1970-01-01
-E: deb-format-ancient-file: tar-errors-from-control control: implausibly old time stamp 1969-12-31 23:59:59
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: