From: dpavlin Date: Tue, 31 Jan 2006 16:37:14 +0000 (+0000) Subject: r9166@llin: dpavlin | 2006-01-31 17:36:56 +0100 X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=commitdiff_plain;h=e99b9e612fab0e89dd290a593753341599c8c4b0 r9166@llin: dpavlin | 2006-01-31 17:36:56 +0100 more fixes for operation without Hyper Estraier git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@326 8392b6e1-25fa-0310-8288-cc32f8e212ea --- diff --git a/bin/BackupPC_updatedb b/bin/BackupPC_updatedb index fc8fbac..fc282ac 100755 --- a/bin/BackupPC_updatedb +++ b/bin/BackupPC_updatedb @@ -113,8 +113,8 @@ sub hest_update { my $skip_check = $opt{j} && print STDERR "Skipping check for existing files -- this should be used only with initital import\n"; - unless (defined($index_node_url)) { - print STDERR "HyperEstraier support not enabled in configuration\n"; + unless ($index_node_url && $index_node_url =~ m#^http://#) { + print STDERR "HyperEstraier support not enabled or index node invalid\n" if ($debug); $index_node_url = 0; return; } @@ -197,7 +197,7 @@ sub hest_update { while (my $row = $sth->fetchrow_hashref()) { my $uri = $row->{hname} . ':' . $row->{sname} . '#' . $row->{backupnum} . ' ' . $row->{filepath}; - unless ($skip_check && $hest_node) { + if (! $skip_check && $hest_node) { my $id = $hest_node->uri_to_id($uri); next if ($id && $id == -1); } @@ -224,11 +224,8 @@ sub hest_update { print STDERR $doc->dump_draft,"\n" if ($debug > 1); # register the document object to the database - if ($hest_node) { - $hest_node->put_doc($doc); - } else { - die "not supported"; - } + $hest_node->put_doc($doc) if ($hest_node); + $added++; }