You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might have overlooked some "clean up" switch in devtools::build(), but as far as I can tell, the directory that is automatically created when building a Windows binary causes trouble in subsequent build processes once a binary-build is followed by a source-build.
Here's the walk through:
Create an empty package project in RStudio called devtools.issue
Build the package using the following code:
Create repositories
repos_vec <- file.path(tempdir(), c("repos_1", "repos_2"))
## NOTE
## Suppose that these are two different package repositories following the
## CRAN directory conventions for contributed packages (e.g. `bin` and `src`
## subdirectories etc.). For each repository, we'd like to build a `zip` and a
## `tar.gz` version or package 'devtools.issue'.
## Ensure existence of repository directories //
sapply(repos_vec, dir.create, recursive = TRUE, showWarnings = FALSE)
Build into first repository
devtools::build(binary = TRUE, path = repos_vec[1])
## Status: ok
devtools::build(path = repos_vec[1])
## Status: ok
This is the actual error I'm getting and I think it has to do with the fact that the directory devtools.issue that has been created when building the first binary is either not removed (should it be?) and/or "messed" up by the build process of the first tar.gz:
> devtools::build(binary = TRUE, path = repos_vec[2])
"Q:/home/apps/RAPPTO~1/apps/r/R-31~1.1/bin/x64/R" --vanilla CMD INSTALL \
"C:\Users\jat\Documents\devtools.issue" --build
* installing to library 'C:/Users/jat/AppData/Local/Temp/RtmpglqaO8'
* installing *source* package 'devtools.issue' ...
Warning in file.copy(f, instdir, TRUE) :
problem copying .\NAMESPACE to C:\Users\jat\AppData\Local\Temp\RtmpglqaO8\devtools.issue\NAMESPACE: No such file or directory
Warning in file(file, ifelse(append, "a", "w")) :
cannot open file 'C:/Users/jat/AppData/Local/Temp/RtmpglqaO8/devtools.issue/DESCRIPTION': No such file or directory
Error in file(file, ifelse(append, "a", "w")) :
cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'devtools.issue'
* restoring previous 'C:/Users/jat/AppData/Local/Temp/RtmpglqaO8/devtools.issue'
I'm guessing that creating the devtools.issue directory when building binaries is a must. But shouldn't it be removed afterwards? After all, I did say "build to path", so I wouldn't necessarily expect anything to be created outside of directory that I specified via path.
The text was updated successfully, but these errors were encountered:
jankowtf
changed the title
Recursive package building fails
Recursive package building fails for certain constellations
Aug 20, 2014
I might have overlooked some "clean up" switch in
devtools::build()
, but as far as I can tell, the directory that is automatically created when building a Windows binary causes trouble in subsequent build processes once a binary-build is followed by a source-build.Here's the walk through:
devtools.issue
Create repositories
Build into first repository
Build into second repository
This is the actual error I'm getting and I think it has to do with the fact that the directory
devtools.issue
that has been created when building the first binary is either not removed (should it be?) and/or "messed" up by the build process of the firsttar.gz
:I'm guessing that creating the
devtools.issue
directory when building binaries is a must. But shouldn't it be removed afterwards? After all, I did say "build topath
", so I wouldn't necessarily expect anything to be created outside of directory that I specified viapath
.The text was updated successfully, but these errors were encountered: