2013-06-24T22:43:44+12:00 (9 years ago)

Fixed another very subtle to do with the case of the TASK_HOME env var set in environment.pl used by envi when launched via run-gs2-diffcol.pl. It ends up being all lowercase by the time import.pl is run and archiveinf-doc is generated. This then ends up being sorted differently when db2txt -sort is run on it than if the title case of TASK_HOME had been preserved, as happens when task.pl is run directly (and TASK_HOME is taken as the current working dir at that point)

1 edited


  • other-projects/nightly-tasks/diffcol/trunk/task.pl

    r27694 r27701  
    3737my $use_blat = 0; # if we ever get blat to send mail/attachments on Windows working, set this to 1
    3940# TASK_HOME should be the toplevel diffcol folder
    4041$ENV{'TASK_HOME'} = getcwd unless defined $ENV{'TASK_HOME'};
    41 $ENV{'TASK_HOME'} =~ s@\/@\\@g if $isWin;
     42if($isWin) {
     43    $ENV{'TASK_HOME'} =~ s@\/@\\@g;
     44    # need to convert TASK_HOME path name to resolve very subtle bug when running task.pl via
     45    # run-gs2-diffcol.bat which uses environment.pl's TASK_HOME setting via envi
     46    # At that point TASK_HOME is already defined but ends up lowercase, so that entries in archiveinf-doc
     47    # end up sorted differently when db2txt -sort is applied compared to if TASK_HOME had kept its case.   
     48    require Win32; # for working out Windows Long Filenames from Win 8.3 short filenames
     49    $ENV{'TASK_HOME'} = &Win32::GetLongPathName($ENV{'TASK_HOME'});
    4251##    print STDERR "@@@ TASK_HOME: ".$ENV{'TASK_HOME'}."\n";
    392401    print STDERR "$collection - Importing:\n";
    393402    print $xml_fh "<import>\n";
    394     &run_build_script("import.pl $collection -removeold"); #-OIDtype hash_on_full_filename
     403    &run_build_script("import.pl -removeold $collection"); #-OIDtype hash_on_full_filename
    395404    print $xml_fh "</import>\n";
    396405    print STDERR "done\n"; 
    399408    print STDERR "$collection - Building:\n";
    400409    print $xml_fh "<build>\n";
    401     &run_build_script("buildcol.pl $collection -removeold");
     410    &run_build_script("buildcol.pl -removeold $collection");
    402411    print $xml_fh "</build>\n";
    403412    print STDERR "done\n";
Note: See TracChangeset for help on using the changeset viewer.