0

I think I might be unsure of the workflow packrat expects.

I'm trying to make a docker image using packrat for dependencies management. As a simple example, I've:

  • Created a completely new project
  • Ran
    • packrat::on()
    • install.packages("RSQLite")
    • packrat::snapshot()
  • To the emulate the docker environment, I deleted all the packrat/lib* folder and src, as I would add these to the .dockerignore, as all the package information needed is in the packrat.lock file
  • Then running packrat::restore() I hit the error:

(formatting messed up without a line here)

> packrat::restore()
Installing BH (1.62.0-1) ... 
    OK (built source)
Installing DBI (0.7) ... 
    OK (built source)
Installing RSQLite (2.0) ... 
Error: Command failed (1)

Failed to run system command:

    '/usr/lib/R/bin/R' --vanilla CMD INSTALL '/tmp/RtmppGgJVt/RSQLite' --library='/home/akhil/example/packrat/packrat/lib/x86_64-pc-linux-gnu/3.3.3' --install-tests --no-docs --no-multiarch --no-demo 

The command failed with output:
ERROR: dependencies 'bit64', 'blob' are not available for package 'RSQLite'
* removing '/home/akhil/example/packrat/packrat/lib/x86_64-pc-linux-gnu/3.3.3/RSQLite'

Slightly confused at what I should do at this point - bit64 and blob are in the lock file, but I don't know how to tell packrat to install the dependencies first.

I get the same result using packrat::bundle() and packrat::unbundle(..., restore = TRUE) (which, from what I can see, does the same as I was doing, just keeping the packrat/src/ folder).

Thanks

Akhil Nair
  • 3,144
  • 1
  • 17
  • 32
  • Relevant discussion relating to the issue on GitHub: https://github.com/rstudio/packrat/issues/391 – DaveRGP Oct 10 '17 at 11:52
  • 1
    That was me too :) the issue was fixed, it was a bug – Akhil Nair Oct 10 '17 at 12:08
  • I'm still struggling with something that I thought was the same, but the devtools installation of 0.4.8-49 – DaveRGP Oct 10 '17 at 12:09
  • 1
    Just checked the history, the fix has been confirmed as merged into master, so likely not the same problem unless it have cropped up again. If you think it ~is the same, you can `remotes::install_github(user/repo@commit_hash)` to see if it's a broken regression – Akhil Nair Oct 10 '17 at 12:13

0 Answers0