New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in `build_vignettes(, upgrade = FALSE)` argument #1139

walmes opened this Issue Apr 3, 2016 · 1 comment


None yet
2 participants

walmes commented Apr 3, 2016

When I run build_vignettes() in my package, the function tries to install some packages. But all the mentioned packages I already have, in the same path, but not in the most recent version.

> build_vignettes()
Installing 3 packages: evaluate, formatR, knitr
Installing packages into/usr/local/lib/R/site-library’
(aslibis unspecified)
Warning in utils::install.packages(pkgs, repos = repos, type = type, ...,  :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Would you like to use a personal library instead?  (y/n)

> ip <- installed.packages()
> ip[rownames(ip) %in% c("evaluate", "formatR", "knitr"), 1:2]
         Package    LibPath                  
evaluate "evaluate" "/usr/lib/R/site-library"
formatR  "formatR"  "/usr/lib/R/site-library"
knitr    "knitr"    "/usr/lib/R/site-library"

The argument dependencies = "VignetteBuilder argument is passed down, build_vignette() > install_deps() > dev_package_deps(), the last check for updates.

> pkg <- dev_package_deps(pkg, repos = repos, dependencies = dependencies, type = type)
Needs update -----------------------------
 package  installed available
 evaluate 0.8       0.8.3    
 formatR  1.2.1     1.3      
 knitr    1.12      1.12.3   

New versions are always installed. But, why not add a argument in build_vignettes() to update or not packages, upgrade = FALSE, that is passed to update() inside install_deps()? With this, only non installed packages will be installed, but not those already installed.

Thanks in advance.

@hadley hadley added this to the 1.12.0 milestone Jun 2, 2016

@hadley hadley closed this in 941cf9b Jun 2, 2016


This comment has been minimized.

lock bot commented Sep 18, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue.

@lock lock bot locked and limited conversation to collaborators Sep 18, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.