Changeset 30601


Ignore:
Timestamp:
07/05/16 19:02:45 (5 years ago)
Author:
ak19
Message:

Fix to get incremental building to work with a manifest that specifies which files to delete. (Already got add and reindex working again recently.)

File:
1 edited

Legend:

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

    r30597 r30601  
    182182    my ($expat, $element) = @_;
    183183
     184    print STDERR "@@@@ element: $element\n";
     185
    184186    if ($element eq "Filename")
    185187    {
     
    187189    my $filename  = $self->{'item-val'};
    188190
     191    print STDERR "@@@@ filename: $filename\n";
     192
    189193    $self->{$filetype}->{$filename} = 1;
    190194    $self->{'item-val'} = undef;
     
    197201
    198202    if (defined $self->{'_infodbtype'}) {
    199        
    200203
    201204        my $infodbtype = $self->{'_infodbtype'};
     
    205208       
    206209        my $doc_source_file = $doc_rec->{'src-file'}->[0];
    207         my $assoc_files = $doc_rec->{'assoc-file'};
    208         my @all_files = ($doc_source_file);
    209         push(@all_files,@$assoc_files) if defined $assoc_files;
    210 
    211         foreach my $filename (@all_files) {
     210
     211        if(!$doc_source_file) {
     212        $self->{'item-val'} = undef;
     213        }
     214        else {
     215        my $assoc_files = $doc_rec->{'assoc-file'};
     216        my @all_files = ($doc_source_file);
     217        push(@all_files,@$assoc_files) if defined $assoc_files;
    212218       
    213         $filename = &util::placeholders_to_abspath($filename);
    214 
    215         if (!&FileUtils::isFilenameAbsolute($filename)) {
    216             $filename = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},$filename);
     219        foreach my $filename (@all_files) {
     220           
     221            $filename = &util::placeholders_to_abspath($filename);
     222           
     223            if (!&FileUtils::isFilenameAbsolute($filename)) {
     224            $filename = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},$filename);
     225            }
     226           
     227            $self->{$filetype}->{$filename} = 1;
    217228        }
    218 
    219         $self->{$filetype}->{$filename} = 1;
    220229        }
    221230    }
Note: See TracChangeset for help on using the changeset viewer.