Changeset 20100


Ignore:
Timestamp:
2009-07-29T13:24:17+12:00 (15 years ago)
Author:
kjdon
Message:

small changes to do with calls to colcfg methods

File:
1 edited

Legend:

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

    r20095 r20100  
    9090    my ($colcfgname);
    9191    ($colcfgname, $gs_mode) = &colcfg::get_collect_cfg_name($outhandle);
    92     if ($gs_mode eq "gs2") {
    93         $self->{'collect_cfg'} = &colcfg::read_collect_cfg ($colcfgname);
    94     } elsif ($gs_mode eq "gs3") {
    95     $self->{'collect_cfg'} = &colcfg::read_collection_cfg_xml ($colcfgname);
    96 
    97     #this $self->{'collect_cfg_preserve'} is used for gs3 only and to be passed to &colcfg::write_build_cfg_xml in sub make_auxilary_files later in this basebuilder.pm, we use this preserve object because $self->{'collect_cfg'}->{'classify'} somewhat gets modified during the calling of &classify::load_classifiers.
    98     $self->{'collect_cfg_preserve'} = &colcfg::read_collection_cfg_xml ($colcfgname);
    99     }
    100 
     92    $self->{'collect_cfg'} = &colcfg::read_collection_cfg ($colcfgname, $gs_mode);
     93
     94    if ($gs_mode eq "gs3") {
     95    # read it in again to save the original form for later writing out
     96    # of buildConfig.xml
     97    # we use this preserve object because $self->{'collect_cfg'}->{'classify'} somewhat gets modified during the calling of &classify::load_classifiers.
     98    $self->{'collect_cfg_preserve'} = &colcfg::read_collection_cfg ($colcfgname, $gs_mode);
     99    }
     100   
    101101    # get the database type for this collection from the collect.cfg file (may be undefined)
    102102    $self->{'infodbtype'} = $self->{'collect_cfg'}->{'infodbtype'} || &dbutil::get_default_infodb_type();
     
    509509
    510510    if ($gs_mode eq "gs2") {
    511       &colcfg::write_build_cfg("$self->{'build_dir'}/build.cfg", $build_cfg);
     511      &colcfg::write_build_cfg(&util::filename_cat($self->{'build_dir'},"build.cfg"), $build_cfg);
    512512    }
    513513    if ($gs_mode eq "gs3") {
    514514
    515       &colcfg::write_build_cfg_xml("$self->{'build_dir'}/buildConfig.xml", $build_cfg, $self->{'collect_cfg_preserve'}, $self->{'disable_OAI'});
     515      &colcfg::write_build_cfg_xml(&util::filename_cat($self->{'build_dir'}, "buildConfig.xml"), $build_cfg, $self->{'collect_cfg_preserve'}, $self->{'disable_OAI'});
    516516    }   
    517517
     
    660660    }
    661661    }
    662     if ($gs_mode eq "gs2") {
    663     return &colcfg::read_build_cfg( $buildconfigfile);
    664     }
    665     print STDERR "read build cfg basebuilder***\n";
    666     return &buildConfigxml::read_cfg_file($buildconfigfile);
    667    
     662    return &colcfg::read_building_cfg( $buildconfigfile, $gs_mode);
    668663   
    669664}
Note: See TracChangeset for help on using the changeset viewer.