Changeset 15710
- Timestamp:
- 2008-05-27T12:06:29+12:00 (16 years ago)
- Location:
- gsdl/trunk/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/basebuilder.pm
r15709 r15710 320 320 &util::mk_all_dir ($assocdir); 321 321 322 # get db name 323 my $dbext = ".bdb"; 324 $dbext = ".ldb" if &util::is_little_endian(); 325 my $dbname = &util::get_dirsep_tail($self->{'collection'}).$dbext; 326 my $fulldbname = &util::filename_cat ($textdir, $dbname); 327 $fulldbname =~ s/\//\\/g if ($ENV{'GSDLOS'} =~ /^windows$/i); 328 329 my $exedir = "$ENV{'GSDLHOME'}/bin/$ENV{'GSDLOS'}"; 330 my $exe = &util::get_os_exe (); 331 my $txt2db_exe = &util::filename_cat($exedir, "txt2db$exe"); 322 # Get info database file path 323 my $infodb_file_path = &dbutil::get_infodb_file_path($self->{'collection'}, $textdir); 332 324 333 325 print $outhandle "\n*** creating the info database and processing associated files\n" … … 338 330 &classify::init_classifiers ($self->{'classifiers'}); 339 331 340 341 332 my $reconstructed_docs = undef; 342 333 if ($self->{'keepold'}) { 343 334 # reconstruct doc_obj metadata from database for all docs 344 $reconstructed_docs = &classify::reconstruct_doc_objs_metadata($ fulldbname);335 $reconstructed_docs = &classify::reconstruct_doc_objs_metadata($infodb_file_path); 345 336 } 346 337 … … 349 340 if ($self->{'debug'}) { 350 341 $infodb_handle = *STDOUT; 351 } else { 352 if (!-e "$txt2db_exe" || !open (PIPEOUT, "| txt2db$exe \"$fulldbname\"")) { 342 } 343 else { 344 my $exedir = "$ENV{'GSDLHOME'}/bin/$ENV{'GSDLOS'}"; 345 my $exe = &util::get_os_exe (); 346 my $txt2db_exe = &util::filename_cat($exedir, "txt2db$exe"); 347 348 if (!-e "$txt2db_exe" || !open (PIPEOUT, "| txt2db$exe \"$infodb_file_path\"")) { 353 349 print STDERR "<FatalError name='NoRunText2DB'/>\n</Stage>\n" if $self->{'gli'}; 354 350 die "builder::make_infodatabase - couldn't run $txt2db_exe\n"; -
gsdl/trunk/perllib/dbutil.pm
r15705 r15710 29 29 30 30 31 sub get_infodb_file_path 32 { 33 my $collection_name = shift(@_); 34 my $infodb_directory_path = shift(@_); 35 36 return &get_infodb_file_path_gdbm($collection_name, $infodb_directory_path); 37 } 38 39 31 40 sub read_infodb_file 32 41 { … … 52 61 # GDBM FUNCTIONS 53 62 # ---------------------------------------------------------------------------------------- 63 64 sub get_infodb_file_path_gdbm 65 { 66 my $collection_name = shift(@_); 67 my $infodb_directory_path = shift(@_); 68 69 my $infodb_file_extension = (&util::is_little_endian() ? ".ldb" : ".bdb"); 70 my $infodb_file_name = &util::get_dirsep_tail($collection_name) . $infodb_file_extension; 71 return &util::filename_cat($infodb_directory_path, $infodb_file_name); 72 } 73 54 74 55 75 sub read_infodb_file_gdbm
Note:
See TracChangeset
for help on using the changeset viewer.