Control: retitle -1 do something about tar-ignore in d/s/options

David Bremner writes ("Re: Bug#908417: dgit does not handle debian/.gitignore 
missing from source package"):
> Sean Whitton <spwhit...@spwhitton.name> writes:
> > Based on discussion on IRC, I believe that the problem is that the
> > options that dgit passes to dpkg-source, while sufficient to ensure that
> > .gitignore is included in the resultant source package, are not
> > sufficient to ensure that debian/.gitignore is included.  I.e. they do
> > not properly override tar-ignore.

Oh.  I see.

I hvve just RTFM dpkg-source(1) again (but not yet UTSL) and there
doesn't seem to be a way to reset the list of -I options.

I think the best I can do, therefore, is to detect this situation and
print a warning.  It has to be only a warning, because if the rogue -I
does not match any files in the tree then it is harmless - and this
situation will arise when NMUing a non-dgit-pushed package with such a
rogue -I.

(Of course a package with such a rogue -I is probably excluding parts
of the source code from the .dsc and is therefore a DFSG violation and
maybe a copyleft violation, although in the case of .gitignore quite a
minimal one.)

It might be a good idea to have a passlist of known-good options and
warn on any others.  But tar-ignore should be handled specially
because the warning can explain the likely consequences (and the fix,
although the fix - removing the option - is obvious and harmless).

It would be possible in principle to detect whether any files in the
git tree would match the rogue ignore - but not without reimplementing
dpkg-source's matching logic.

Ideally dgit should tolerate a tar-ignore which matches exactly .git
in the toplevel but that's even more work because it would involve
predicting the things which a regexp matches.


David, would a warning have been sufficient, to avoid this being a
significant inconvenience to you ?  Something like this perhsps:

  debian/source/options contains a tar-ignore option.
  If this option matches anything, dpkg-source's source
  package will differs from your git tree, and dgit push will fail.
  tar-ignore is not needed with dgit push, so you can remove it.

> > David, could you provide steps to reproduce?  I.e. a repository and a
> > git commit hash.
> 
> Hash: 8feec188a0bb3ed5dcda2c0e22c7645ca0d8f618
> Repo:         https://git.notmuchmail.org/git/notmuch
> 
> If you look at branch release, you can see the dgit created merge after
> that commit, and before the actual archive tag.

Thanks.  I will look at this.

Ian.

-- 
Ian Jackson <ijack...@chiark.greenend.org.uk>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.

Reply via email to