rstudio / rstudio/packrat

Updating symlinked packages fails

Open
#228 19 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
409
Forks
89
PR merge metrics
No merged PRs in 30d

Description

When I try to overwrite a symlinked package when using the cache option, I get

install.packages("scrm")
[...]
ERROR: ‘scrm’ is not a legal package name

It seems this happens for all front-ends of R CMD INSTALL (I have tested R CMD INSTALL itself, install.packages, update.packages, packrat::install and packrat::install_github).

My best guess is that R tries and fails to overwrite the symlink with a directory. If I manually delete the symlink, everything works. I'm not sure if you can solve this for R CMD INSTALL, but the packrat commands could remove the symlink before installing a new version of an existing package.

sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=de_DE.UTF-8        LC_COLLATE=C               LC_MONETARY=de_DE.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=de_DE.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] R6_2.0.1        RCurl_1.95-4.6  Rcpp_0.11.6     XML_3.98-1.1    ape_3.3         assertthat_0.1  bitops_1.0-6    coala_0.0.9106 
 [9] digest_0.6.8    git2r_0.10.1    grid_3.1.2      lattice_0.20-31 magrittr_1.5    memoise_0.2.1   nlme_3.1-119    packrat_0.4.4  
[17] phyclust_0.1-15 rversions_1.0.0 scrm_1.6.0-2    settings_0.2.2  stringi_0.4-1   stringr_1.0.0   tools_3.1.2   

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the cache option using install.packages("scrm"), R CMD INSTALL, and the packrat installation commands listed in the report. Start by tracing how an existing symlinked package is handled before installation; done means updating that package no longer reports an illegal package name and does not require manually deleting the symlink.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.