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_local() tries to upgrade dependencies in "Remotes:", even if upgrade = "never" #815

Closed
mkoohafkan opened this issue Oct 25, 2024 · 3 comments

Comments

@mkoohafkan
Copy link

I have a package packagetwo with a dependency on packageone in the DESCRIPTION:

Package: packagetwo
Imports: packageone
Remotes: git::http://url/for/packageone.git
...

I install packageone locally:

remotes::install_local('path/to/packageone')
# works!

I then try to install packagetwo locally, without upgrading dependencies. However, remotes still calls out to the remote repository for packageone, even though it is already installed:

remotes::install_local('path/to/packagetwo', upgrade = "never")

This seems like a bug.

My current workaround is to install all of the dependencies for packagetwo (and specifically exclude packageone), and then install packagetwo with the argument dependencies = FALSE.

I do want it to install dependencies for packagetwo, just not those that are already installed (which I thought would be accomplished via the argument upgrade = "never").

@gaborcsardi
Copy link
Member

That's not a bug. remotes is not sure if version requested from git::http://url/for/packageone.git is installed, so it installs it.

@mkoohafkan
Copy link
Author

But with upgrade = "never", aren't we explicitly telling remotes to not do that check?

@gaborcsardi
Copy link
Member

That does not apply to Remotes, only to CRAN packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants