Changeset 30517 for main/trunk/greenstone2/perllib/buildcolutils.pm
- Timestamp:
- 2016-05-09T16:53:48+12:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/buildcolutils.pm
r29096 r30517 674 674 # processor [jmt12] 675 675 map { local $_=$_; $_->build_indexes($indexname, $indexlevel); } @builders; 676 map { local $_=$_; $_->make_infodatabase(); } @builders; 676 677 # when incrementally rebuilding a collection using a gdbm database, need to 678 # deactivate the collecitob before make_infodatabase() 679 map { 680 local $_=$_; 681 682 if($_->supports_make_infodatabase()) { 683 my $infodbtype = $_->{'infodbtype'}; 684 my $dbSupportsConcurrentRW = &dbutil::supportsConcurrentReadAndWrite($infodbtype); 685 686 if(!$dbSupportsConcurrentRW) { 687 #$self->{'justdeactivate'} = 1; 688 #$self->activate_collection(); 689 #$self->{'justdeactivate'} = 0; 690 $self->activate_collection("just_deactivate"); 691 } 692 $_->make_infodatabase(); 693 } 694 695 } @builders; 696 677 697 map { local $_=$_; $_->collect_specific(); } @builders; 678 698 } … … 759 779 sub activate_collection 760 780 { 761 my $self = shift(@_); 781 my $self = shift(@_); 782 my $activation_cmd = shift(@_); 783 my($just_activate, $just_deactivate); 784 if(defined $activation_cmd) { 785 $just_deactivate = 1 if($activation_cmd eq "just_deactivate"); 786 $just_activate = 1 if($activation_cmd eq "just_activate"); 787 if($activation_cmd eq "just_deactivate_and_activate") { 788 $just_deactivate = 1; 789 $just_activate = 1; 790 } 791 } 792 762 793 # if buildcol.pl was run with -activate, need to run activate.pl 763 794 # now that building's complete … … 773 804 push(@activate_argv, '-keepold') if ($self->{'keepold'}); 774 805 push(@activate_argv, '-incremental') if ($self->{'incremental'}); 806 push(@activate_argv, '-justactivate') if ($just_activate || $self->{'justactivate'}); 807 push(@activate_argv, '-justdeactivate') if ($just_deactivate || $self->{'justdeactivate'}); 775 808 my $quoted_argv = join(' ', map { "\"$_\"" } @activate_argv); 776 809 my $activatecol_cmd = '"' . &util::get_perl_exec(). '" -S activate.pl ' . $quoted_argv . ' "' . $self->get_collection() . '"';
Note:
See TracChangeset
for help on using the changeset viewer.