Running packrat::on() twice creates recursive links in lib-R

43 views
Skip to first unread message

Ariel Schwartz

unread,
Jan 14, 2016, 10:17:17 PM1/14/16
to packrat-discuss
I have noticed that running packrat::on()messes up the symlinks in the lib-R directory.

Example:

~/Documents/ShinyApps/testPackrat% R




R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"


Copyright (C) 2015 The R Foundation for Statistical Computing


Platform: x86_64-apple-darwin13.4.0 (64-bit)




R is free software and comes with ABSOLUTELY NO WARRANTY.


You are welcome to redistribute it under certain conditions.


Type 'license()' or 'licence()' for distribution details.




  Natural language support but running in an English locale




R is a collaborative project with many contributors.


Type 'contributors()' for more information and


'citation()' on how to cite R or R packages in publications.




Type 'demo()' for some demos, 'help()' for on-line help, or


'help.start()' for an HTML browser interface to help.


Type 'q()' to quit R.




Packrat mode on. Using library in directory:


- "~/Documents/ShinyApps/testPackrat/packrat/lib"


Initially everything is looking good under lib-R.
On a separate bash shell:


~/Documents/ShinyApps/testPackrat% ls -l packrat/lib-R/

total 232


lrwxr-xr-x  1 aschwart  staff  60 Jan 14 19:02 KernSmooth -> /Library/Frameworks/R.framework/Resources/library/KernSmooth


lrwxr-xr-x  1 aschwart  staff  54 Jan 14 19:02 MASS -> /Library/Frameworks/R.framework/Resources/library/MASS


lrwxr-xr-x  1 aschwart  staff  56 Jan 14 19:02 Matrix -> /Library/Frameworks/R.framework/Resources/library/Matrix


lrwxr-xr-x  1 aschwart  staff  54 Jan 14 19:02 base -> /Library/Frameworks/R.framework/Resources/library/base


lrwxr-xr-x  1 aschwart  staff  54 Jan 14 19:02 boot -> /Library/Frameworks/R.framework/Resources/library/boot


lrwxr-xr-x  1 aschwart  staff  55 Jan 14 19:02 class -> /Library/Frameworks/R.framework/Resources/library/class


lrwxr-xr-x  1 aschwart  staff  57 Jan 14 19:02 cluster -> /Library/Frameworks/R.framework/Resources/library/cluster


lrwxr-xr-x  1 aschwart  staff  59 Jan 14 19:02 codetools -> /Library/Frameworks/R.framework/Resources/library/codetools


lrwxr-xr-x  1 aschwart  staff  58 Jan 14 19:02 compiler -> /Library/Frameworks/R.framework/Resources/library/compiler


lrwxr-xr-x  1 aschwart  staff  58 Jan 14 19:02 datasets -> /Library/Frameworks/R.framework/Resources/library/datasets


lrwxr-xr-x  1 aschwart  staff  57 Jan 14 19:02 foreign -> /Library/Frameworks/R.framework/Resources/library/foreign


lrwxr-xr-x  1 aschwart  staff  59 Jan 14 19:02 grDevices -> /Library/Frameworks/R.framework/Resources/library/grDevices


lrwxr-xr-x  1 aschwart  staff  58 Jan 14 19:02 graphics -> /Library/Frameworks/R.framework/Resources/library/graphics


lrwxr-xr-x  1 aschwart  staff  54 Jan 14 19:02 grid -> /Library/Frameworks/R.framework/Resources/library/grid


lrwxr-xr-x  1 aschwart  staff  57 Jan 14 19:02 lattice -> /Library/Frameworks/R.framework/Resources/library/lattice


lrwxr-xr-x  1 aschwart  staff  57 Jan 14 19:02 methods -> /Library/Frameworks/R.framework/Resources/library/methods


lrwxr-xr-x  1 aschwart  staff  54 Jan 14 19:02 mgcv -> /Library/Frameworks/R.framework/Resources/library/mgcv


lrwxr-xr-x  1 aschwart  staff  54 Jan 14 19:02 nlme -> /Library/Frameworks/R.framework/Resources/library/nlme


lrwxr-xr-x  1 aschwart  staff  54 Jan 14 19:02 nnet -> /Library/Frameworks/R.framework/Resources/library/nnet


lrwxr-xr-x  1 aschwart  staff  58 Jan 14 19:02 parallel -> /Library/Frameworks/R.framework/Resources/library/parallel


lrwxr-xr-x  1 aschwart  staff  55 Jan 14 19:02 rpart -> /Library/Frameworks/R.framework/Resources/library/rpart


lrwxr-xr-x  1 aschwart  staff  57 Jan 14 19:02 spatial -> /Library/Frameworks/R.framework/Resources/library/spatial


lrwxr-xr-x  1 aschwart  staff  57 Jan 14 19:02 splines -> /Library/Frameworks/R.framework/Resources/library/splines


