Kasper Daniel Hansen
2011-Mar-04 15:45 UTC
[Rd] removing files on windows as part of vignette building
This is about the Bioconductor package Genominator. As part of the vignette building process, we create two sizable sqlite3 databases, in the vignette directory (inst/doc). When we build the source tarball, these databases are deleted, but when a Windows binary is being made on the Bioconductor build servers the file(s) are not removed (as far as I read the documentation/code they ought to be). If I try to remove them explicitly, by including a Makefile with a target clean: rm -rf Rplots.pdf my.db pmy.db (there are two databases), it fails with the error message rm: cannot remove `Rplots.pdf': Device or resource busy rm: cannot remove `my.db': Device or resource busy rm: cannot remove `pmy.db': Device or resource busy make: *** [all] Error 1 Error in tools::buildVignettes(dir = ".") : running 'make' failed Execution halted Note that (1) This did not happen under R-2.11 (2) It does not happen under Linux or OS X. I believe this is a general phenomenon of no cleanup on windows. If I look at the affy package from Bioconductor, the windows binary has a file doc/Rplots.pdf that is not present inside inst/doc in the source tarball. I have not been able to find a package on CRAN with a vignette with plots in it, that did also include the pdf version of the vignette or where Rplots.pdf was not also included in the source tarball, so this may be an issue specific to the Bioconductor build system. I guess an alternative to creating the database inside inst/doc is to use a tempfile. Comments? Kasper