[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH/RFC] dpkg-source: add option to provide arbitrary commands for --before-build



On Fri, 28 May 2010, Jonathan Nieder wrote:
> Hi Raphaël,
> 
> As a bit of a purist and a lazy person, I don’t like keeping generated
> files in version control.  When upstream does not ship a changelog,
> the solution is to write a debian/autogen.sh that automatically
> generates a commit log and puts it in the debian/ directory, and ask
> people to run it before each build.
> 
> When the debian/source/local-options feature appeared, at the back of
> my mind I thought, “Could this be used to automatically run
> debian/autogen.sh?”  It looks like it could.
> 
> This patch might also be useful for those misguided souls that require
> autoreconf to be run on developer machines instead of buildds. :)
> 
> What do you think?

The idea has some appeal to me but I'm also worried about the interaction
with the patch system. In your use cases, the commands are clearly used
to create or modify content of the upstream source packake which means
that the net result is that your source package will end up with a 
new debian-changes-<ver> patch that would be misleading if it contained
the last changelog entry as justification of the patch.

You could do something more elaborate in that hook like using quilt to
record those changes in a new patch but then it starts to look like
overkill for the intended goal. It also means that you should run
the before-build commands after $srcpkg->before_build so that you can rely
on the fact that patches have already been applied (currently you run them
in the opposite order).

I also would like to see support from more than one developer for such a
feature before I accept to merge something like this.

Cheers,
-- 
Raphaël Hertzog

Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/


Reply to: