Changeset 27997

Show
Ignore:
Timestamp:
08.08.2013 10:18:22 (6 years ago)
Author:
kjdon
Message:

need to check that perfect hash function was generated otherwise we can't continue and build the index

Files:
1 modified

Legend:

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

    r27985 r27997  
    520520     
    521521    my $hash_status = system ($hash_cmd); 
    522     print $outhandle "\nstatus from running hash_cmd: $hash_status\n" if ($self->{'verbosity'} >= 4);    
     522    print $outhandle "\nstatus from running hash_cmd: $hash_status\n" if ($self->{'verbosity'} >= 4); 
     523    # check that perf hash was generated - if not, don't carry on 
     524    if ($hash_status !=0) { 
     525        print $outhandle "mgppbuilder::build_index - Couldn't create index $index as there are too few words in the index.\n"; 
     526        print STDERR "<Warning name='NoIndex'/>\n</Stage>\n" if $self->{'gli'}; 
     527        $self->{'notbuilt'}->{$index}=1; 
     528        return; 
     529         
     530    } 
    523531     
    524532    if (!-e "$mgpp_passes_exe" ||