Skip to content

If rlang have newer source version for windows, install_github could fail because of locking #2223

Closed
@dracodoc

Description

@dracodoc

I have rlang 0.4.5 binary installed

> install.packages("rlang")
Installing package intoD:/Lib/R_user_lib’
(aslibis unspecified)

  There is a binary version available but the source version is later:
      binary source needs_compilation
rlang  0.4.5  0.4.6              TRUE

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/rlang_0.4.5.zip'
Content type 'application/zip' length 1112530 bytes (1.1 MB)
downloaded 1.1 MB

packagerlangsuccessfully unpacked and MD5 sums checked

while installing a package with install_github, I chose to only update CRAN packages,

> devtools::install_github("ctmm-initiative/ctmmweb")
Downloading GitHub repo ctmm-initiative/ctmmweb@master
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                          
2: CRAN packages only           
3: None                         
4: rlang (0.4.5 -> 0.4.6) [CRAN]

Enter one or more numbers, or an empty line to skip updates:
2
rlang        (0.4.5 -> 0.4.6   ) [CRAN]

then it will ask me

There is a binary version available (and will be installed) but the source version is later:
binary source
rlang 0.4.5 0.4.6

I chose Not to install from source, then it will download 0.4.5 and try to install it again, even I already have 0.4.5 installed. In the end the package installation will fail.

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/rlang_0.4.5.zip'
Content type 'application/zip' length 1112530 bytes (1.1 MB)
downloaded 1.1 MB
...
packagerlangsuccessfully unpacked and MD5 sums checked
Error: Failed to install 'ctmmweb' from GitHub:
  (converted from warning) cannot remove prior installation of packagerlang

I cannot pass this failure loop unless I chose to install rlang 0.4.6 from source.

I think the problem is, once the process scheduled to install 0.4.6, even user chose not to install from source, it will try to install binary version even there is a same version binary package installed already. Then somehow this will cause problem.

Either don't try to install the same version binary, or fix the problem of installing same version binary again will fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions