Johannes Schauer writes ("Bug#800054: dgit: using dpkg-buildpackage to build 
source package requires build dependencies to be installed"):
> Package: dgit
> Version: 1.4
> Severity: normal
...
> Why is dpkg-checkbuilddeps run in the first place? Do you need it to run
> the debian/rules clean target? Is my git tree not already clean?

Your git tree might not already be clean.  If it isn't, the generated
source package would be wrong.  So the logic is as follows:

 - Your git tree might not be clean.
   You can tell dgit that you promise it is, by saying --clean=none,
   or simply have dgit check whether it is, with --clean=check.

 - By default, dgit does not run git-clean, because that would
   delete anything you had forgotten to git-add.  You can
   tell dgit you want to run git-clean, with --clean=git[-ff].

 - Otherwise, dgit needs to run rules clean.

 - According to the spec, rules clean needs the build-deps.
   You can promise dgit that you your package's clean target does
   not need the build-deps, with --clean=dpkg-source-d.

Personally I like -wgf aka --clean=git-ff.

> but it seems that later on, dgit requires a .changes file which seems to
> be the reason why it is run. This is a pity because sbuild would've
> created that changes file if it were able to run. Is there something in
> dgit that requires something from the changes file *before* running
> sbuild?

Depending on your --clean mode, dgit sbuild might itself use
dpkg-source -b.

I think you're right that in those cases it would make sense for dgit
sbuild not to involve a the _source.changes file.  That would be
possible (although it would make the code have yet another special
case...)

Ian.

Reply via email to