Thread: Ant version detection
Hello, this is the first time I am dealing with the Postgres source. Therefore, I am hoping this is the right place to propose a patch. The patch is to be applied to the current CVS source. This is it: Index: configure =================================================================== RCS file: /projects/cvsroot/pgsql-server/configure,v retrieving revision 1.306 diff -r1.306 configure 3190c3190 < if "$ANT" -version | sed q | egrep -v ' 1\.[5-9]| [2-9]\.' >/dev/null ; then --- > if "$ANT" -version | egrep '^Apache Ant version' | sed q | egrep -v ' 1\.[5-9]| [2-9]\.' >/dev/null ; then Index: src/interfaces/ecpg/preproc/preproc.y =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/preproc/preproc.y,v retrieving revision 1.262 diff -r1.262 preproc.y 5250a5251 > ; The first one is a fix in the detection of the ant version. Some newer versions of ant echo the CLASSPATH variable before printing the version number. That behaviour breaks the version detection. Therefore, only lines beginning with "Apache Ant version" should be considered. The second one is a missing semicolon. I am not familiar with the bison syntax - but imho that semicolon _is_ missing. Kind regards, Johann Uhrmann -- Johann Uhrmann xpecto AG | Lindenstrasse 81 | D-84030 Ergolding Telefon: 0700 xpecto 00 (0700 973286 00) Telefax: 0700 xpecto 10 (0700 973286 10) Internet: http://www.xpecto.com
Johann Uhrmann <johann.uhrmann@xpecto.com> writes: > ... Therefore, only lines > beginning with "Apache Ant version" should be considered. Do *all* versions of Ant identify themselves that way? I'd be inclined to write grep -i "ant version" instead. > The second one is a missing semicolon. I am not familiar with the bison > syntax - but imho that semicolon _is_ missing. Got it, thanks. Some versions of bison warn about that and some don't... regards, tom lane
Tom Lane wrote: > Johann Uhrmann <johann.uhrmann@xpecto.com> writes: > >>... Therefore, only lines >>beginning with "Apache Ant version" should be considered. > > > Do *all* versions of Ant identify themselves that way? I'd be inclined > to write > grep -i "ant version" > instead. I agree, that seems a lot more stable. By the way, I am going to write a patch for asynchronous notification for the jdbc driver. (I hope I'll find some time to get it done.) What development guides are the best to start with? Kind regards, Hans -- Johann Uhrmann xpecto AG | Lindenstrasse 81 | D-84030 Ergolding Telefon: 0700 xpecto 00 (0700 973286 00) Telefax: 0700 xpecto 10 (0700 973286 10) Internet: http://www.xpecto.com
Johann, I would suggest putting together a rough proposal of what functionality you want to add (and if appropriate how you want to add it) and send it to the pgsql-jdbc mail list. Then incorporate the feedback you get from the community. thanks, --Barry Johann Uhrmann wrote: > Tom Lane wrote: > >> Johann Uhrmann <johann.uhrmann@xpecto.com> writes: >> >>> ... Therefore, only lines >>> beginning with "Apache Ant version" should be considered. >> >> >> >> Do *all* versions of Ant identify themselves that way? I'd be inclined >> to write >> grep -i "ant version" >> instead. > > > I agree, that seems a lot more stable. > > By the way, I am going to write a patch for asynchronous notification > for the jdbc driver. (I hope I'll find some time to get it done.) > > What development guides are the best to start with? > > > Kind regards, > > Hans >
Johann Uhrmann <johann.uhrmann@xpecto.com> writes: > Tom Lane wrote: >> Johann Uhrmann <johann.uhrmann@xpecto.com> writes: >>> ... Therefore, only lines >>> beginning with "Apache Ant version" should be considered. >> >> Do *all* versions of Ant identify themselves that way? I'd be inclined >> to write >> grep -i "ant version" >> instead. > I agree, that seems a lot more stable. Okay, patch applied with that change. (BTW, for future reference: the correct way to patch configure is to edit the source files, configure.in and/or the stuff under config/.) regards, tom lane