mk-origtargz (Was: Problem with *.zip archives)

Joachim Breitner nomeata at debian.org
Mon May 5 07:19:25 UTC 2014


Hi,

Am Montag, den 05.05.2014, 08:49 +0200 schrieb Andreas Tille:
> Looking into the code I think I found the problem:
> 
> $ file ../camitk_3.3.1.orig.tar.gz
> ../camitk_3.3.1.orig.tar.gz: symbolic link to `camitk-3.3.1-indigo-Source.tar.gz'
> 
> When mk-origtargz is called by uscan the file in question is no symlink.
> However, if used separately it might perfectly happen that the file is a
> symlink and thus the code should probably follow this link to obtain the
> compression method.  I can confirm that mk-origtargz works as described
> if I specify the target of the symlink.

Good point! I guess I just need to pass "--dereference" too file to fix
this.... Yes, that seems to fixes it (test case added).

> However, if I use
> 
> mk-origtargz --compression xz ../camitk-3.3.1-indigo-Source.tar.gz
> 
> I only get a gzipped result (../ camitk_3.3.1+dfsg.orig.tar.gz) instead
> of an xz compressed repackaged tarball.  It seems, specifying the
> compression method does not work as expected.

That works as intended (by me ;-)), and as documented:

       --compression [ gzip | bzip2 | lzma | xz ]
                If --repack is used, or if the given file is a zip file,
                ensure that the resulting file is compressed using the
                given scheme. The default is gzip.
                
The rationale is this: If "mk-origtargz" without anything in
debian/copyright behaves one way (e.g. leaves gz files as gz files),
then it should behave the same way even after someone adds exclusions to
debian/copyright. Everything else would violate the principle of least
surprise.

So if you want to change the compression (which, in that case, you
probably want to do independent of whether files have to be removed),
you have to specify "--repack".

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: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20140505/86af8d25/attachment.sig>


More information about the devscripts-devel mailing list