lrwxr-xr-x  1 aschwart  staff  55 Jan 14 19:02 stats -> /Library/Frameworks/R.framework/Resources/library/stats


lrwxr-xr-x  1 aschwart  staff  56 Jan 14 19:02 stats4 -> /Library/Frameworks/R.framework/Resources/library/stats4


lrwxr-xr-x  1 aschwart  staff  58 Jan 14 19:02 survival -> /Library/Frameworks/R.framework/Resources/library/survival


lrwxr-xr-x  1 aschwart  staff  55 Jan 14 19:02 tcltk -> /Library/Frameworks/R.framework/Resources/library/tcltk


lrwxr-xr-x  1 aschwart  staff  55 Jan 14 19:02 tools -> /Library/Frameworks/R.framework/Resources/library/tools


lrwxr-xr-x  1 aschwart  staff  55 Jan 14 19:02 utils -> /Library/Frameworks/R.framework/Resources/library/utils


Back in R:


> packrat::on()


Packrat mode on. Using library in directory:


- "~/Documents/ShinyApps/testPackrat/packrat/lib"


All the symlinks in lib-R are now recursively pointing to themselves:


~/Documents/ShinyApps/testPackrat% ls -l packrat/lib-R/


total 232


lrwxr-xr-x  1 aschwart  staff  72 Jan 14 19:09 KernSmooth -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/KernSmooth


lrwxr-xr-x  1 aschwart  staff  66 Jan 14 19:09 MASS -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/MASS


lrwxr-xr-x  1 aschwart  staff  68 Jan 14 19:09 Matrix -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/Matrix


lrwxr-xr-x  1 aschwart  staff  66 Jan 14 19:09 base -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/base


lrwxr-xr-x  1 aschwart  staff  66 Jan 14 19:09 boot -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/boot


lrwxr-xr-x  1 aschwart  staff  67 Jan 14 19:09 class -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/class


lrwxr-xr-x  1 aschwart  staff  69 Jan 14 19:09 cluster -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/cluster


lrwxr-xr-x  1 aschwart  staff  71 Jan 14 19:09 codetools -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/codetools


lrwxr-xr-x  1 aschwart  staff  70 Jan 14 19:09 compiler -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/compiler


lrwxr-xr-x  1 aschwart  staff  70 Jan 14 19:09 datasets -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/datasets


lrwxr-xr-x  1 aschwart  staff  69 Jan 14 19:09 foreign -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/foreign


lrwxr-xr-x  1 aschwart  staff  71 Jan 14 19:09 grDevices -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/grDevices


lrwxr-xr-x  1 aschwart  staff  70 Jan 14 19:09 graphics -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/graphics


lrwxr-xr-x  1 aschwart  staff  66 Jan 14 19:09 grid -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/grid


lrwxr-xr-x  1 aschwart  staff  69 Jan 14 19:09 lattice -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/lattice


lrwxr-xr-x  1 aschwart  staff  69 Jan 14 19:09 methods -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/methods


lrwxr-xr-x  1 aschwart  staff  66 Jan 14 19:09 mgcv -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/mgcv


lrwxr-xr-x  1 aschwart  staff  66 Jan 14 19:09 nlme -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/nlme


lrwxr-xr-x  1 aschwart  staff  66 Jan 14 19:09 nnet -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/nnet


lrwxr-xr-x  1 aschwart  staff  70 Jan 14 19:09 parallel -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/parallel


lrwxr-xr-x  1 aschwart  staff  67 Jan 14 19:09 rpart -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/rpart


lrwxr-xr-x  1 aschwart  staff  69 Jan 14 19:09 spatial -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/spatial


lrwxr-xr-x  1 aschwart  staff  69 Jan 14 19:09 splines -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/splines


lrwxr-xr-x  1 aschwart  staff  67 Jan 14 19:09 stats -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/stats


lrwxr-xr-x  1 aschwart  staff  68 Jan 14 19:09 stats4 -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/stats4


lrwxr-xr-x  1 aschwart  staff  70 Jan 14 19:09 survival -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/survival


lrwxr-xr-x  1 aschwart  staff  67 Jan 14 19:09 tcltk -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/tcltk


lrwxr-xr-x  1 aschwart  staff  67 Jan 14 19:09 tools -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/tools


lrwxr-xr-x  1 aschwart  staff  67 Jan 14 19:09 utils -> /Users/aschwart/Documents/ShinyApps/testPackrat/packrat/lib-R/utils




Kevin Ushey

unread,
Jan 14, 2016, 11:51:40 PM1/14/16
to Ariel Schwartz, packrat-discuss
Hi Ariel,

Thanks for reporting -- I've reproduced this and filed an issue on GitHub. (https://github.com/rstudio/packrat/issues/265)

Best,
Kevin

--
You received this message because you are subscribed to the Google Groups "packrat-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packrat-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages