Johannes Schauer writes ("Bug#800060: dgit push failed with checksum mismatch"):
...
> $ DEB_BUILD_OPTIONS=nocheck dgit -wdd sbuild -d unstable 
> --debbuildopt=--changes-option=-S
> $ dgit push

Looking at this again:

  sbuild --debbuildopt= means pass to sbuild's dpkg-buildpackage
  dpkg-buildpackage --changes-option= means pass to dpkg-genchanges
  dpkg-genchanges -S means source-only build

This is not a way I expected people to try to use dgit.  I think what
is happening is that:
  - dgit produces a .dsc (because it thinks it's dgit's job to
     build the source package) and a .debian.tar.gz
  - sbuild produces a /different/ (but hopefully equivalent!)
     .dsc and .debian.tar.gz.  This overwrites dgit's .debian.tar.xz
     but not dgit's .dsc.
  - dgit runs mergechanges to pick up the source it built and the
     binaries you built (well, this is what it thinks it is
     trying to do) but what actually happens is that you get
     a _multi.changes file talking about dgit's .dsc
  - but dgit's .dsc talks about the now-overwritten .debian.tar.xz
     hence the checksum mismatch

I think dgit could certainly do better at detecting and handling this.
I think expecting dgit to peer into sbuild --debuildopt= is probably
too much, but it could spot that the sbuild-generated .changes file
contains a source package and produce a helpful error message much
earlier.

Also I think dgit ought to have spotted that the .changes it was
thinking of getting you to sign was not going to work when uploaded.

I think you probably wanted `dgit build-source'.

I don't understand why you think you want to use sbuild to build the
source package.  After all, a source package is the _input_ to
sbuild.  Indeed `dgit sbuild' will feed dgit's .dsc to sbuild.
Invoking sbuild to run dpkg-buildpackage -S will just regenerate the
source package pointlessly.

Feel free to explain why I'm wrong, if I am!

If you could point me at which bits of the docs you looked at, I could
probably improve them.  (I'm loathe to _add_ too much because adding
too much just makes the doc _less_ useable for people, who have to
simply try stuff.)

Regards
Ian.

Reply via email to