Changeset 18660

Show
Ignore:
Timestamp:
11.03.2009 13:19:22 (10 years ago)
Author:
kjdon
Message:

we now use gdb instead of ldb/bdb for collection and archives-inf databases. We have a rename step to rename any legacy databases

Location:
gsdl/trunk/bin/script
Files:
4 modified

Legend:

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

    r18590 r18660  
    501501    } elsif ($saveas =~ m/^.*METS$/ || $saveas eq "MARC" ) { 
    502502##  $expinfo_doc_filename = &util::filename_cat ($exportdir, "export.inf"); 
    503     my $db_ext = &util::is_little_endian() ? ".ldb" : ".bdb"; 
    504     my $doc_db = "archiveinf-doc$db_ext"; 
     503    my $doc_db = "archiveinf-doc"; 
    505504    $expinfo_doc_filename = &util::filename_cat ($exportdir, $doc_db); 
     505    &util::rename_gdbm_file($expinfo_doc_filename); # ensures gdb in case we have an existing legacy ldb one - can this happen? 
     506    $expinfo_doc_filename .= ".gdb"; 
     507 
    506508    } 
    507509         
  • gsdl/trunk/bin/script/exportcol.pl

    r16378 r18660  
    238238    print MANIFESTCFG '  etc '; 
    239239    foreach my $c (@valid_coll_list) { 
    240         print MANIFESTCFG "collect\\$c\\index\\text\\$c.ldb "; 
     240        print MANIFESTCFG "collect\\$c\\index\\text\\$c.gdb "; 
    241241    } 
    242242    print MANIFESTCFG "\n\n"; 
     
    323323    &util::mk_all_dir ($newcoldir); 
    324324    &util::cp_r ($colindexdir, $newcoldir); 
     325    &util::rename_gdbm_file(&util::filename_cat ($newcoldir, "index", "text", $c)); 
    325326    &util::cp_r ($coletcdir, $newcoldir); 
    326327    &util::cp_r ($colimagesdir, $newcoldir) if (-e $colimagesdir); 
  • gsdl/trunk/bin/script/import.pl

    r18590 r18660  
    529529    # read the archive information file 
    530530##  $arcinfo_doc_filename = &util::filename_cat ($archivedir, "archives.inf"); 
    531  
    532     my $db_ext = &util::is_little_endian() ? ".ldb" : ".bdb"; 
    533     my $doc_db = "archiveinf-doc$db_ext"; 
    534     my $src_db = "archiveinf-src$db_ext"; 
    535     $arcinfo_doc_filename = &util::filename_cat ($archivedir, $doc_db); 
    536     $arcinfo_src_filename = &util::filename_cat ($archivedir, $src_db); 
    537      
     531     
     532    $arcinfo_doc_filename = &util::filename_cat ($archivedir, "archiveinf-doc"); 
     533    &util::rename_gdbm_file($arcinfo_doc_filename); # ensures gdb 
     534    $arcinfo_doc_filename .= ".gdb"; 
     535     
     536    $arcinfo_src_filename = &util::filename_cat ($archivedir, "archiveinf-src");    
     537    &util::rename_gdbm_file($arcinfo_src_filename); # ensures gdb 
     538    $arcinfo_src_filename .= ".gdb"; 
     539 
     540                             
    538541    $archive_info = new arcinfo (); 
    539542    $archive_info->load_info ($arcinfo_doc_filename); 
  • gsdl/trunk/bin/script/incremental-import.pl

    r18510 r18660  
    100100    } 
    101101     
    102     my $db_ext = (&util::is_little_endian() ? ".ldb" : ".bdb"); 
    103  
    104     my $archiveinf_doc = &util::filename_cat($archive_dir,"archiveinf-doc$db_ext"); 
    105  
     102    my $archiveinf_doc = &util::filename_cat($archive_dir,"archiveinf-doc"); 
     103    &util::rename_gdbm_file($archiveinf_doc); # ensure gdb 
     104    $archiveinf_doc .= ".gdb"; 
    106105    my $quoted_argv = join(" ", map { "\"$_\"" } @filtered_argv); 
    107106