Bug#898715: lintian: fails to parse extended timestamps in tarballs
Package: lintian
Version: 2.5.85
Severity: normal
Tags: patch
Dear Maintainer,
Now that lintian correctly instructs tar to output full timestamps
(22e197e4), it fails to parse timestamps in tarballs which contain
high-resolution times, such as xmp_4.1.0.orig.tar.gz
(http://http.debian.net/debian/pool/main/x/xmp/xmp_4.1.0.orig.tar.gz):
cannot parse tar output from src-orig-index: -rw-rw-r-- claudio/claudio 926 2014-11-25 21:47:29.12396808 INSTALL at /usr/share/lintian/checks/cruft.pm line 450.
internal error: cannot run cruft check on package source:xmp/4.1.0-1
warning: skipping check of source:xmp/4.1.0-1
The attached patch fixes this.
Regards,
Stephen
-- System Information:
Debian Release: 9.4
APT prefers stable-debug
APT policy: (500, 'stable-debug'), (500, 'stable'), (100, 'unstable-debug'), (100, 'testing-debug'), (100, 'unstable'), (100, 'testing'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-6-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages lintian depends on:
ii binutils 2.28-5
ii bzip2 1.0.6-8.1
ii diffstat 1.61-1+b1
ii dpkg 1.18.24
ii file 1:5.30-1+deb9u1
ii gettext 0.19.8.1-2
ii intltool-debian 0.35.0+20060710.4
ii libapt-pkg-perl 0.1.32
ii libarchive-zip-perl 1.59-1
ii libclass-accessor-perl 0.34-1
ii libclone-perl 0.38-2+b1
ii libdigest-sha-perl 5.96-1+b1
ii libdpkg-perl 1.18.24
ii libemail-valid-perl 1.202-1
ii libfile-basedir-perl 0.07-1
ii libipc-run-perl 0.94-1
ii liblist-moreutils-perl 0.416-1+b1
ii libparse-debianchangelog-perl 1.2.0-12
ii libperl5.24 [libdigest-sha-perl] 5.24.1-3+deb9u3
ii libtext-levenshtein-perl 0.13-1
ii libtimedate-perl 2.3000-2
ii liburi-perl 1.71-1
ii libxml-simple-perl 2.22-1
ii libyaml-libyaml-perl 0.63-2
ii man-db 2.7.6.1-2
ii patchutils 0.3.4-2
ii perl 5.24.1-3+deb9u3
ii t1utils 1.39-2
ii xz-utils 5.2.2-1.2+b1
Versions of packages lintian recommends:
ii libperlio-gzip-perl 0.19-1+b2
Versions of packages lintian suggests:
pn binutils-multiarch <none>
ii dpkg-dev 1.18.24
ii libhtml-parser-perl 3.72-3
ii libtext-template-perl 1.46-1
-- no debconf information
diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index a39a54e7a..8feae7f3b 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -444,7 +444,7 @@ sub _fetch_index_data {
# Note this cannot ever be 100% reliable as the filename might contain
# "fake" dates.
($perm,$ownership,$size,$date,$time,$name)
- = $line=~ /^(.{10}) (.*?) (\d+) ([-\d]{10}) ([:\d]{5,8}) (.*)$/;
+ = $line=~ /^(.{10}) (.*?) (\d+) ([-\d]{10}) ([:\d]{5,8}\.?\d*) (.*)$/;
croak "cannot parse tar output from $index: $line"
unless defined $perm;
$ownership =~ s/\s+$//;
Reply to: