From c@@rdi@g@bor @ending from gm@il@com  Tue May  1 14:05:32 2018
From: c@@rdi@g@bor @ending from gm@il@com (=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=)
Date: Tue, 01 May 2018 12:05:32 +0000
Subject: [Rd] possible internal (un)tar bug
Message-ID: <CABtg=K=OBTOPAwKjcb2ACHNZ1cNt8MAdwzN+F2Nn23RXetpeRg@mail.gmail.com>

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




[Rd] possible internal (un)tar bug
=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=