Changeset 20100
- Timestamp:
- 2009-07-29T13:24:17+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/basebuilder.pm
r20095 r20100 90 90 my ($colcfgname); 91 91 ($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 101 101 # get the database type for this collection from the collect.cfg file (may be undefined) 102 102 $self->{'infodbtype'} = $self->{'collect_cfg'}->{'infodbtype'} || &dbutil::get_default_infodb_type(); … … 509 509 510 510 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); 512 512 } 513 513 if ($gs_mode eq "gs3") { 514 514 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'}); 516 516 } 517 517 … … 660 660 } 661 661 } 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); 668 663 669 664 }
Note:
See TracChangeset
for help on using the changeset viewer.