%ENV warnings during builds

Started by Craig Ringerover 14 years ago3 messages
#1Craig Ringer
craig@postnewspapers.com.au

Hi folks

It looks like pgflex.bat and pgbison.bat in the win32 build files would
benefit from a tweak to eliminate a complaint from Perl.

Perl emits the error:

Hash %ENV missing the % in argument 1 of each() at -e line 1

on the lines that process buildenv.pl. This is because % in batch files
is processed differently to on the command line. (Yes, that's stupid).
Quoting doesn't affect this. Percent signs in batch files that are
intended to be literals should be doubled, so %ENV should be written %%ENV.

http://support.microsoft.com/kb/75634

I. Hate. Batch. Files.

--
Craig Ringer

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Craig Ringer (#1)
Re: %ENV warnings during builds

On sön, 2011-07-03 at 20:14 +0800, Craig Ringer wrote:

It looks like pgflex.bat and pgbison.bat in the win32 build files would
benefit from a tweak to eliminate a complaint from Perl.

Perl emits the error:

Hash %ENV missing the % in argument 1 of each() at -e line 1

on the lines that process buildenv.pl. This is because % in batch files
is processed differently to on the command line. (Yes, that's stupid).
Quoting doesn't affect this. Percent signs in batch files that are
intended to be literals should be doubled, so %ENV should be written %%ENV.

Previously reported:
http://archives.postgresql.org/message-id/1301949704.21336.6.camel@vanquo.pezone.net

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Peter Eisentraut (#2)
Re: %ENV warnings during builds

On Sun, July 3, 2011 8:54 am, Peter Eisentraut wrote:

On sön, 2011-07-03 at 20:14 +0800, Craig Ringer wrote:

It looks like pgflex.bat and pgbison.bat in the win32 build files would
benefit from a tweak to eliminate a complaint from Perl.

Perl emits the error:

Hash %ENV missing the % in argument 1 of each() at -e line 1

on the lines that process buildenv.pl. This is because % in batch files
is processed differently to on the command line. (Yes, that's stupid).
Quoting doesn't affect this. Percent signs in batch files that are
intended to be literals should be doubled, so %ENV should be written
%%ENV.

Previously reported:
http://archives.postgresql.org/message-id/1301949704.21336.6.camel@vanquo.pezone.net

I knew this sounded familiar. Now I look a bit more closely at it, the
reason we don't see this on the buildfarm is that it doesn't write
buildenv.pl, so the code doesn't get called there.

I've committed this change in the three places it occurs.

cheers

andrew