Changeset 30520 for main/trunk/greenstone2/perllib
- Timestamp:
- 2016-05-09T22:38:09+12:00 (8 years ago)
- Location:
- main/trunk/greenstone2/perllib
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/buildcolutils.pm
r30518 r30520 33 33 use File::Basename; 34 34 35 use activate; 35 36 use colcfg; 36 37 use dbutil; … … 685 686 686 687 if(!$dbSupportsConcurrentRW) { 687 #$self->{'justdeactivate'} = 1; 688 #$self->activate_collection(); 689 #$self->{'justdeactivate'} = 0; 690 $self->activate_collection("just_deactivate"); 688 # all except the collection (1st parameter) can be empty. For GS3, also set the site parameter 689 my $gsserver = new activate( $self->get_collection(), $self->{'site'}, $self->{'verbosity'}, $self->{'builddir'}, $self->{'indexdir'}, $self->{'collectdir'}, $self->{'library_url'}, $self->{'library_name'}); 690 $gsserver->print_task_msg("About to deactivate collection ".$self->get_collection()); 691 #$self->{'library_url'} = $gsserver->get_library_URL(); 692 $gsserver->do_deactivate(); 691 693 } 692 694 $_->make_infodatabase(); … … 718 720 719 721 if(!$dbSupportsConcurrentRW) { 720 $self->activate_collection("just_deactivate"); 722 # all except the collection (1st parameter) can be empty. For GS3, also set the site parameter 723 my $gsserver = new activate( $self->get_collection(), $self->{'site'}, $self->{'verbosity'}, $self->{'builddir'}, $self->{'indexdir'}, $self->{'collectdir'}, $self->{'library_url'}, $self->{'library_name'}); 724 $gsserver->print_task_msg("About to deactivate collection ".$self->get_collection()); 725 #$self->{'library_url'} = $gsserver->get_library_URL(); 726 $gsserver->do_deactivate(); 721 727 } 722 728 $_->make_infodatabase(); … … 794 800 sub activate_collection 795 801 { 796 my $self = shift(@_); 797 my $activation_cmd = shift(@_); 798 my($just_activate, $just_deactivate); 799 if(defined $activation_cmd) { 800 $just_deactivate = 1 if($activation_cmd eq "just_deactivate"); 801 $just_activate = 1 if($activation_cmd eq "just_activate"); 802 if($activation_cmd eq "just_deactivate_and_activate") { 803 $just_deactivate = 1; 804 $just_activate = 1; 805 } 806 } 802 my $self = shift(@_); 807 803 808 804 # if buildcol.pl was run with -activate, need to run activate.pl … … 812 808 #my $quoted_argv = join(" ", map { "\"$_\"" } @ARGV); 813 809 my @activate_argv = (); 810 push(@activate_argv, '-library_url', $self->{'library_url'}) if ($self->{'library_url'}); 811 push(@activate_argv, '-library_name', $self->{'library_name'}) if ($self->{'library_name'}); 814 812 push(@activate_argv, '-collectdir', $self->{'collectdir'}) if ($self->{'collectdir'}); 815 813 push(@activate_argv, '-builddir', $self->{'builddir'}) if ($self->{'builddir'}); 814 push(@activate_argv, '-indexdir', $self->{'indexdir'}) if ($self->{'indexdir'}); 816 815 push(@activate_argv, '-site', $self->{'site'}) if ($self->{'site'}); 817 816 push(@activate_argv, '-verbosity', $self->{'verbosity'}) if ($self->{'verbosity'}); … … 819 818 push(@activate_argv, '-keepold') if ($self->{'keepold'}); 820 819 push(@activate_argv, '-incremental') if ($self->{'incremental'}); 821 push(@activate_argv, '- justactivate') if ($just_activate || $self->{'justactivate'});822 push(@activate_argv, '-justdeactivate') if ($just_deactivate || $self->{'justdeactivate'}); 820 push(@activate_argv, '-skipactivation', $self->{'skipactivation'}) if ($self->{'skipactivation'}); 821 823 822 my $quoted_argv = join(' ', map { "\"$_\"" } @activate_argv); 824 823 my $activatecol_cmd = '"' . &util::get_perl_exec(). '" -S activate.pl ' . $quoted_argv . ' "' . $self->get_collection() . '"'; -
main/trunk/greenstone2/perllib/downloaders/WgetDownload.pm
r28560 r30520 246 246 #print STDOUT "Command is: $command\n"; 247 247 248 # Wget's output needs to be monitored to find out when it has naturally termi anted.248 # Wget's output needs to be monitored to find out when it has naturally terminated. 249 249 # Wget's output is sent to its STDERR so we can't use open2 without doing 2>&1. 250 250 # On linux, 2>&1 launches a subshell which then launches wget, meaning that killing
Note:
See TracChangeset
for help on using the changeset viewer.