Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Dependencies install to the wrong place #411

@kenahoo

Description

@kenahoo

When doing remotes::install_version(pkg, ver, lib=location), the package pkg will get installed to the correct location location, but any dependencies will not.

This is because remotes::install doesn't pass along ... to the install_deps() call:

> packageVersion('remotes')
[1] '2.1.0'
> remotes:::install
function (pkgdir, dependencies, quiet, build, build_opts, build_manual, 
    build_vignettes, upgrade, repos, type, ...) 
{
    warn_for_potential_errors()
    if (file.exists(file.path(pkgdir, "src"))) {
        if (has_package("pkgbuild")) {
            pkgbuild::local_build_tools(required = TRUE)
        }
        else if (!has_devel()) {
            missing_devel_warning(pkgdir)
        }
    }
    pkg_name <- load_pkg_description(pkgdir)$package
    if (is_root_install()) 
        on.exit(exit_from_root_install(), add = TRUE)
    if (check_for_circular_dependencies(pkgdir, quiet)) {
        return(invisible(pkg_name))
    }
    install_deps(pkgdir, dependencies = dependencies, quiet = quiet, 
        build = build, build_opts = build_opts, build_manual = build_manual, 
        build_vignettes = build_vignettes, upgrade = upgrade, 
        repos = repos, type = type)
    if (isTRUE(build)) {
        dir <- tempfile()
        dir.create(dir)
        on.exit(unlink(dir), add = TRUE)
        pkgdir <- safe_build_package(pkgdir, build_opts, build_manual, 
            build_vignettes, dir, quiet)
    }
    safe_install_packages(pkgdir, repos = NULL, quiet = quiet, 
        type = "source", ...)
    invisible(pkg_name)
}
<bytecode: 0x1fd4020>
<environment: namespace:remotes>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions