mk-origtargz: Use the already parsed $data to check for Files-Excluded

Joachim Breitner nomeata at debian.org
Mon May 12 14:33:35 UTC 2014


Version: 2.14.2

Hi,

Am Montag, den 12.05.2014, 09:59 +0200 schrieb Andreas Tille:
> I realised that the latest devscripts upload now also includes the
> --compression option.  Thanks for all your work on this.  While I think
> that even the previous version fixed #685506 I wonder whether you kept
> this bug open intentionally.  From my point of view it can be closed.

I agree, that makes two of us, closing.

> I have adapted the wiki page about uscan enhancements[1] since all major
> points seem to be solved now.  The only remaining item was to enable a
> trigger for "tar --exclude-vcs" which now should probably go to
> mk-origtargz.  I just think that it is sensible to have an option to
> drop all the VCS stuff inside upstream tarballs.

Again, I’m opposed to silently do stuff with user’s data that he did not
explicitly asked for. What if upstream decides that he wants the git
repo in the tarball (after all, it is a distributed VCS, so why not
distribute it) and the build process uses it to calculate, say, the
version number and a change log at built time.

I don’t mind an option "--exclude-vcs" to mk-origtargz (and uscan) that
works like "--exclude-file .git --exclude-file _darcs" ...

> I'm going to file a bug report about this if you will not beat me with
> implementing this in Git first.  I think the implementation is pretty
> easy and any patch of mine will just pester you with my naming choice
> which has not proven the best one in the past and thus I would hesitate
> to send a patch.

It’s not as trivial as you think it might be. Currently, mk-origtarz
uses "tar --delete" and never actually unpacks the tarfile. But
--exclude-vcs does not work with --delete:

$ tar tf foo.tar 
foo/
foo/.git/
foo/.git/a
foo/b
$ tar --delete --file foo.tar --exclude-vcs
$ tar tf foo.tar 
foo/
foo/.git/
foo/.git/a
foo/b

It would probably work easiest by simply listing the various glob
patterns in mk-origtargz directly, like in the "origtarz" script, or use
@Dpkg::Source::Package::tar_ignore_default_pattern (from libdpkg-perl).

Do you also want options --exclude-backups, --exclude-caches,
--exclude-caches-all, --exclude-caches-under, .... :-)

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/20140512/6dd48c17/attachment.sig>


More information about the devscripts-devel mailing list