Re: dpkg-buildpackage question
On Mon, Jun 14, 2010 at 11:52:05AM +0200, Raphael Hertzog wrote:
> On Mon, 14 Jun 2010, Harald Jenny wrote:
> > > It should be possible to parse debian/changelog later in the process but
> > > I'm not convinced that it's a good idea.
> >
> > Well to be honest I don't know the script enough to guess what problem a later
> > parsing would imply :-/.
>
> The problem is not really in dpkg-buildpackage, but having the version
> number changes between the various steps (clean, build, binary) is not a
> good idea IMO.
I could also call a target directly from binary, would that be better?
>
> > patch:
> > dh_testdir
> > dpatch apply-all
> > sed -e "$(SED_SCRIPT)" debian/changelog.in > debian/changelog
> > sed -e "$(SED_SCRIPT)" debian/NEWS.in > debian/NEWS
>
> How do you decide of the version number ?
VERSION=$(shell if [ "`which git`" ] && [ "`git describe 2>/dev/null`" ]; then git describe | sed 's/^v//' ; else basename `pwd` | sed 's/^openswan-//' ; fi)
SED_SCRIPT=s!\$$VERSION!$(VERSION)!
>
> > > What set of commands do you want your users to have to type and where do
> > > they get the sources from?
> >
> > I want to keep it as simple as possible - dpkg-buildpackage -rfakeroot -b.
> > The source can be downloaded as tar or via git checkout.
>
> You could write a "build-snapshot" target in debian/rules that does:
> 1/ generate the changelog/NEWS file
> 2/ call dpkg-buildpackage -b
That is an interesting idea...
>
> And you tell the users to call "debian/rules build-snapshot" instead.
Well I somehow thought I could avoid this as "special threatment" is normally
exactly the kind of threatment that causes problems (users not reading README
etc...).
>
> Wouldn't that suit your needs?
It is for sure a good solution but more "things to think about" for the user
which was exactly what I wanted to omit ;-).
>
> BTW, I guess most end users do not need the .changes file anyway.
Ok maybe here the best technical solution is not the easiest solution for the
user - above all, as this packaged is not even supposed to build a completely
clean Debian paket I guess I will just change the when and not the how.
>
> Cheers,
> --
> Raphaël Hertzog
So thanks for your help and the ideas you gave me and I wish you a nice day
Harald
>
> 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: