BiocManager icon indicating copy to clipboard operation
BiocManager copied to clipboard

BiocManager does not respect `dependencies = TRUE` when the non-Suggests packages have already been installed

Open mtmorgan opened this issue 1 year ago • 0 comments

Reported via email

.libPaths(tempfile())
BiocManager::install('phangorn') # installs phangorn

So far so good, but

> BiocManager::install('phangorn', dependencies = TRUE)
Bioconductor version 3.17 (BiocManager 1.30.20), R Under development (unstable)
  (2023-02-21 r83887)
Old packages: 'MASS', 'mgcv', 'survival'
Update all/some/none? [a/s/n]: n
Warning message:
package(s) not installed when version(s) same as or greater than current; use
  `force = TRUE` to re-install: 'phangorn'
>

so the dependencies are not installed...

install.packages() says

> install.packages('phangorn', dependencies = TRUE, repos = "https://cran.r-project.org")
Installing package into ‘/private/var/folders/yn/gmsh_22s2c55v816r6d51fx1tnyl61/T/RtmpsjHQs2’
(as ‘lib’ is unspecified)
Warning: dependencies ‘Biostrings’, ‘seqLogo’ are not available
also installing the dependencies ‘htmlwidgets’, ‘bslib’, ...

It also re-installs 'phangorn', which is not desirable.

I guess a workaround is to follow the BiocManager advice, and install missing dependencies and re-install phangorn.

BiocManager::install('phangorn', dependencies = TRUE, force = TRUE)
> packageVersion('BiocManager')
[1] ‘1.30.20’

mtmorgan avatar Mar 17 '23 17:03 mtmorgan