[rkward-cvs] SF.net SVN: rkward: [1259] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Jan 31 16:59:00 UTC 2007


Revision: 1259
          http://svn.sourceforge.net/rkward/?rev=1259&view=rev
Author:   tfry
Date:     2007-01-31 08:59:00 -0800 (Wed, 31 Jan 2007)

Log Message:
-----------
fix problem with installing packages as root

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/dialogs/rkloadlibsdialog.cpp
    trunk/rkward/rkward/rkward.sh.template

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2007-01-31 15:53:42 UTC (rev 1258)
+++ trunk/rkward/ChangeLog	2007-01-31 16:59:00 UTC (rev 1259)
@@ -1,3 +1,4 @@
+- fixed: installing packages as root would not work, when $R_HOME is not defined
 - new plugin element to select name of an R object to save to				TODO: document
 - analysis folder for analysis plugins (Wilcoxon and Ansari-Bradley tests moved to analysis)
 - new plugin: Ansari-Bradley two-sample test						TODO: document, make it stable

Modified: trunk/rkward/rkward/dialogs/rkloadlibsdialog.cpp
===================================================================
--- trunk/rkward/rkward/dialogs/rkloadlibsdialog.cpp	2007-01-31 15:53:42 UTC (rev 1258)
+++ trunk/rkward/rkward/dialogs/rkloadlibsdialog.cpp	2007-01-31 16:59:00 UTC (rev 1259)
@@ -2,7 +2,7 @@
                           rkloadlibsdialog  -  description
                              -------------------
     begin                : Mon Sep 6 2004
-    copyright            : (C) 2004, 2006 by Thomas Friedrichsmeier
+    copyright            : (C) 2004, 2006, 2007 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -192,10 +192,11 @@
 		file.close();
 	}
 
+	QString R_binary (getenv ("R_binary"));
 	KProcess *proc = new KProcess;
 	if (as_root) *proc << "kdesu" << "-t";
 	else *proc << "sh" << "-c";
-	*proc << "$R_HOME/bin/R --no-save < " + file.name ();
+	*proc << R_binary + " CMD R --no-save < " + file.name ();
 
 	connect (proc, SIGNAL (processExited (KProcess *)), this, SLOT (processExited (KProcess *)));
 	connect (proc, SIGNAL (receivedStdout (KProcess *, char *, int)), this, SLOT (installationProcessOutput (KProcess *, char *, int)));

Modified: trunk/rkward/rkward/rkward.sh.template
===================================================================
--- trunk/rkward/rkward/rkward.sh.template	2007-01-31 15:53:42 UTC (rev 1258)
+++ trunk/rkward/rkward/rkward.sh.template	2007-01-31 16:59:00 UTC (rev 1259)
@@ -10,7 +10,7 @@
 fi
 
 R_HOME_DIR=###R_HOME_DIR###
-R_binary="$R_HOME_DIR/bin/R"
+export R_binary="$R_HOME_DIR/bin/R"
 
 ## Location of R may have moved, so check
 if test -x "${R_binary}"; then


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list