1. You should never install packages without asking the user.

2. a package should never write to the user file space or default libraries unless the user akss for it explicitly.
In tests, use tempdir().

3. You cannot expect that the library is writeable. It is not in many network installations.

Best,
Uwe Ligges



On 18.03.2019 16:48, brodie gaslam via R-package-devel wrote:

Subject:
Installing "Additional" Packages During Tests
From:
brodie gaslam <brodie.gas...@yahoo.com>
Date:
18.03.2019, 16:48
To:
List R-package-devel <r-package-devel@r-project.org>

To:
List R-package-devel <r-package-devel@r-project.org>


Sorry, previous e-mail got pre-maturely sent due to fat finger...
My package unitizer[1] has recently gained the following type of error:
      Warning in install.packages(pkg, repos = NULL, type = "src") :     'lib = 
"/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages"' is not writable
      Error in install.packages(pkg, repos = NULL, type = "src") :
      unable to install packages

While I did recently update the package to resolve the RNGversion issue, this 
problem seems unrelated as some of the CRAN machines produce it, and some 
don't, on the same package version.
The tests install some dummy packages with `install.packages`, and this has 
worked for a long time, but no longer, presumably due to changes in permissions 
of the test running daemon.  The packages are removed on.exit.  The packages 
are used for integration tests as unitizer is a package-testing-package and it 
is useful to be able to test functionality that includes use on actual packages 
that change.

Should I expect this to be the new normal, where I will be henceforth 
disallowed from installing packages temporarily?  Will there be an acceptable 
workaround (e.g. setting up a temporary library in a tempdir and try to 
`install.packages` into that; I admit I have no familiarity with this other 
than the vague awareness maybe this could be done)?
FWIW, perhaps an indication that this is something I shouldn't be doing came up earlier 
in the year when I had to resort to temporarily unsetting "R_TESTS" as per [2].
Thanks in advance for any input.
Best,
Brodie.


[1]: https://cran.r-project.org/web/checks/check_results_unitizer.html[2]: 
https://github.com/r-lib/testthat/issues/144
        [[alternative HTML version deleted]]


______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to