Permalink
Browse files

- fixed Mandriva package dependency of the ruby bindings package

- fixed installed scalaris script not working correctly, e.g. if no build-classpath exists
- added a fall-back for ruby: if it does not find the scalaris module in the directory of the executed file, try loading it from a system directory
  • Loading branch information...
1 parent 29ef71a commit 6d7a1061042d9e57fd6ceb723f2e0899c1507d53 kruber@zib.de committed Jul 15, 2011
@@ -121,7 +121,11 @@ Java Bindings and command line client for scalaris
Conflicts: ruby-scalaris
Summary: Ruby-API and Ruby-client for scalaris
Group: Productivity/Databases/Clients
+%if 0%{?mandriva_version} || 0%{?mdkversion}
+Requires: ruby >= 1.8
+%else
Requires: ruby(abi) >= 1.8
+%endif
Requires: rubygem-json
%description -n ruby-scalaris-svn
@@ -56,7 +56,7 @@ rpm_mode=true
#
# Start script will set the value to the directory it is located in.
#
-SCALARIS_JAVA_HOME="@datarootdir@/java"
+SCALARIS_JAVA_HOME="@datarootdir@/java/scalaris"
# 3. OPT_JAR_LIST
#
View
@@ -20,6 +20,10 @@ OTP_VERSION=1.5.4
JAKARTA_COMMONS_VERSION=1.2
ERL=@ERL@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+datarootdir=@datarootdir@
+
# Extract launch and scalaris arguments, (see details below).
scalaris_exec_args=
no_config=false
@@ -203,12 +207,12 @@ fi
# is discouraged as it is not java-version safe. A user should
# request optional jars and their dependencies via the OPT_JAR_LIST
# variable
-if $rpm_mode && [ -x @BUILDCLASSPATH@ ] ; then
- LOCALCLASSPATH="$(@BUILDCLASSPATH@ scalaris jakarta-commons-cli)"
+if $rpm_mode && [ -x "@BUILDCLASSPATH@" ] ; then
+ LOCALCLASSPATH="$(\"@BUILDCLASSPATH@\" scalaris jakarta-commons-cli)"
# If the user requested to try to add some other jars to the classpath
if [ -n "$OPT_JAR_LIST" ] ; then
- _OPTCLASSPATH="$(@BUILDCLASSPATH@ $OPT_JAR_LIST 2> /dev/null)"
+ _OPTCLASSPATH="$(\"@BUILDCLASSPATH@\" $OPT_JAR_LIST 2> /dev/null)"
if [ -n "$_OPTCLASSPATH" ] ; then
LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
fi
@@ -15,7 +15,11 @@
require 'optparse'
require 'pp'
-require "#{File.dirname(__FILE__)}/scalaris"
+begin
+ require "#{File.dirname(__FILE__)}/scalaris"
+rescue LoadError
+ require "scalaris"
+end
def write(sc, key_value_list)
key, value = key_value_list
@@ -13,7 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require "#{File.dirname(__FILE__)}/scalaris"
+begin
+ require "#{File.dirname(__FILE__)}/scalaris"
+rescue LoadError
+ require "scalaris"
+end
def read_or_write(sc, key, value, mode, binary = false)
begin
@@ -13,8 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require "#{File.dirname(__FILE__)}/scalaris"
require "test/unit"
+begin
+ require "#{File.dirname(__FILE__)}/scalaris"
+rescue LoadError
+ require "scalaris"
+end
$_TEST_DATA = [
"ahz2ieSh", "wooPhu8u", "quai9ooK", "Oquae4ee", "Airier1a", "Boh3ohv5", "ahD3Saog", "EM5ooc4i",

0 comments on commit 6d7a106

Please sign in to comment.