Oefenweb / ansible-r

Ansible role to set up (the latest version of) R in Ubuntu systems
MIT License
42 stars 27 forks source link

Always pass lib as a third argument to R-install-package #15

Closed kostyrev closed 7 years ago

kostyrev commented 7 years ago

installing package from specific repos

r_packages:
   - name: shiny
     repos: http://cran.rstudio.com/

crashes with error

failed: [52.207.60.105] (item={u'repos': u'http://cran.rstudio.com/', u'name': u'shiny'}) => {
    "changed": false, 
    "cmd": [
        "R-install-package", 
        "shiny", 
        "cran", 
        "http://cran.rstudio.com/"
    ], 
    "delta": "0:00:00.097902", 
    "end": "2017-06-09 07:58:44.351261", 
    "failed": true, 
    "invocation": {
        "module_args": {
            "_raw_params": "R-install-package\n shiny\n cran\n  http://cran.rstudio.com/", 
            "_uses_shell": false, 
            "chdir": null, 
            "creates": null, 
            "executable": null, 
            "removes": null, 
            "warn": true
        }
    }, 
    "item": {
        "name": "shiny", 
        "repos": "http://cran.rstudio.com/"
    }, 
    "rc": 1, 
    "start": "2017-06-09 07:58:44.253359", 
    "stderr": "Error in install.packages(package, lib, repos) : \n  'lib = \"http://cran.rstudio.com/\"' is not writable\nCalls: withCallingHandlers -> install.packages\nExecution halted", 
    "stderr_lines": [
        "Error in install.packages(package, lib, repos) : ", 
        "  'lib = \"http://cran.rstudio.com/\"' is not writable", 
        "Calls: withCallingHandlers -> install.packages", 
        "Execution halted"
    ], 
    "stdout": "", 
    "stdout_lines": []
}

because R-install-package expects that lib is a third argument.

tersmitten commented 7 years ago

What about line 34?

kostyrev commented 7 years ago

I've never attempted to remove packages

tersmitten commented 7 years ago

Do you think we should add it there?

kostyrev commented 7 years ago

Do you want me to add it there?

tersmitten commented 7 years ago

Yes, please

kostyrev commented 7 years ago

I've just tested it and removing packages works as it is in this PR. so there's no need in fixing line 34. Do you know why Travis do not build this PR?

tersmitten commented 7 years ago

Do you know why Travis do not build this PR?

Yes, yesterday I pushed changes in > 100 repositories of us, so it's still queued

https://travis-ci.org/Oefenweb

tersmitten commented 7 years ago

I'll test it manually