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

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

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
Package: Rpacman Package: Rpacman
Type: Package Type: Package
Title: Very simple package manager for R Title: Very simple package manager for R
Version: 1.0.12 Version: 1.0.13
Date: 2022-05-31 Date: 2022-05-31
Authors@R: person("Craig", "Williams", email = "craig@avsdev.uk", role = c("aut", "cre")) Authors@R: person("Craig", "Williams", email = "craig@avsdev.uk", role = c("aut", "cre"))
URL: https://avsdev.uk/R/Rpacman URL: https://avsdev.uk/R/Rpacman
+3
View File
@@ -11,6 +11,9 @@
packageVersions <- gsub("^([^/]+)/[^_]+_(.+).tar.gz", "\\1%%\\2", rownames(pkg)) packageVersions <- gsub("^([^/]+)/[^_]+_(.+).tar.gz", "\\1%%\\2", rownames(pkg))
packageVersions <- strsplit(packageVersions, "%%") packageVersions <- strsplit(packageVersions, "%%")
packageVersions <- do.call(rbind, packageVersions) packageVersions <- do.call(rbind, packageVersions)
if (is.null(packageVersions)) {
return(NULL)
}
pkg[,c("package","version")] <- packageVersions pkg[,c("package","version")] <- packageVersions
sortOrder <- sort(pkg$version, index.return = TRUE)$ix sortOrder <- sort(pkg$version, index.return = TRUE)$ix
pkg[sortOrder,c("package", "version")] pkg[sortOrder,c("package", "version")]