Changeset 27041

Show
Ignore:
Timestamp:
12.03.2013 11:24:11 (7 years ago)
Author:
jmt12
Message:

INC path now includes the installed extensions perl path (including looking for the correct version number)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/bin/script/parse_task_info_from_hadoop_log.pl

    r27036 r27041  
    1616  die "HDFS HOST not set (set in <gsdl>/ext/parallel_processing/setup.bash)\n" unless defined $ENV{'HDFSHOST'}; 
    1717  die "HDFS PORT not set (set in <gsdl>/ext/parallel_processing/setup.bash)\n" unless defined $ENV{'HDFSPORT'}; 
    18  
    19   unshift (@INC, $ENV{'GEXTPARALLELBUILDING'} . '/perllib/cpan'); 
     18  # Ensure Greenstone Perl locations are in INC 
     19  unshift (@INC, $ENV{'GSDLHOME'} . '/perllib'); 
     20  unshift (@INC, $ENV{'GSDLHOME'} . '/perllib/cpan'); 
     21  # we'll need the perl version number 
     22  my ($version_number) = $^V =~ /(\d+\.\d+\.\d+)/; 
     23  if (defined $ENV{'GSDLEXTS'}) 
     24  { 
     25    my @extensions = split(/:/,$ENV{'GSDLEXTS'}); 
     26    foreach my $e (@extensions) 
     27    { 
     28      my $ext_prefix = $ENV{'GSDLHOME'} . '/ext/' . $e; 
     29      unshift (@INC, $ext_prefix . '/perllib'); 
     30      unshift (@INC, $ext_prefix . '/perllib/cpan'); 
     31      unshift (@INC, $ext_prefix . '/' . $ENV{'GSDLOS'} . '/lib/perl/' . $version_number); 
     32    } 
     33  } 
    2034} 
    2135