Ignore:
Timestamp:
2012-12-10T16:37:21+13:00 (11 years ago)
Author:
ak19
Message:

When a GS2 collection contains both collect.cfg and collectionConfig.xml (as advanced beatles does) the old code used to end up reading in the GS3 collectionConfig.xml instead of the GS2 collect.cfg and set the GS_mode to GS3. Now colcfg::get_collect_cfg_name takes the gs_mode (instead of determining this and returning it) and works out the collectcfg file name for the gs_mode. That means that the calling functions now need to work out the gs_mode. They do so by setting the gs_mode to gs3 if the site flag is present in the commandline, if not then it defaults to gs2. So from now on, the site flag must be specified for GS3 collections.

Location:
main/trunk/greenstone2/bin/script
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/activate.pl

    r25896 r26567  
    488488    # Beware: Only if $site is specified in the cmdline does collectionConfig.xml get
    489489    # generated and does $gs_mode=gs3, else collect.cfg gets generated and $gs_mode=gs2
    490     my ($collect_cfg_filename, $gs_mode) = &colcfg::get_collect_cfg_name(STDERR);
     490    my $gs_mode = "gs2";
     491    if ((defined $site) && ($site ne "")) { # GS3
     492    $gs_mode = "gs3";
     493    }
     494    my $collect_cfg_filename = &colcfg::get_collect_cfg_name(STDERR, $gs_mode);
    491495    my $collectcfg = &colcfg::read_collection_cfg ($collect_cfg_filename,$gs_mode);
    492496
  • main/trunk/greenstone2/bin/script/buildcol.pl

    r25896 r26567  
    386386    # Read in the collection configuration file.
    387387    my ($collectcfg, $buildtype, $orthogonalbuildtypes);
    388     ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name($out);
     388    if ((defined $site) && ($site ne "")) { # GS3
     389    $gs_mode = "gs3";
     390    }
     391    $configfilename = &colcfg::get_collect_cfg_name($out, $gs_mode);
    389392    $collectcfg = &colcfg::read_collection_cfg ($configfilename, $gs_mode);
    390393   
  • main/trunk/greenstone2/bin/script/explode_metadata_database.pl

    r24952 r26567  
    229229    # read in the collect.cfg file
    230230    # Read in the collection configuration file.
    231     my ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name(STDERR);
     231    my $gs_mode = "gs2";
     232    if ((defined $site) && ($site ne "")) { # GS3
     233        $gs_mode = "gs3";
     234    }
     235    my $configfilename = &colcfg::get_collect_cfg_name(STDERR, $gs_mode);
    232236    my $collectcfg = &colcfg::read_collect_cfg ($configfilename, $gs_mode);
    233237    $plugin_options_string = &get_plugin_options($collectcfg, $plugin);
  • main/trunk/greenstone2/bin/script/incremental-buildcol.pl

    r24749 r26567  
    104104
    105105    # Read in the collection configuration file.
    106     my ($collect_cfg_filename, $gs_mode) = &colcfg::get_collect_cfg_name(STDERR);
     106    my $gs_mode = "gs2";
     107    if ((defined $site) && ($site ne "")) { # GS3
     108    $gs_mode = "gs3";
     109    }
     110    my $collect_cfg_filename = &colcfg::get_collect_cfg_name(STDERR, $gs_mode);
    107111   
    108112    my $collectcfg = &colcfg::read_collection_cfg ($collect_cfg_filename,$gs_mode);
Note: See TracChangeset for help on using the changeset viewer.