You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pkgAvail() has a filters argument that is passed on to utils::available.packages()L182. However makeRepo() calls pkgAvail() without this argument L62.
This means that, unless the available_packages_filters option is set, makeRepo() uses the default filters: c("R_version", "OS_type", "subarch", "duplicates"). It would be helpful if makeRepo() could take and pass on the filters argument.
This issue came up when making a repo with binaries for different platforms: carpentriesoffline/offlinedatasci#135 - the "subarch" filter excluded packages compiled for different platforms. It is possible to work round this by setting the available_packages_filters option, but enabling the argument in makeRepo would be more direct and consistent with pkgAvail().
The text was updated successfully, but these errors were encountered:
But for testing you could do something non-OS-specific, e.g.
> repos <- "https://cloud.r-project.org"
> type <- "source"
> dir.create(pth <- file.path(tempdir(), "miniCRAN"))
> makeRepo("tripack", pth, repos, type)
Created new folder: C:/Users/Heather/AppData/Local/Temp/RtmpUZOSav/miniCRAN/src/contrib
trying URL 'https://cloud.r-project.org/src/contrib/tripack_1.3-9.1.tar.gz'
Content type 'application/x-gzip' length 127697 bytes (124 KB)
downloaded 124 KB
[1] "C:/Users/Heather/AppData/Local/Temp/RtmpUZOSav/miniCRAN/src/contrib/tripack_1.3-9.1.tar.gz"
> makeRepo("tripack", pth, repos, type, filters = "license/restricts_use")
Warning in utils::download.packages(pkgs = pkgs, destdir = destdir, available = available, :
no package ‘tripack’ at the repositories
character(0)
> unlink(pth, recursive = TRUE)
{tripack} has been on CRAN since 1998, so is a reasonable test candidate, but of course it could disappear from CRAN so best to make any such test not run on CRAN.
pkgAvail()
has afilters
argument that is passed on toutils::available.packages()
L182. HowevermakeRepo()
callspkgAvail()
without this argument L62.This means that, unless the
available_packages_filters
option is set,makeRepo()
uses the default filters:c("R_version", "OS_type", "subarch", "duplicates")
. It would be helpful ifmakeRepo()
could take and pass on thefilters
argument.This issue came up when making a repo with binaries for different platforms: carpentriesoffline/offlinedatasci#135 - the
"subarch"
filter excluded packages compiled for different platforms. It is possible to work round this by setting theavailable_packages_filters
option, but enabling the argument inmakeRepo
would be more direct and consistent withpkgAvail()
.The text was updated successfully, but these errors were encountered: