Open kenahoo opened 5 years ago
Wondering if you have thoughts on this.
Here's the practical effect - the binary package doesn't get cached and used for the next installation:
> library(crancache)
> install_packages('reshape')
Installing package into ‘/Users/kwilliams/R/library/3.5’
(as ‘lib’ is unspecified)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 42558 100 42558 0 0 65218 0 --:--:-- --:--:-- --:--:-- 65273
* installing *source* package ‘reshape’ ...
** package ‘reshape’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (reshape)
The downloaded source packages are in
‘/private/var/folders/zp/hj5hqfw970z0_78mrb_802lm0001z9/T/RtmpuPaQ8H/downloaded_packages’
Adding ‘reshape_0.8.8.tar.gz’ to the cache
> install_packages('reshape')
Installing package into ‘/Users/kwilliams/R/library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package ‘reshape’ ...
** package ‘reshape’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (reshape)
The downloaded source packages are in
‘/private/var/folders/zp/hj5hqfw970z0_78mrb_802lm0001z9/T/RtmpuPaQ8H/downloaded_packages’
I tracked a problem down to this bit of code in
get_cache_dir_for_file(file)
:If the argument
file
is a string like".../reshape2_1.4.3.tgz"
and.Platform$pkgType
is"source"
, then I'm ending up withwhich
equal toNULL
. So at the end of the function, it's trying to doget_cache_package_dirs()[["cran/"]]
, but that's not a valid key, so I get this error:The names of
get_cache_package_dirs()
are:It looks like there are several paths through the
which
assignment code that result inNULL
.The consequence of this is that the requested package does get installed, but if I run the same
install_packages('pkgname')
command again, neither the binary nor the source are found in the cache.