Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env_vars not transferring successfully on debian-gcc-devel platform #174

Closed
sao10 opened this issue Nov 20, 2018 · 5 comments
Closed

env_vars not transferring successfully on debian-gcc-devel platform #174

sao10 opened this issue Nov 20, 2018 · 5 comments

Comments

@sao10
Copy link

sao10 commented Nov 20, 2018

env_vars not transferring successfully on debian-gcc-devel platform but are OK on windows.
This seems to perhaps be a similar issue as encountered earlier this year on solaris? (#105).

On debian:

rhub::check("FlexParamCurve",env_vars = c('_R_CHECK_LENGTH_1_CONDITION'="package:_R_CHECK_PACKAGE_NAME_,abort,verbose",'R_C_BOUNDS_CHECK'="yes",'_R_CHECK_FORCE_SUGGESTS_' = "false"), platform = "debian-gcc-devel")
─  Building package
─  Uploading package
─  Preparing build, see status at
   http://builder.r-hub.io/status/FlexParamCurve_1.5-5.tar.gz-2c19f5ef70c14bebb07b8eb7ac0f9151
─  Build started
─  Downloading and unpacking package file
─  Querying system requirements
─  Installing system requirements
─  Starting Docker container
─  Querying package dependencies
─  Installing package dependencies
─  Running R CMD check
   About to run xvfb-run R CMD check FlexParamCurve_1.5-5.tar.gz
-  using log directory ‘/home/docker/FlexParamCurve.Rcheck’ (706ms)
-  using R Under development (unstable) (2018-11-17 r75624)
-  using platform: x86_64-pc-linux-gnu (64-bit)
-  using session charset: UTF-8
√  checking for file ‘FlexParamCurve/DESCRIPTION’ (723ms)
-  this is package ‘FlexParamCurve’ version ‘1.5-5’
-  package encoding: UTF-8
√  checking package namespace information
etc...

On windows:

rhub::check("FlexParamCurve",env_vars = c('_R_CHECK_LENGTH_1_CONDITION'="package:_R_CHECK_PACKAGE_NAME_,abort,verbose",'R_C_BOUNDS_CHECK'="yes",'_R_CHECK_FORCE_SUGGESTS_' = "false"), platform = "windows-x86_64-devel")`

─  Building package
─  Uploading package
─  Preparing build, see status at
   http://builder.r-hub.io/status/FlexParamCurve_1.5-5.tar.gz-29a03aacfd384436879e5706973a255a
─  Build started
─  Creating new user
─  Downloading and unpacking package file
─  Querying package dependencies
─  Installing package dependencies
─  Running R CMD check
   setting _R_CHECK_FORCE_SUGGESTS_ to false
   setting R_COMPILE_AND_INSTALL_PACKAGES to never
   setting R_REMOTES_STANDALONE to true
   setting R_REMOTES_NO_ERRORS_FROM_WARNINGS to true
   setting _R_CHECK_LENGTH_1_CONDITION to package\:_R_CHECK_PACKAGE_NAME_\,abort\,verbose
   setting R_C_BOUNDS_CHECK to yes
   setting _R_CHECK_FORCE_SUGGESTS_ to false
-  using log directory 'C:/Users/USERozyDcSNFuv/FlexParamCurve.Rcheck'
-  using R Under development (unstable) (2018-09-27 r75377)
-  using platform: x86_64-w64-mingw32 (64-bit) (1.4s)
-  using session charset: ISO8859-1
√  checking for file 'FlexParamCurve/DESCRIPTION'
-  this is package 'FlexParamCurve' version '1.5-5'
-  package encoding: UTF-8 (728ms)
√  checking package namespace information
etc...
@gaborcsardi
Copy link
Collaborator

Are you sure they are not set? Possibly they are set, and just not printed in the logs?

@gaborcsardi
Copy link
Collaborator

gaborcsardi commented Nov 20, 2018

The env vars are actually set, but your env var is called _R_CHECK_LENGTH_1_CONDITION_, note the trailing underscore.

But there is still a bug in R-hub, because it seems that it escapes the : and , characters in env vars, I am not sure why.

@gaborcsardi
Copy link
Collaborator

The extra backslashes are coming from here: https://github.com/r-hub/rhub-backend/blob/50254305a45891327e0e869f4b40339cc2d483d7/lib/builder.js#L5

I don't think we need to quote anything for Linux, because Docker takes the environment variables literally. We might need to quote for the other OSes, though. :(

@gaborcsardi
Copy link
Collaborator

gaborcsardi commented Nov 20, 2018

OK, this is fixed on Linux and Windows:
r-hub/rhub-backend@e12de37
r-hub/rhub-backend@aca99f3

I still need to double check the Windows one, because we might need to quote sg, actually. I also need to check other platforms.

@sao10
Copy link
Author

sao10 commented Nov 20, 2018

Thanks Gabor. Yes, this was my faulty syntax. It appears to be transferring environmental variables fine and the runs as expected on debian-gcc-devel replicating the output from the CRAN checks on this system, even though the environmental variables do not print in the log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants