From ea5471d7ce6dc8f582ffd4ebb11872a87b8683ee Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Sat, 28 Mar 2009 16:42:48 +0000 Subject: [PATCH] fix profile scripts to handle case where R_HOME is already defined --- R.csh | 7 +++++-- R.sh | 3 ++- R.spec | 6 +++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/R.csh b/R.csh index 9fc3fba..1566bfe 100644 --- a/R.csh +++ b/R.csh @@ -1,4 +1,7 @@ # Some R modules are not smart enough to ask R for the value of RHOME # and instead depend on the R_HOME environment variable. -set RHOME = `R RHOME` -setenv R_HOME $RHOME +# Set R_HOME only if it is not already set. +if ( ${?R_HOME} == 0 ) then + set RHOME = `R RHOME` + setenv R_HOME $RHOME +endif diff --git a/R.sh b/R.sh index 0965404..14941df 100644 --- a/R.sh +++ b/R.sh @@ -1,3 +1,4 @@ # Some R modules are not smart enough to ask R for the value of RHOME # and instead depend on the R_HOME environment variable. -export R_HOME="`R RHOME`" +# Set R_HOME only if it is not already set. +test "a$R_HOME" = "a" && export R_HOME="`R RHOME`" diff --git a/R.spec b/R.spec index 35bca6b..d0d11f8 100644 --- a/R.spec +++ b/R.spec @@ -6,7 +6,7 @@ Name: R Version: 2.8.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A language for data analysis and graphics URL: http://www.r-project.org Source0: ftp://cran.r-project.org/pub/R/src/base/R-2/R-%{version}.tar.gz @@ -962,6 +962,10 @@ R CMD javareconf \ %postun -n libRmath -p /sbin/ldconfig %changelog +* Sat Mar 28 2009 Tom "spot" Callaway - 2.8.1-8 +- fix profile scripts for situation where R_HOME is already defined + (bugzilla 492706) + * Tue Mar 24 2009 Tom "spot" Callaway - 2.8.1-7 - bump for new tag