Skip to content

[Bioc-devel] Challenges with package installation on fresh R

11 messages · Hervé Pagès, Dan Tenenbaum, Vladislav Petyuk

#
----- Original Message -----
You need to provide the complete output of R when you try and install the package.
The error is in that output somewhere. 

Dan
#
Just added the full output to the README.md file
https://github.com/vladpetyuk/toypack/blob/master/README.md


On Thu, Jun 25, 2015 at 12:28 PM, Dan Tenenbaum <dtenenba at fredhutch.org>
wrote:

  
  
#
----- Original Message -----
Do you get the same results if you do:

devtools::install_github("vladpetyuk/toypack", build_vignettes=TRUE, dependencies=TRUE)

?

When you pass biocLite() a username/repos argument as you've done, it just delegates all the work to devtools::install_github(). 

If you get the same issue with install_github(), then the issue has nothing to do with Bioconductor and you need to discuss it with the maintainer of devtools. 
If not, then maybe there is an issue with the way we delegate to that command.

Dan
#
----- Original Message -----
Sorry, I was wrong. We also pass the bioconductor repositories to that command so that dependencies can be installed.

So never mind. We'll keep looking into it.

Dan
#
Yes, the issue is the same if I use
devtools::install_github("vladpetyuk/toypack", build_vignettes=TRUE,
dependencies=TRUE)

I posted on Bioc-devel list because all the problematic packages are
suspiciously similar - all related to Bioconductor and deal with some sort
of databases (GO/KEGG/Reactome).

On Thu, Jun 25, 2015 at 1:08 PM, Dan Tenenbaum <dtenenba at fredhutch.org>
wrote:

  
  
#
----- Original Message -----
After looking at it some more, I observe:

1) It looks like biocLite() does not pass a repositories argument to install_github(). So it's probably best not to biocLite() for anything but the most trivial installations from github, at least for now. So let's try and remove biocLite() from the equation.
2) install_github() seems to have a problem even if you pass it a repos argument. 

For example:

library(BiocInstaller) # to get biocinstallRepos() function
library(devtools)
install_github("vladpetyuk/toypack", dependencies=TRUE, repos=biocinstallRepos())

It says "Skipping 13 packages not available" and lists all the Bioconductor packages it "tried" to install.
The repos argument is supposed to be passed (as part of ...) to install.packages() but install.packages() is never called (I know because I called debug() on it and never got to a debugger).

So I'd say this is either a bug in devtools or a bug in our understanding of how install_github() is supposed to work. 

So I would maybe ask about this at https://github.com/hadley/devtools/issues . 

Dan
#
Hi Vladislav,
On 06/25/2015 01:13 PM, Vladislav Petyuk wrote:
What all these packages have in common is that we don't provide binaries
for them anymore. That's because install.packages() (and thus 
biocLite(), which uses install.packages() internally) knows how to
deal with this (via type="both", which is now the default on Windows
and Mac). However, some core utilities like utils::download.packages()
have not been properly adapted to handle the situation where a binary
is missing. For example with R-3.2.1 on Windows:

   > library(BiocInstaller)
   > download.packages("GO.db", destdir=".", repos=biocinstallRepos())
   trying URL 
'http://bioconductor.org/packages/3.2/data/annotation/src/contrib/GO.db_3.1.2'
   Error in download.file(url, destfile, method, mode = "wb", ...) :
     cannot open URL 
'http://bioconductor.org/packages/3.2/data/annotation/src/contrib/GO.db_3.1.2'
   In addition: Warning message:
   In download.file(url, destfile, method, mode = "wb", ...) :
     cannot open: HTTP status was '404 Not Found'
   Warning in download.packages("GO.db", destdir = ".", repos = 
biocinstallRepos()):
     download of package 'GO.db' failed
        [,1] [,2]

This could be what breaks install_github() (which doesn't seem to
use install.packages() internally but to instead handle the downloading
of the packages itself).

Cheers,
H.

  
    
#
----- Original Message -----
install_github() calls install() whose documentation says that its ... arguments are passed to install.packages() in order to install dependencies. But I agree that something else seems to be going on here and that devtools decides the packages can't be installed without running install.packages().

Dan
#
Dan, Herve, thanks for taking a look. This gives some leads.

On Thu, Jun 25, 2015 at 7:26 PM, Dan Tenenbaum <dtenenba at fredhutch.org>
wrote:

  
  
#
It looks like devtools::package_deps is forcing type to be "binary".
if (identical(type, "both")) {
        type <- "binary"
}
function (pkg, dependencies = NA, repos = getOption("repos"),
    type = getOption("pkgType"))
{
    if (identical(type, "both")) {
        type <- "binary"
    }
    if (length(repos) == 0)
        repos <- character()
    repos[repos == "@CRAN@"] <- "http://cran.rstudio.com"
    cran <- available_packages(repos, type)
    if (missing(pkg)) {
        pkg <- as.package(".")$package
    }
    deps <- sort(find_deps(pkg, cran, top_dep = dependencies))
    inst <- installed.packages()
    base <- unname(inst[inst[, "Priority"] %in% c("base", "recommended"),
        "Package"])
    deps <- setdiff(deps, base)
    inst_ver <- unname(inst[, "Version"][match(deps, rownames(inst))])
    cran_ver <- unname(cran[, "Version"][match(deps, rownames(cran))])
    diff <- compare_versions(inst_ver, cran_ver)
    structure(data.frame(package = deps, installed = inst_ver,
        available = cran_ver, diff = diff, stringsAsFactors = FALSE),
        class = c("package_deps", "data.frame"), repos = repos,
        type = type)
}
<environment: namespace:devtools>
On Fri, Jun 26, 2015 at 2:12 PM, Vladislav Petyuk <petyuk at gmail.com> wrote:

            

  
  
#
the issue posted
https://github.com/hadley/devtools/issues/864
On Fri, Jun 26, 2015 at 2:36 PM, Vladislav Petyuk <petyuk at gmail.com> wrote: