Ignore:
Timestamp:
2008-02-22T11:29:52+13:00 (16 years ago)
Author:
davidb
Message:

With the new ability to group collections within a top-level collection, import.pl and buildcol.pl commands can now be given collection names such as "mygroup/demo". Some of the building code -- mostly involved with generating the index files and GDBM files -- had to be updated to correctly handle such compound collection names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/mgbuilder.pm

    r12971 r15003  
    127127
    128128    &util::mk_all_dir (&util::filename_cat($self->{'build_dir'}, "text"));
    129     my $basefilename = "text/$self->{'collection'}";
     129
     130    my $collect_tail = &util::get_dirsep_tail($self->{'collection'});
     131    my $basefilename = &util::filename_cat("text",$collect_tail);
    130132    my $fulltextprefix = &util::filename_cat ($self->{'build_dir'}, $basefilename);
    131133
     
    315317    my $indexdir = $self->{'index_mapping'}->{$index};
    316318    &util::mk_all_dir (&util::filename_cat($self->{'build_dir'}, $indexdir));
     319
     320    my $collect_tail = &util::get_dirsep_tail($self->{'collection'});
    317321    my $fullindexprefix = &util::filename_cat ($self->{'build_dir'}, $indexdir,
    318                            $self->{'collection'});
     322                           $collect_tail);
    319323    my $fulltextprefix = &util::filename_cat ($self->{'build_dir'}, "text",
    320                            $self->{'collection'});
     324                           $collect_tail);
    321325
    322326    # get any os specific stuff
     
    522526    my $exe = &util::get_os_exe ();
    523527    my $mgstat_exe = &util::filename_cat($exedir, "mgstat$exe");
    524     my $input_file = &util::filename_cat ("text", $self->{'collection'});
     528
     529    my $collect_tail = &util::get_dirsep_tail($self->{'collection'});
     530    my $input_file = &util::filename_cat ("text", $collect_tail);
    525531    if (!-e "$mgstat_exe" || !open (PIPEIN, "mgstat$exe -d \"$self->{'build_dir'}\" -f \"$input_file\" |")) {
    526532    print $outhandle "Warning: Couldn't open pipe to $mgstat_exe to get additional stats\n";
Note: See TracChangeset for help on using the changeset viewer.