Idea: sbuild/pbuilder "--dgit" option

Ian Jackson ijackson at chiark.greenend.org.uk
Sat Dec 31 01:16:03 UTC 2016


Bernhard R. Link writes ("Re: Idea: sbuild/pbuilder "--dgit" option"):
> From my point of view (and thus from a git-dpm workflow), ignoring
> .gitignore as dpkg-source does by default is the only sane thing to do.
>
> I might be wrong, but having issues with .gitignore in the generated
> source package is a dgit-only thing (and from what I understand from
> DebConf2015) also not a technical but rather an ideological dgit thing.

There are two reasons.  One you might regard as ideological.  One is
clearly technical.  They both arise from dgit's fundamental aims.

The "ideological" reason is that the purpose of dgit is to get you a
git *view* of the actual source package in the archive (by importing
from the archive if necessary); and, conversely, to let a maintainer
publish their own git view of the source package.  For the dgit branch
to be a *view* of the source package in the archive, its contents must
be identical.  You may characterise it as "ideology" but I prefer to
see this as "the point of dgit".

The clearly-technical reason is that dgit provides a gateway between
git and .dsc.  This gateway (with the support of other tools) is
bidirectional: .dsc's are converted to git by dgit, when the
maintainer has not pushed with dgit; conversely, a dgit-using
maintainer will inevitably be using tools which do the conversion the
other way.  Obviously for this to work the conversion in each
direction has to be lossless.  Dropping .gitignore is not lossless.

To make this abstract problem into a concrete example: Suppose Alice
wants to upload package P version V.  She has a /.gitignore which is
not in upstream.  Suppose the tools arranged for her to push a dgit
git branch for P containing the .gitignore, but upload a P_V.dsc
without the .gitignore.  Suppose then an NMUer Bob, who does not use
dgit, uploads P version V+nmu1; his upload, therefore, does not
contain the /.gitignore.  When Alice uses `dgit fetch', dgit will
import P_V+nmu1.dsc for her.  Of course that import cannot contain
/.gitignore, so the git branch will be missing the .gitignore.  It
will look, in git, as if Bob deleted the .gitignore.  What has
actually happened is that Alice's tools have arranged for her to
promulgate two inconsistent views of the same version of the same
package.

> Thus I guess naming such an option --dgit would only be natural.

Does that mean that you would look favourably on a patch to add such
an option ?

> (I only wished [dpkg-source] would by default also ignore
> debian/.git* and thus include the debian/.git-dpm in the default
> ignore list).

I don't really understand git-dpm but I'm interested in ways to make
dgit play better with it.  I confess that I found our last
conversation too frustrating but I'm happy to try again.

Thanks,
Ian.

-- 
Ian Jackson <ijackson at 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.



More information about the vcs-pkg-discuss mailing list