Thread: snapshot generation broken again...

snapshot generation broken again...

From
Stefan Kaltenbrunner
Date:
Looks like somebody broke the snapshot generation script again:


Note: meta manvol : see http://docbook.sf.net/el/manvolnum 
dblink_build_sql_delete
Note: Writing man1/dblink_build_sql_delete.1
Note: meta manvol : no refentry/refmeta/manvolnum 
dblink_build_sql_update
Note: meta manvol : see http://docbook.sf.net/el/manvolnum 
dblink_build_sql_update
Note: Writing man1/dblink_build_sql_update.1
Usage: genbki.pl [options] header...

Options:    -I               path to include files    -o               output path    --set-version    PostgreSQL
versionnumber for initdb cross-check
 

genbki.pl generates BKI files from specially formatted
header files.  These BKI files are used to initialize the
postgres template database.

Report bugs to <pgsql-bugs@postgresql.org>.
gmake[4]: *** [postgres.bki] Error 255
gmake[3]: *** [distprep] Error 2
gmake[2]: *** [distprep] Error 2
gmake[1]: *** [distprep] Error 2
gmake: *** [distdir] Error 2



Stefan


Re: snapshot generation broken again...

From
Tom Lane
Date:
Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
> Looks like somebody broke the snapshot generation script again:

[ scratches head... ]  "make dist" works for me.  Can you get a
trace indicating what command was used to call genbki.pl?
        regards, tom lane


Re: snapshot generation broken again...

From
Stefan Kaltenbrunner
Date:
Tom Lane wrote:
> Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
>> Looks like somebody broke the snapshot generation script again:
> 
> [ scratches head... ]  "make dist" works for me.  Can you get a
> trace indicating what command was used to call genbki.pl?

heh that's a nice one the snapshot generation script uses "
gmake -s VERSION=snapshot dist" and that leads to getting "
--set-version=snapshot" passed to genbki.pl which fails the regex there 
and the if() falls through to the usage().


Stefan


Re: snapshot generation broken again...

From
John Naylor
Date:
Here's a fix. Sorry, I didn't realize it was ever called without a
version number.

On Wed, Jan 6, 2010 at 11:18 AM, Stefan Kaltenbrunner
> heh that's a nice one the snapshot generation script uses "
> gmake -s VERSION=snapshot dist" and that leads to getting "
> --set-version=snapshot" passed to genbki.pl which fails the regex there and
> the if() falls through to the usage().

Attachment

Re: snapshot generation broken again...

From
Tom Lane
Date:
Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
> Tom Lane wrote:
>> [ scratches head... ]  "make dist" works for me.  Can you get a
>> trace indicating what command was used to call genbki.pl?

> heh that's a nice one the snapshot generation script uses "
> gmake -s VERSION=snapshot dist" and that leads to getting "
> --set-version=snapshot" passed to genbki.pl which fails the regex there 
> and the if() falls through to the usage().

Huh ... that doesn't make any sense, because the previous shell-script
version also spits up on non-numeric VERSION.  How did it work before?

[... thinks ...]  Oh: it didn't, because we didn't use to try to call
this during distprep.  We'd not want "snapshot" as the version number
in postgres.bki anyway.  So we need to change the makefile to not rely
on VERSION for this, I guess.  Will fix.
        regards, tom lane


Re: snapshot generation broken again...

From
Tom Lane
Date:
John Naylor <jcnaylor@gmail.com> writes:
> Here's a fix. Sorry, I didn't realize it was ever called without a
> version number.

It's not supposed to be.  If it fails to put the correct version number
into the .bki file, initdb will spit up.  This is really a makefile bug,
not genbki's fault.
        regards, tom lane


Re: snapshot generation broken again...

From
Stefan Kaltenbrunner
Date:
Tom Lane wrote:
> John Naylor <jcnaylor@gmail.com> writes:
>> Here's a fix. Sorry, I didn't realize it was ever called without a
>> version number.
> 
> It's not supposed to be.  If it fails to put the correct version number
> into the .bki file, initdb will spit up.  This is really a makefile bug,
> not genbki's fault.

really? there are provisions withing genbki.pl that are supposed to 
provide a proper error message(and would have likely helped to find the 
issue in that case as well):

die "Version not specified or wrong format.\n" if !defined $major_version;

however due to the way the current checks are executed you won't 
actually see that error...


Stefan


Re: snapshot generation broken again...

From
Tom Lane
Date:
Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
> really? there are provisions withing genbki.pl that are supposed to 
> provide a proper error message(and would have likely helped to find the 
> issue in that case as well):
> die "Version not specified or wrong format.\n" if !defined $major_version;
> however due to the way the current checks are executed you won't 
> actually see that error...

Good point, the way that the error checking is done in the script leaves
a lot to be desired there.
        regards, tom lane