Changeset 19760

Show
Ignore:
Timestamp:
08.06.2009 15:26:47 (10 years ago)
Author:
davidb
Message:

Files in the GSDL tmp area area deleted between builds, however they are remembered in the archiveinf-*.gdb files. This results in files being reprocessed during incremental build because some of the supporting files (i.e. those in GSDL/tmp) have changed (i.e. no longer there). Current fix is to filter out any files in the GSDL/tmp and GSDLCOLLECTDIR/tmp areas

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/bin/script/import.pl

    r19657 r19760  
    601601         
    602602        my @deleted_files = sort keys %{$block_hash->{'deleted_files'}}; 
     603        # Filter out any in gsdl/tmp area 
     604        my @filtered_deleted_files = (); 
     605        my $gsdl_tmp_area = &util::filename_cat($ENV{'GSDLHOME'}, "tmp"); 
     606        my $collect_tmp_area = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, "tmp"); 
     607        $gsdl_tmp_area = &util::filename_to_regex($gsdl_tmp_area); 
     608        $collect_tmp_area = &util::filename_to_regex($collect_tmp_area); 
     609 
     610 
     611        foreach my $df (@deleted_files) { 
     612        next if ($df =~ m/^$gsdl_tmp_area/); 
     613        next if ($df =~ m/^$collect_tmp_area/); 
     614         
     615        push(@filtered_deleted_files,$df); 
     616        } 
     617 
     618         
     619        @deleted_files = @filtered_deleted_files; 
     620 
    603621        if (scalar(@deleted_files>0)) { 
    604622        print STDERR "Files deleted since last import:\n  ";