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

Andreas Tille tille at debian.org
Mon May 12 20:20:55 UTC 2014


Hi Joachim,

On Mon, May 12, 2014 at 04:33:35PM +0200, Joachim Breitner wrote:
> > 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.

Well, if the maintainer decides that VCS files could be removed he is
probably sure that the files are not needed.  I think it comes handy to
get rid of these files in an easy manner - the authors of tar had
probably things like this in mind.

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

This is what I meant and I hesitated to invent a name for this option.

> > 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:

Ahhh, you are right - so this would probably need a reimplementation of
--exclude-vcs ...
 
> 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, .... :-)

When thinking about it ...

Well, as I said I'm not very keen on this option since you can mention
the files also in Files-Excluded - I just used the --exclude-vcs option
of tar which came quite handy to reach the wanted goal.

Kind regards

        Andreas.

-- 
http://fam-tille.de



More information about the devscripts-devel mailing list