Usage of mime type in mk-origtargz
Joachim Breitner
nomeata at debian.org
Tue Jul 1 15:26:08 UTC 2014
Hi,
Am Dienstag, den 01.07.2014, 09:54 +0200 schrieb Andreas Tille:
> Parameter ../download-bucket does not look like a tar archive or a zip file. at /usr/bin/mk-origtargz line 320.
This is this code
unless ($is_zipfile or $is_tarfile) {
# TODO: Should we ignore the name and only look at what file knows?
die "Parameter $upstream does not look like a tar archive or a zip file."
}
and I agree that this should be using file to determine $is_tarfile. (Or
we simply drop this check and let it fail on non-supported files later.)
Looking at the code I noticed this commit:
commit 0f771df8868575522669f4558a74231162db7097
Author: James McCoy <jamessan at debian.org>
Date: Tue May 27 22:52:12 2014 -0400
Devscripts::Compression: Add support for .zip/.Z files
Shadow Dpkg::Compression's compression_get_property in order to easily
support extracting .zip/.Z files.
Signed-off-by: James McCoy <jamessan at debian.org>
which I have doubts about: While for gzip etc. the decompression command
decompresses from stdin to stdout, this is not true for unzip. zip,
being also a package format, should not be handled in
Devscripts::Compression.
It seems you added this in order to (ab)use compression detection to
detect a zipfile (fea069683b6b6ccd81b7cb5274e3eae1f54cf97f).
I suggest to implement the file format detection independently from the
compression detection and remove zip from Devscripts::Compression.
James, do you agree?
Greetings,
Joachim
--
Joachim "nomeata" Breitner
Debian Developer
nomeata at debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
JID: nomeata at joachim-breitner.de | http://people.debian.org/~nomeata
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20140701/9e68898b/attachment.sig>
More information about the devscripts-devel
mailing list