updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / gitorious / sphinx-cmd.patch
blob7a727495a183dbc66f96e5788cbed13e5b25da25
1 diff --git a/vendor/plugins/ultrasphinx/tasks/ultrasphinx.rake b/vendor/plugins/ultrasphinx/tasks/ultrasphinx.rake
2 index 9181802..ac5bc19 100644
3 --- a/vendor/plugins/ultrasphinx/tasks/ultrasphinx.rake
4 +++ b/vendor/plugins/ultrasphinx/tasks/ultrasphinx.rake
5 @@ -48,7 +48,7 @@ namespace :ultrasphinx do
6 task :start => [:_environment] do
7 FileUtils.mkdir_p File.dirname(Ultrasphinx::DAEMON_SETTINGS["log"]) rescue nil
8 raise Ultrasphinx::DaemonError, "Already running" if ultrasphinx_daemon_running?
9 - system "searchd --config '#{Ultrasphinx::CONF_PATH}'"
10 + system "sphinx-searchd --config '#{Ultrasphinx::CONF_PATH}'"
11 sleep(4) # give daemon a chance to write the pid file
12 if ultrasphinx_daemon_running?
13 say "started successfully"
14 @@ -152,7 +152,7 @@ def ultrasphinx_index(index)
15 rotate = ultrasphinx_daemon_running?
16 ultrasphinx_create_index_path
18 - cmd = "indexer --config '#{Ultrasphinx::CONF_PATH}'"
19 + cmd = "sphinx-indexer --config '#{Ultrasphinx::CONF_PATH}'"
20 cmd << " #{ENV['OPTS']} " if ENV['OPTS']
21 cmd << " --rotate" if rotate
22 cmd << " #{index}"
23 @@ -171,7 +171,7 @@ def ultrasphinx_merge
24 raise "#{index} index is missing" unless File.exist? "#{Ultrasphinx::INDEX_SETTINGS['path']}/sphinx_index_#{index}.spa"
25 end
27 - cmd = "indexer --config '#{Ultrasphinx::CONF_PATH}'"
28 + cmd = "sphinx-indexer --config '#{Ultrasphinx::CONF_PATH}'"
29 cmd << " #{ENV['OPTS']} " if ENV['OPTS']
30 cmd << " --rotate" if rotate
31 cmd << " --merge #{indexes.join(' ')}"
32 @@ -187,7 +187,7 @@ def ultrasphinx_check_rotate
33 failed = Dir[Ultrasphinx::INDEX_SETTINGS['path'] + "/*.new.*"]
34 if failed.any?
35 say "warning; index failed to rotate! Deleting new indexes"
36 - say "try 'killall searchd' and then 'rake ultrasphinx:daemon:start'"
37 + say "try 'killall sphinx-searchd' and then 'rake ultrasphinx:daemon:start'"
38 failed.each {|f| File.delete f }
39 else
40 say "index rotated ok"
41 @@ -203,4 +203,4 @@ end
42 def say msg
43 Ultrasphinx.say msg
44 end
46 \ No newline at end of file
48 diff --git a/vendor/plugins/ultrasphinx/vendor/riddle/spec/sphinx_helper.rb b/vendor/plugins/ultrasphinx/vendor/riddle/spec/sphinx_helper.rb
49 index 7d476a5..327d91b 100644
50 --- a/vendor/plugins/ultrasphinx/vendor/riddle/spec/sphinx_helper.rb
51 +++ b/vendor/plugins/ultrasphinx/vendor/riddle/spec/sphinx_helper.rb
52 @@ -55,7 +55,7 @@ class SphinxHelper
53 end
55 def index
56 - cmd = "indexer --config #{@path}/fixtures/sphinx/spec.conf --all"
57 + cmd = "sphinx-indexer --config #{@path}/fixtures/sphinx/spec.conf --all"
58 cmd << " --rotate" if running?
59 `#{cmd}`
60 end
61 @@ -63,7 +63,7 @@ class SphinxHelper
62 def start
63 return if running?
65 - cmd = "searchd --config #{@path}/fixtures/sphinx/spec.conf"
66 + cmd = "sphinx-searchd --config #{@path}/fixtures/sphinx/spec.conf"
67 `#{cmd}`
69 sleep(1)
70 @@ -89,4 +89,4 @@ class SphinxHelper
71 def running?
72 pid && `ps #{pid} | wc -l`.to_i > 1
73 end
74 -end
75 \ No newline at end of file
76 +end