cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: cqlsh: look for cqlshlib relative to realpath
Date Wed, 22 Feb 2012 10:39:38 GMT
Updated Branches:
  refs/heads/cassandra-1.0 1ad1c1282 -> 44ac7a04e


cqlsh: look for cqlshlib relative to realpath

patch by thepaul; reviewed by slebresne for CASSANDRA-3767

i.e., the realpath of the cqlsh executable, instead of the path as
called, which could be a symlink. If cqlsh is called via symlink, we are
more likely to find cqlshlib relative to the real location than relative
to the symlink.


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/44ac7a04
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/44ac7a04
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/44ac7a04

Branch: refs/heads/cassandra-1.0
Commit: 44ac7a04e09ce06b957e50cfc6df7047b2618881
Parents: 1ad1c12
Author: paul cannon <paul@datastax.com>
Authored: Tue Feb 21 14:08:07 2012 -0600
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Feb 22 11:38:46 2012 +0100

----------------------------------------------------------------------
 CHANGES.txt |    3 ++-
 bin/cqlsh   |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/44ac7a04/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f04d1c8..5869d32 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -21,7 +21,8 @@
  * make CLI `show schema` to use output stream directly instead
    of StringBuilder (CASSANDRA-3842)
  * remove the wait on hint future during write (CASSANDRA-3870)
- * (cqlsh) ignore missing CfDef opts
+ * (cqlsh) ignore missing CfDef opts (CASSANDRA-3933)
+ * (cqlsh) look for cqlshlib relative to realpath (CASSANDRA-3767)
 Merged from 0.8:
  * (Pig) fix CassandraStorage to use correct comparator in Super ColumnFamily
    case (CASSANDRA-3251)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/44ac7a04/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index 241c5fc..027b65e 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -49,7 +49,7 @@ import re
 
 # cqlsh should run correctly when run out of a Cassandra source tree,
 # out of an unpacked Cassandra tarball, and after a proper package install.
-cqlshlibdir = os.path.join(os.path.dirname(__file__), '..', 'pylib')
+cqlshlibdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'pylib')
 if os.path.isdir(cqlshlibdir):
     sys.path.insert(0, cqlshlibdir)
 


Mime
View raw message