-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Artifactory generates PACKAGES files with the unfortunate combination of windows newlines an empty blank line at the end. The latter likely for compatibility with debian Packages files (RTFACT-12881). It seems unlikely that we could get Artifactory to change this behavior in a reasonable amount of time. If the PACKAGES file does not use windows newlines or if it does use windows newlines and there is not a blank line at the end the file is parsed as expected.
Unfortunately currently pkgcache does not parse these files with both windows newlines and a trailing blank line properly and after dd5a590 now throws errors in this case instead of a warning.
Would it be possible for pkgcache to handle this case?
You can reproduce the issue without needing access to an Artifactory instance with
lines <- readLines("http://cloud.r-project.org/src/contrib/PACKAGES")
writeLines(c(lines, ""), "PACKAGES", sep = "\r\n")
pkgcache::parse_packages("PACKAGES")
#> Error in pkgcache::parse_packages("PACKAGES") :
#> PACKAGES file ended while parsing a key @lib.c:481 (pkgcache_parse_packages_raw)