Update to fix packages without any archive version which are still referenced in the archives file

This commit is contained in:
2024-11-13 10:23:31 +00:00
parent 42ca437a08
commit 8773ddb195
2 changed files with 4 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
Package: Rpacman
Type: Package
Title: Very simple package manager for R
Version: 1.0.12
Version: 1.0.13
Date: 2022-05-31
Authors@R: person("Craig", "Williams", email = "craig@avsdev.uk", role = c("aut", "cre"))
URL: https://avsdev.uk/R/Rpacman

View File

@@ -11,6 +11,9 @@
packageVersions <- gsub("^([^/]+)/[^_]+_(.+).tar.gz", "\\1%%\\2", rownames(pkg))
packageVersions <- strsplit(packageVersions, "%%")
packageVersions <- do.call(rbind, packageVersions)
if (is.null(packageVersions)) {
return(NULL)
}
pkg[,c("package","version")] <- packageVersions
sortOrder <- sort(pkg$version, index.return = TRUE)$ix
pkg[sortOrder,c("package", "version")]