chiark / gitweb /
dgit: build_source mostly uses a playtree, not $maindir
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 26 Jul 2018 10:08:45 +0000 (11:08 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 26 Jul 2018 12:00:46 +0000 (13:00 +0100)
commitdbee6afd429a8cf4136a040d95ea10fe3a38520e
treea92cf86619ebe523a632d0071a6e7b06a8b80bc2
parent42d2e3ec03b634c5719700c5bcfb27f0f652d74c
dgit: build_source mostly uses a playtree, not $maindir

In particular, it uses a playtree unless we are trying to include
uncommitted changes in the source package (which is not supported in
split brain mode).

This change allows build_source to respect $buildproductsdir.  It will
also enable, later, building a source package from HEAD, or arbitrary
git ref, when the working tree is dirty.

This change also requires modifying build_prep to only conditionally
clean $maindir.  It should clean $maindir only when it's $maindir that
we're packing into a source package, or when we are running any
builder in $maindir.

When we are using a playtree we must build the changes file there too,
because dpkg-genchanges cannot be persuaded to look for the .dsc
anywhere but ../.

Right now build-source still cleans the tree needlessly.

We need to change the test suite to not expect a clean unless running
a builder:

dgit now cleans the tree only when including uncommitted changes in a
source package, and when running a builder in $maindir.  The code in
lib-build-modes does not test the including of uncommitted changes in
a source package.  Thus, it should expect the tree to be cleaned only
when running a builder.

Also, we need to not expect a clean with sbuild, for the same reason.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit
tests/lib-build-modes