Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

BiocManager::install() not installing package if available version is lower than current

Open
#128 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start with the BiocManager::install() behavior and the BiocManager::valid() workflow shown in the report, using the SQLDataFrame example to trace how installed and available versions are compared. Reproduce the reported warning and make the resulting install behavior or warning accurately handle an available version lower than the installed version.

Written by the indexing model from the issue text.

Description

I have SQLDataFrame 1.9.1:

packageVersion("SQLDataFrame")
# [1] ‘1.9.1’

and the version of SQLDataFrame currently available in BioC 3.15 is 1.9.0:

library(BiocManager)
available.packages(repos=BiocManager::repositories())["SQLDataFrame", "Version"]
# [1] "1.9.0"

But if I run BiocManager::install() I get:

BiocManager::install("SQLDataFrame")
# Bioconductor version 3.15 (BiocManager 1.30.16), R Under development (unstable)
#   (2021-10-25 r81105)
# Warning message:
# package(s) not installed when version(s) same as current; use `force = TRUE` to
#   re-install: 'SQLDataFrame' 

It seems to me that BiocManager::install("somePackage") should just re-install by default (i.e. without the need to use force=TRUE) when the available version is different from the installed version, including when it's lower than the installed version.

If we don't want that, then the warning message would need to be corrected to say something like:

package(s) not installed when version(s) same as (or lower than) current; use force = TRUE to re-install: 'somePackage'

FWIW I ran into this issue in the context of BiocManager::valid():

> BiocManager::valid()

* sessionInfo()

R Under development (unstable) (2021-10-25 r81105)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 21.10

Matrix products: default
BLAS:   /home/hpages/R/R-4.2.r81105/lib/libRblas.so
LAPACK: /home/hpages/R/R-4.2.r81105/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB              LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] Spectra_1.5.6        ProtGenerics_1.27.2  BiocParallel_1.29.12
[4] S4Vectors_0.33.10    BiocGenerics_0.41.2  BiocManager_1.30.16 

loaded via a namespace (and not attached):
[1] MASS_7.3-55       compiler_4.2.0    IRanges_2.29.1    parallel_4.2.0   
[5] tools_4.2.0       fs_1.5.2          MsCoreUtils_1.7.1 clue_0.3-60      
[9] cluster_2.1.2    

Bioconductor version '3.15'

  * 0 packages out-of-date
  * 3 packages too new

create a valid installation with

  BiocManager::install(c(
    "coMET", "GenomeInfoDb", "SQLDataFrame"
  ), update = TRUE, ask = FALSE)

more details: BiocManager::valid()$too_new, BiocManager::valid()$out_of_date

Warning message:
0 packages out-of-date; 3 packages too new 

But when I tried to create a valid installation by copy/paste'ing the suggested command I got:

>   BiocManager::install(c(
+     "coMET", "GenomeInfoDb", "SQLDataFrame"
+   ), update = TRUE, ask = FALSE)
Bioconductor version 3.15 (BiocManager 1.30.16), R Under development (unstable)
  (2021-10-25 r81105)
Warning message:
package(s) not installed when version(s) same as current; use `force = TRUE` to
  re-install: 'coMET' 'GenomeInfoDb' 'SQLDataFrame' 

Thanks,
H.

Dominant language
R
Stars
76
Forks
29
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from Bioconductor/BiocManager

All issues in Bioconductor/BiocManager

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.