Changeset 12964


Ignore:
Timestamp:
2006-10-03T11:41:47+13:00 (18 years ago)
Author:
kjdon
Message:

added a new option: -incremental, which invokes David's archives.inf timestamp stuff. So now you can have -keepold on without using this incremental stuff. eg if import out of differnet directories. buildcol incremental option changed to incremental_dlc, adn commented out. this invokes DLC hierarchy updates which doesn't work at the moment cos we are not compiling up gdbmget/set

Location:
trunk/gsdl/bin/script
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/buildcol.pl

    r12844 r12964  
    117117    'reqd' => "no",
    118118    'modegli' => "4" },
     119      { 'name' => "incremental",
     120    'desc' => "{buildcol.incremental}",
     121    'type' => "flag",
     122    'hiddengli' => "yes" },
    119123      { 'name' => "keepold",
    120124    'desc' => "{buildcol.keepold}",
     
    192196    'type' => "flag",
    193197    'reqd' => "no",
    194     'hiddengli' => "yes" },
    195       { 'name' => "incremental",
    196     'desc' => "{buildcol.incremental}",
    197     'type' => "flag",
    198     'reqd' => "no",
    199         'modegli' => "3" } ];
     198    'hiddengli' => "yes" }
     199
     200#      { 'name' => "incremental_dlc",
     201#   'desc' => "{buildcol.incremental_dlc}",
     202#   'type' => "flag",
     203#   'reqd' => "no",
     204#        'hiddengli' => "yes" }
     205      ];
    200206
    201207my $options = { 'name' => "buildcol.pl",
     
    238244#        Thompson, DL Consulting Ltd.
    239245#
    240 #  @param  $incremental If true indicates this build should not regenerate all
     246#  @param  $incremental_dlc If true indicates this build should not regenerate all
    241247#                       the index and metadata files, and should instead just
    242248#                       append the information found in the archives directory
     
    251257    # command line args
    252258    my ($verbosity, $archivedir, $cachedir, $builddir, $maxdocs,
    253     $debug, $mode, $indexname, $removeold, $keepold, $remove_empty_classifications,
     259    $debug, $mode, $indexname, $removeold, $keepold, $incremental,
     260    $remove_empty_classifications,
    254261    $create_images, $collectdir, $build, $type, $textindex,
    255262    $no_strip_html, $no_text, $faillog, $gli, $index, $language,
    256     $sections_index_document_metadata, $maxnumeric, $incremental);
     263    $sections_index_document_metadata, $maxnumeric, $incremental_dlc);
    257264
    258265    my $xml = 0;
    259 
     266    $incremental_dlc = 0; # this is hidden for now as it doesn't work for standard greenstone at the moment
    260267    my $hashParsingResult = {};
    261268    # general options available to all plugins
     
    430437    }
    431438   
    432     ($removeold, $keepold) = &scriptutil::check_removeold_and_keepold($removeold, $keepold, "building", $collectcfg);
     439    ($removeold, $keepold, $incremental) = &scriptutil::check_removeold_and_keepold($removeold, $keepold, $incremental, "building", $collectcfg);
    433440 
    434441    $gli = 0 unless defined $gli;
     
    524531    eval("\$builder = new $buildertype(\$collection, " .
    525532     "\$realarchivedir, \$realbuilddir, \$verbosity, " .
    526      "\$maxdocs, \$debug, \$keepold, \$remove_empty_classifications, " .
    527      "\$out, \$no_text, \$faillog, \$gli, \$incremental)");
     533     "\$maxdocs, \$debug, \$keepold, \$incremental, \$incremental_dlc, " .
     534     "\$remove_empty_classifications, " .
     535     "\$out, \$no_text, \$faillog, \$gli)");
    528536    die "$@" if $@;
    529537
     
    632640#
    633641#  @param  $base_dir A string denoting the base path the given dir must be
    634 #                    abolsute to.
     642#                    absolute to.
    635643#  @param  $dir The directory to be made absolute as a string. Note that the
    636644#               dir may already be absolute, in which case it will remain
  • trunk/gsdl/bin/script/import.pl

    r12821 r12964  
    124124    'reqd' => "no",
    125125        'hiddengli' => "yes" },
     126      { 'name' => "incremental",
     127    'desc' => "{import.incremental}",
     128    'type' => "flag",
     129    'hiddengli' => "yes" },
    126130      { 'name' => "keepold",
    127131    'desc' => "{import.keepold}",
     
    236240
    237241sub main {
    238     my ($verbosity, $importdir, $archivedir, $manifest, $keepold,
     242    my ($verbosity, $importdir, $archivedir, $manifest, $incremental, $keepold,
    239243    $removeold, $saveas, $version,
    240244    $gzip, $groupsize, $OIDtype, $OIDmetadata, $debug,
     
    432436   
    433437    # check keepold and removeold
    434     ($removeold, $keepold) = &scriptutil::check_removeold_and_keepold($removeold, $keepold, "archives", $collectcfg);
     438    ($removeold, $keepold, $incremental) = &scriptutil::check_removeold_and_keepold($removeold, $keepold, $incremental, "archives", $collectcfg);
    435439 
    436440    $gli = 0 unless defined $gli;
     
    454458
    455459    # load all the plugins
    456     $pluginfo = &plugin::load_plugins ($plugins, $verbosity, $out, $faillog, \@global_opts);
     460    $pluginfo = &plugin::load_plugins ($plugins, $verbosity, $out, $faillog, \@global_opts, $incremental);
    457461    if (scalar(@$pluginfo) == 0) {
    458462    &gsprintf($out, "{import.no_plugins_loaded}\n");
Note: See TracChangeset for help on using the changeset viewer.