Skip to content
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

install_github forces upgrade of packages already installed #863

Closed
cboettig opened this issue Jun 26, 2015 · 7 comments
Closed

install_github forces upgrade of packages already installed #863

cboettig opened this issue Jun 26, 2015 · 7 comments

Comments

@cboettig
Copy link

I need a package that is broken by the latest version of igraph at the moment, so I install an archived first with devtools::install_version(). I then go and install the package I need using install_github(), but this upgrades me to the latest version of igraph.

Here the archived version is installed: https://travis-ci.org/cboettig/gpmanagement/builds/68427213#L2133

And here is install_github call updating it to the latest version: https://travis-ci.org/cboettig/gpmanagement/builds/68427213#L2756

Here is the travis file for this build: https://github.com/cboettig/gpmanagement/blob/d1ac025328dc34dc1bd77bdf465f04ba2d6747fa/.travis.yml

Am I just missing something or is this not the expected behavior?

@cboettig
Copy link
Author

this also affects devtools::install, which similarly attempts to install the newer igraph (and all its new dependencies) rather than use the version already installed.

@cboettig
Copy link
Author

Just to make this a concise reproducible example:

devtools::install_version('igraph', '0.7.1', repo = 'http://cran.rstudio.com')
# This next command first upgrades igraph, which causes the installation to fail
devtools::install_github("nimble-dev/nimble/packages/nimble@stable")

note that the nimble package does not place any restrictions on version numbers of its dependencies (and its installation fails with igraph > 1.0, but works with 0.7.1). Or maybe @gaborcsardi can see if I'm just doing something wrong with respect to igraph or this installation?

@wch
Copy link
Member

wch commented Jun 26, 2015

I agree that this behavior is annoying and causes unexpected system changes when I'm debugging stuff. Maybe make it opt-in?

@hadley
Copy link
Member

hadley commented Sep 2, 2015

Yeah, this is expected behaviour because I see a lot of people who have problems because (e.g.) they installed the latest ggplot2, but have an old version of dplyr. If you don't want to update the deps, do dep = FALSE.

@hadley hadley closed this as completed Sep 2, 2015
@hadley hadley reopened this Sep 5, 2015
@jeroen
Copy link
Member

jeroen commented Sep 5, 2015

+1 for an option to disable automatic package upgrades. The problem with dep = FALSE is that it won't install required missing dependencies either, which causes the installation to fail.

We still need dependencies that are currently not installed, just not reinstall packages when a suitable version is available.

@stanstrup
Copy link

stanstrup commented Apr 19, 2018

devtools::install_github("stanstrup/PredRet",subdir = "PredRetR", dependencies=FALSE, upgrade_dependencies=FALSE)

Still tries to install stanstrup/Rplot.extra even if it is already installed.
Any solution for that?

The installed Rplot.extra was not specified as a remote in the currently installed version if that makes a difference.

EDIT: install.packages("/usr/local/lib/R/PredRetR.tar.gz", type="source", dependencies=FALSE) works.

Package: PredRetR
Version: 0.55
Date: 2016-05-20
Title: PredRetR
Author: Jan Stanstrup <stanstrup@gmail.com>
Maintainer: Jan Stanstrup <stanstrup@gmail.com>
Depends: R (>= 2.14.0), rmongodb, ggplot2, shiny
Suggests: rCharts
Imports: stringr, mgcv, pracma, boot, parallel, plyr, reshape2, Rplot.extra, massageR, igraph, ini
Enhances: 
Description: Functions for PredRet prediction of retention times.
License: GPL (>= 2)
URL: None
biocViews: Metabolomics
Remotes: stanstrup/Rplot.extra, stanstrup/massageR

@lock
Copy link

lock bot commented Oct 16, 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. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Oct 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants