This is a not too old R-devel on Linux, it already fails in R 3.4.4, and on
macOS as well.

The tar file seems valid, external tar can untar it, so maybe an untar()
bug.

setwd(tempdir())
dir.create("pkg")
cat("foobar\n",  file = file.path("pkg", "NAMESPACE"))
cat("this: that\n", file = file.path("pkg", "DESCRIPTION"))

tar("pkg_1.0.tar.gz", "pkg", compression = "gzip", tar = "internal")
unlink("pkg", recursive = TRUE)

con <- file("pkg_1.0.tar.gz", open = "rb")
ex <- tempfile()
untar(con, files = "pkg/DESCRIPTION", exdir = ex)

#> Error in untar2(tarfile, files, list, exdir, restore_times) :
#>   incomplete block on file

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to