Hi,
On Fri, Dec 01, 2017 at 05:40:42PM +1100, Ben Finney wrote:
> On 19-Nov-2017, Guido Günther wrote:
> > 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" …
> 
> When I try, it still fails because it's trying to invoke the upstream build
> system *before* assembling the overlay:
> 
> =====
> $ gbp buildpackage --git-postexport='debuild -S'
> gbp:info: Building with (cowbuilder) for sid
> gbp:info: Postexport hook set, delaying tarball creation
> gbp:info: Exporting 'WC' to 
> '/home/bignose/Projects/debian/xkcdpass/build-area/xkcdpass-tmp'
>  dpkg-buildpackage -rfakeroot -us -uc -ui -S
> dpkg-buildpackage: info: source package xkcdpass
> dpkg-buildpackage: info: source version 1.14.2-1
> dpkg-buildpackage: info: source distribution UNRELEASED
> dpkg-buildpackage: info: source changed by Ben Finney <bign...@debian.org>
>  dpkg-source --before-build xkcdpass-tmp
>  fakeroot debian/rules clean
> dh clean --with bash-completion,python3 --buildsystem=pybuild
>    debian/rules override_dh_auto_clean
> make[1]: Entering directory 
> '/home/bignose/Projects/debian/xkcdpass/build-area/xkcdpass-tmp'
> dh_auto_clean
> E: pybuild pybuild:96: cannot detect build system, please use --system option 
> or set PYBUILD_SYSTEM env. variable
> dh_auto_clean: pybuild --clean -i python{version} -p 3.6 returned exit code 11
> debian/rules:48: recipe for target 'override_dh_auto_clean' failed
> make[1]: *** [override_dh_auto_clean] Error 25
> make[1]: Leaving directory 
> '/home/bignose/Projects/debian/xkcdpass/build-area/xkcdpass-tmp'
> debian/rules:35: recipe for target 'clean' failed
> make: *** [clean] Error 2
> dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned 
> exit status 2
> debuild: fatal error at line 1151:
> dpkg-buildpackage -rfakeroot -us -uc -ui -S failed
> gbp:error: Postexport-hook 'debuild -S' failed: it exited with 29
> =====
> 
> That may be what you expected to see, but I'm not sure.

This is wired and it looks different for me. However it has another
problem since the upstream tarball is not in the build-area at this
point "debuild -S" will complain. That's o.k. since the postexport hook
is exactly for messing with the upstream sources. However we also have a
prebuild hook:

    gbp --git-pbuilder --git-export-dir=../build-area  --git-no-pristine-tar 
--git-overlay --git-prebuild="debuild -S"

I've put all the options here _and_ removed debian/gbp.conf from your
example package. You can drop further options depending on where you
want to get the upstream tarball from.

So in summary I think the prebuild hook is what you want to use. I've
clarified hook usage in the docs a bit. 

Cheers,
 -- Guido

> 
> -- 
>  \       “You can never entirely stop being what you once were. That's |
>   `\   why it's important to be the right person today, and not put it |
> _o__)                                 off until tomorrow.” —Larry Wall |
> Ben Finney <b...@benfinney.id.au>

Reply via email to