Mattia Rizzolo writes ("Re: Bug#910687: dgit: crash with perl backtrace"):
> On Tue, Oct 09, 2018 at 11:44:34PM +0100, Ian Jackson wrote:
> > I think this diff will fix it.  You can apply it directly with patch
> > to dgit in your /usr/bin if you like.
> 
> Right, with your patch I see it's not crashing anymore.
> 
> However I also see that:
>  * without --include-dirty, it's completely ignoring the added
>    d/source/format file

This is indeed wrong.  I think fixing "dgit: build-source and
push-source disregard -wc" the way I plan to would fix this too.

>  * with --iclude-dirty is giving up with
>     error: tree contains uncommitted files and --clean=check specified

That seems coherent.  Unless you think --include-dirty should turn
--clean=check into --clean=none ?  That seems unwise.

Consider --clean=dpkg-source --ignore-dirty, which means to run the
rules clean target and then tolerate uncommitted stuff.

>  * without -wc and with --include-dirty, it tries to its quilt
>    linearisation, but it fails with:

I think this is because the algorithm used by dgit for quilt
linearisation implicitly assumes that it can use the
debian/source/format from your git tree.  I think trying to work with
an uncommitted change to debian/source/format is sufficiently weird
that I don't mind that it goes wrong.

The other question is what you expected dgit's quilt linearisation to
do for you.  If you use --include-dirty with a tree with
dpkg-source-uncommitted changes, I think you'll get the same error.
There is no way round this because dgit's quilt fixup generates
a *commit* containing the added patches.  It wouldn't make sense to
commit patches for uncommitted changes.

That --include-dirty does not cause dgit to try to do quilt fixup for
uncommitted changes is perhaps implicit in
  https://manpages.debian.org/unstable/dgit/dgit.7.en.html#FORMAT_3.0_(QUILT)
and the description of `dgit quilt-fixup' in
  https://manpages.debian.org/unstable/dgit/dgit.1.en.html
but perhaps something should be included in the discussion of
--include-dirty, maybe something like this:

  Changes not committed to git are not taken into account by dgit's
  quilt fixup (see `FORMAT 3.0 (QUILT)' in dgit(7).  So you may need
  to run dpkg-source --commit yourself.

?

> I'm not sure if I'm doing something in a way I'm not supposed to do
> here.
> Note that I already worked around this bug yesterday by manually calling
> dpkg-source --commit and git commit the resulting quilt patch, at which
> point dgit goes back behaving the way I know it.

Right, that was you manually constructing the patches-applied git branch
which is what dgit works with.

Thanks,
Ian.

Reply via email to