- changed title to install_dep.R finds two versions of alakazam, warns version could not be detected then test server set up fails
install_dep.R finds two versions of alakazam, warns version could not be detected then test server set up fails
Issue #30
resolved
@Jason Vander Heiden This affects shazam
and packages that use installDep.R
. Not sure what we can easily do. Probably the problem will disappear when we fix the bugs and submit the brown bags.
installDep uses the package versions to find the version of alakazam and shazam to install.
versions::available.versions calls current.versions, which finds two available versions of alakazam submitted the same day:
> tarballs[idx]
[1] "alakazam_0.2.11.tar.gz" "alakazam_0.3.0.tar.gz"
So it ends returning nothing. This is current.versions
. length(idx)
is 2.
function (pkg)
{
current_url <- sprintf("%s/src/contrib", versions:::latest.MRAN())
lines <- versions:::url.lines(current_url)
lines <- lines[grep("^<a href=\"*", lines)]
tarballs <- gsub(".*href=\"([^\"]+)\".*", "\\1", lines)
dates <- gsub(".* ([0-9]+-[a-zA-Z]+-[0-9]+) .*", "\\1",
lines)
dates <- as.Date(dates, format = "%d-%b-%Y")
idx <- grep(sprintf("^%s_.*.tar.gz$", pkg), tarballs)
if (length(idx) == 1) {
versions <- tarballs[idx]
versions <- gsub(sprintf("^%s_", pkg), "", versions)
versions <- gsub(".tar.gz$", "", versions)
dates <- dates[idx]
}
else {
warning(sprintf("The current version and publication date of %s could not\n be detected",
pkg))
versions <- dates <- NA
}
df <- data.frame(version = versions, date = as.character(dates),
stringsAsFactors = FALSE)
return(df)
}
Comments (5)
-
reporter -
reporter - edited description
-
reporter - edited description
-
I suspect this is just a problem with CRAN mirrors being out of sync. Let’s wait a couple days and see.
-
reporter - changed status to resolved
- Log in to comment