Hi Ben, dug this one out again since I really would like to see this adressed and I'm still unsure if we really need to do something:
On Mon, Oct 19, 2015 at 06:27:34PM +1100, Ben Finney wrote: > On 19-Oct-2015, Guido Günther wrote: > > > On Mon, Oct 19, 2015 at 12:51:08PM +1100, Ben Finney wrote: > > > The ‘gbp buildpackage’ command, for a package in “overlay” mode, > > > should not assume any of the ‘debian/rules’ commands will work in > > > the absence of the upstream source. That includes ‘clean’. > > > > > > Instead, before issuing the ‘debian/rules clean’ command, the > > > overlay needs to be assembled: get the upstream source for the > > > package, then overlay the Debian packaging files onto it. Only > > > after that can ‘debian/rules clean’ be expected to work in the > > > exported tree. > > > > I somehow agree here although I don't think the clean command makes much > > sense in the overlay case > > For comparison, the ‘bzr-buildpackage’ and ‘svn-buildpackage’ tools > both construct the overlay (they call it “merge with upstream”), and > then call ‘debian/rules clean’. > > I think ‘bzr-buildpackage’, at least, uses ‘dpkg-buildpackage’ and > ‘dpkg-source’, which call ‘debian/rules clean’ on the resulting source > tree. > > $ bzr-buildpackage --source > Building using working tree > Building package in merge mode > Looking for a way to retrieve the upstream tarball > Upstream tarball already exists in build directory, using that > Building the package in > /home/bignose/Projects/debian/python-adventure/bzr/build-area/python-adventure-1.3, > using debuild -S > dpkg-buildpackage -rfakeroot -d -us -uc -S So this looks like bzr-buildpackage is calling debuild -S after assembling the overlay. Wouldn't that be equivalent of calling gbp buildpackage --git-postexport="debuild -S" … If this works we could update the documentation (which at the moment doesn't talk about --git-overlay at all). > dpkg-buildpackage: source package python-adventure > dpkg-buildpackage: source version 1.3-1 > dpkg-buildpackage: source distribution UNRELEASED > dpkg-buildpackage: source changed by Ben Finney > <[email protected]> > dpkg-source --before-build python-adventure-1.3 > fakeroot debian/rules clean > dh clean --with python3 --buildsystem=pybuild > dh_testdir -O--buildsystem=pybuild > debian/rules override_dh_auto_clean > make[1]: Entering directory > '/home/bignose/Projects/debian/python-adventure/bzr/build-area/python-adventure-1.3' > dh_auto_clean > […] > > This is done so that the ‘debian/rules clean’ target can perform any > cleaning of the source tree needed before build. This ensures the > build is repeatable. This should be achievable by the above. I'd rather not use the --git-cleaner for that since this command is responsible for cleaning the git working tree. Cheers, -- Guido > > so just setting the cleaner to /bin/true works around this and maybe > > we should just skip it in overlay mode altogether? > > I would expect ‘git-buildpackage’ should as closely as feasible mirror > the overlay behaviour of the original ‘svn-buildpackage’, and later > ‘bzr-buildpackage’ and ‘hg-buildpackage’. > > That includes, AFAICT, constructing the overlaid source tree, then > calling ‘debian/rules clean’ (maybe using ‘dpkg-source’ to do it) > inside the resulting source tree, before continuing the build. > > -- > \ “For every complex problem, there is a solution that is simple, | > `\ neat, and wrong.” —Henry L. Mencken | > _o__) | > Ben Finney <[email protected]>

