Hello Johannes,

On Sat, Jan 28, 2017 at 06:50:19PM +0100, Johannes Schauer wrote:
> Quoting Sean Whitton (2017-01-28 16:15:03)
> >  I suggest using `debuild -b` until you get the build right, then
> > squash your commits together, and finally you can allow dgit to
> > generate a single patch.
> 
> that doesn't solve the problem that I want to do the build in a clean chroot.
> My host system might be very different from Debian unstable and thus the
> package build *must* be done inside a chroot environment (as sbuild provides
> it) to be able to test whether my patch works or not.

Ah, right.  I have struggled with this myself.

One thing you can do is aggressively branch.  I.e.

    git checkout -b fix-foo
    hack, commit, sbuild, hack again, commit, sbuild
    # now undo all changes to d/patches
    git checkout master -- debian/patches
    git add debian/patches && git commit

    # now merge all your changes as a single commit, which will be
    # converted to a single patch
    git checkout master
    git merge --squash fix-foo

An alternative is to set up a longer-lived unstable chroot, and `dgit
clone` into that chroot.  Once you've done your work, you can upload
with `dgit rpush`.  Or possibly `dgit push` from outside the chroot.

Neither of these options are particularly pleasant.

> > In the latter case, dgit-maint-gbp(7) is the only viable option at present.
> 
> Because it works with a patches unapplied tree?

Yes.  You can use gbp-pq(1).

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature

Reply via email to