Hello,
I am trying to figure out the following workflow:
1. Develop project on machine A which has a local repo of custom package.
2. Bundle the project and include sources for CRAN and local packages.
3. Deploy the project on machine B which does NOT have the same local repo. The intent is that everything that's needed is included in the bundle.
I have steps 1 and 2 working, which I did by setting the 'repos' option to include my local repo, and adding a "Repository: MyLib" line to the DESCRIPTION file for each package. When I bundle I set include.lib=TRUE. It seems that the sources are included, including the local packages. So far so good.
I then extract the archive on machine B and run R. The packrat init script runs, and then fails here:
- Restoring project library...
Error in read.dcf(file = tmpf) : cannot open the connection
In addition: Warning messages:
1: In restore(project = getwd(), restart = FALSE) :
The most recent snapshot was generated using R version 3.1.2
2: In read.dcf(file = tmpf) :
cannot open compressed file '/path/to/my/local/repo/src/contrib/PACKAGES', probable reason 'No such file or directory'
Naturally it fails, because that path doesn't exist on this machine. But I had thought it wouldn't need access to the local repo, since the sources are included in the archive. Have I misunderstood something fundamental about how packrat works? Is there a way to do what I want?
Thanks