Changeset 27985

Show
Ignore:
Timestamp:
06.08.2013 15:38:51 (6 years ago)
Author:
ak19
Message:

Now prints out exit status and weights and passes commands that get run when verbosity is set high

Location:
main/trunk/greenstone2/perllib
Files:
2 modified

Legend:

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

    r27535 r27985  
    451451        die "mgbuilder::build_index - couldn't run $mg_perf_hash_build_exe\n"; 
    452452    } 
    453     system ("mg_perf_hash_build$exe -f \"$fullindexprefix\" $osextra"); 
     453     
     454    my $hash_cmd = "mg_perf_hash_build$exe -f \"$fullindexprefix\" $osextra" 
     455    print $outhandle "\ncmd: $hash_cmd\n" if ($self->{'verbosity'} >= 4); 
     456    my $hash_status = system ($hash_cmd); 
     457    print $outhandle "\nstatus from running hash_cmd: $hash_status\n" if ($self->{'verbosity'} >= 4); 
    454458 
    455459    if (!-e "$mg_passes_exe" ||  
     
    477481 
    478482    close ($handle); 
     483    my $passes_exit_status = $?; 
     484    print $outhandle "\nMG passes exit status $passes_exit_status\n"  if ($self->{'verbosity'} >= 4); 
    479485     
    480486    # create the weights file 
     
    485491        die "mgbuilder::build_index - couldn't run $mg_weights_build_exe\n"; 
    486492    } 
    487     system ("mg_weights_build$exe -f \"$fullindexprefix\" -t \"$fulltextprefix\" $osextra"); 
     493    my $weights_cmd = "mg_weights_build$exe -f \"$fullindexprefix\" -t \"$fulltextprefix\" $osextra"; 
     494    print $outhandle "\ncmd: $weights_cmd\n" if ($self->{'verbosity'} >= 4); 
     495    system ($weights_cmd); 
    488496 
    489497    # create 'on-disk' stemmed dictionary 
  • main/trunk/greenstone2/perllib/mgppbuilder.pm

    r27328 r27985  
    516516        die "mgppbuilder::build_index - couldn't run $mgpp_perf_hash_build_exe\n"; 
    517517    } 
    518     system ("mgpp_perf_hash_build$exe -f \"$fullindexprefix\" $osextra"); 
    519  
     518    my $hash_cmd = "mgpp_perf_hash_build$exe -f \"$fullindexprefix\" $osextra"; 
     519    print $outhandle "\ncmd: $hash_cmd\n" if ($self->{'verbosity'} >= 4); 
     520     
     521    my $hash_status = system ($hash_cmd); 
     522    print $outhandle "\nstatus from running hash_cmd: $hash_status\n" if ($self->{'verbosity'} >= 4);    
     523     
    520524    if (!-e "$mgpp_passes_exe" ||  
    521525        !open ($handle, "| mgpp_passes$exe -M $maxnumeric $mgpp_passes_sections -f \"$fullindexprefix\" -I2 $osextra")) { 
     
    540544 
    541545    close ($handle); 
     546    my $passes_exit_status = $?; 
     547    print $outhandle "\nMGPP Passes exit status $passes_exit_status\n"  if ($self->{'verbosity'} >= 4);  
    542548     
    543549    # create the weights file 
     
    548554        die "mgppbuilder::build_index - couldn't run $mgpp_weights_build_exe\n"; 
    549555    } 
    550     system ("mgpp_weights_build$exe -f \"$fullindexprefix\" $osextra"); 
     556    my $weights_cmd = "mgpp_weights_build$exe -f \"$fullindexprefix\" $osextra"; 
     557    print $outhandle "\ncmd: $weights_cmd\n" if ($self->{'verbosity'} >= 4);     
     558    system ($weights_cmd); 
    551559 
    552560    # create 'on-disk' stemmed dictionary