Changeset 24563

Show
Ignore:
Timestamp:
06.09.2011 15:40:29 (8 years ago)
Author:
ak19
Message:

1. On Windows, Depositor needs env var OS for the call to util::setup_greenstone_env() from bin\script\build to work (it will try to run setup.bat; if OS is set, it will be Windows_NT and if it's not set, it will default to Win95 and try to run a COMMAND statement that conflicts with the Depositor's building process. The fix is to let Apache have access to the env var OS, by using PassEnv?. 2. Fixed oversight of not closing filehandle in util::setup_greenstone_env().

Location:
main/trunk/greenstone2
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/util.pm

    r24362 r24563  
    15901590    if (!open(PIN, "$perl_command |")) { 
    15911591        print STDERR ("Unable to execute command: $perl_command. $!\n"); 
    1592     } 
     1592    } 
    15931593 
    15941594    while (defined (my $perl_output_line = <PIN>)) { 
     
    15971597        $ENV{$key}=$value; 
    15981598    } 
    1599      
     1599    close (PIN); 
     1600 
    16001601    # If any keys in $ENV don't occur in Greenstone's localised env  
    16011602    # (stored in $env_map), delete those entries from $ENV 
  • main/trunk/greenstone2/runtime-src/packages/apache-httpd/windows-httpd.conf.in

    r24008 r24563  
    5353# to the TEMP windows folder in case GS is installed on a non-writable media  
    5454# like a CD-ROM. 
    55 PassEnv "USERPROFILE" "ProgramFiles" LANG "TEMP" 
     55# Need to pass OS too, so that when the depositor builds and  
     56# util::setup_greenstone_env() is called, which then calls setup.bat,  
     57# the %OS% var is set. If empty, it defaults to Win95 instead of being  
     58# Windows_NT, and then things fail in a memory allocation line in setup.bat. 
     59PassEnv "USERPROFILE" "ProgramFiles" "TEMP" "OS" "LANG" 
    5660 
    5761#