Skip to content

Handle preset R_PROFILE or R_HOME variables #9847

@qed777

Description

@qed777
mannequin

A preset R_PROFILE variable can cause some R packages to fail to build/install and interfere with doctests.

Georg Grafendorfer reported this problem on sage-release.

For R_HOME, this yields a doctest failure if set:

**********************************************************************
File "devel/sage/sage/misc/interpreter.py", line 187, in sage.misc.interpreter.SageInteractiveShell.system_raw
Failed example:
    shell.system_raw('R --version')
Expected:
    R version ...
Got:
    WARNING: ignoring environment value of R_HOME
    R version 2.15.2 (2012-10-26) -- "Trick or Treat"
    Copyright (C) 2012 The R Foundation for Statistical Computing
    ISBN 3-900051-07-0
    Platform: x86_64-unknown-linux-gnu (64-bit)
    <BLANKLINE>
    R is free software and comes with ABSOLUTELY NO WARRANTY.
    You are welcome to redistribute it under the terms of the
    GNU General Public License versions 2 or 3.
    For more information about these matters see
    http://www.gnu.org/licenses/.
    <BLANKLINE>
**********************************************************************

Apply attachment: 9847_unset_R.patch to SAGE_ROOT.

CC: @sagetrac-ggrafendorfer @kcrisman

Component: build

Author: Jeroen Demeyer

Reviewer: Leif Leonhardy, Karl-Dieter Crisman

Merged: sage-5.9.beta2

Issue created by migration from https://trac.sagemath.org/ticket/9847

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions