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

These changes address uses non-standard CRAN like repositories e.g. (drat) #1339

Merged
merged 3 commits into from Nov 5, 2016

Conversation

Projects
None yet
2 participants
@jimhester
Member

jimhester commented Sep 12, 2016

This PR addresses #1243.

There were two issues, first the prior behavior of forcing type = binary was causing drat repositories without binary packages to fail, second the repos argument was not being passed onto update().

With these changes the following correctly installs rrdf and rrdflibs as expected by @cboettig.

devtools::install_github("ropensci/RNeXML", dep=TRUE, repos = c("https://cran.rstudio.com", "http://packages.ropensci.org"))

jimhester added some commits Sep 12, 2016

Do not explicitly set type to 'binary'
Doing so fails if a CRAN-like repository (such as a drat repository) is
used, as they do not have a binary package index.

We preserve the behavior of not prompting and installing the binary even
if there is a newer source by setting
"install.packages.compile.from.source" to "never", which always installs
the binary even if there is a newer source.

https://github.com/wch/r-source/blob/2f2e4711ad7089f97f22c6b1ae25ba582d2e99a6/src/library/utils/R/packages2.R#L408-L436
has details of how that option is used in `install.packages()`.
@@ -47,9 +44,6 @@
#' }
package_deps <- function(pkg, dependencies = NA, repos = getOption("repos"),
type = getOption("pkgType")) {
if (identical(type, "both")) {

This comment has been minimized.

@hadley

hadley Nov 3, 2016

Member

How is type = "both" handled now?

This comment has been minimized.

@jimhester

jimhester Nov 4, 2016

Member

devtools always forces a type of binary https://github.com/hadley/devtools/pull/1339/files#diff-e7118181d76027ea30ccf5babc54f550L51, which means you never have a interactive dialog asking if you want to install.

This PR sets option("install.packages.compile.from.source" = "never"), which effectively means the same as forcing a type of "binary" if type = 'both', unless there is no binary available (such as drat repositories), in which case it will compile the package.

@hadley hadley merged commit efa894f into r-lib:master Nov 5, 2016

3 of 4 checks passed

codecov/patch 40.00% of diff hit (target 48.95%)
Details
codecov/project 49.12% (+0.17%) compared to 26c507b
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hadley

This comment has been minimized.

Member

hadley commented Nov 5, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment