callr-org / website

http://callr.org
6 stars 0 forks source link

install: Installing from URL gives false "Failed to install requested package: 'R.cache_0.10.0.tar.gz'" #11

Closed HenrikBengtsson closed 9 years ago

HenrikBengtsson commented 9 years ago

Example:

> source("http://callr.org/install#http://cran.r-project.org/src/contrib/R.cache_0.10.0.tar.gz")
Installing/updating package: 'R.cache_0.10.0.tar.gz'
Installing packages from URLs:
Downloading package from url: http://cran.r-project.org/src/contrib/R.cache_0.10.0.tar.gz
Installing R.cache
"C:/PROGRA~1/R/R-3.2.0patched/bin/x64/R" --vanilla CMD INSTALL  \
  "C:/Users/hb/AppData/Local/Temp/RtmpS6uwe3/devtools1c784a6567a9/R.cache"  \
  --library="C:/Users/hb/R/win-library/3.2" --install-tests

* installing *source* package 'R.cache' ...
** package 'R.cache' successfully unpacked and MD5 sums checked
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (R.cache)

Package updates:
                      Previous Current
R.cache                   <NA>  0.10.0
R.cache_0.10.0.tar.gz     <NA>    <NA>

Failed to install requested package: 'R.cache_0.10.0.tar.gz'

The package does indeed install, e.g.

> library(R.cache)
R.cache v0.10.0 (2014-06-10) successfully loaded. See ?R.cache for help.

The problem is in the internal findPackages() that fails to parse the package name properly.

HenrikBengtsson commented 9 years ago

Fixed:

> source("http://callr.org/install#http://cran.r-project.org/src/contrib/R.cac$
Installing/updating package: 'R.cache'
Installing packages from URLs:
Downloading package from url: http://cran.r-project.org/src/contrib/R.cache_0.10
.0.tar.gz
Installing R.cache
"C:/PROGRA~1/R/R-3.2.0patched/bin/x64/R" --vanilla CMD INSTALL  \
  "C:/Users/hb/AppData/Local/Temp/Rtmp6tzHMp/devtoolsdb03c1b5635/R.cache"  \
  --library="C:/Users/hb/R/win-library/3.2" --install-tests

* installing *source* package 'R.cache' ...
** package 'R.cache' successfully unpacked and MD5 sums checked
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (R.cache)

Package updates:
        Previous Current
R.cache     <NA>  0.10.0

Package installed/updated. Load it by:

 library('R.cache')

(These commands have been added to your commands history.)