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 3 commits into from Nov 5, 2016


None yet
2 participants

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("", ""))

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.
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 Nov 3, 2016


How is type = "both" handled now?

This comment has been minimized.


jimhester Nov 4, 2016


devtools always forces a type of binary, 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%)
codecov/project 49.12% (+0.17%) compared to 26c507b
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.


hadley commented Nov 5, 2016


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