[Rd] corrupt PACKAGES.gz?

Uwe Ligges ligges at statistik.tu-dortmund.de
Sat Nov 7 09:24:44 CET 2015


Bill,

thanks for reporting, this is currently true for all PACKAGES.gz files 
my autobuilder is creating, will investigate.

Best,
Uwe


On 06.11.2015 18:54, William Dunlap wrote:
> Is it just me, or did a corrupt PACKAGES.gz file get installed in the
> bin/windows/contrib/3.2 directory of CRAN mirrors recently?  gzfile()
> complains about it and Cygwin's gzip cannot decompress it.  I tried the
> following
>
> repos <- "https://cran.rstudio.com"
> v <- "3.2"
> pkgs.gz <- paste(sep="/", repos, "bin/windows/contrib", v, "PACKAGES.gz")
>
> tfile <- tempfile(fileext=".gz")
> download.file(pkgs.gz, dest=tfile)
> r.gz <- readLines(gzfile(tfile, "r"))
> tail(system(paste("c:\\cygwin\\bin\\gzip -d - ", shQuote(tfile)),
> intern=TRUE))
>
> and got
>
>> repos <- "https://cran.rstudio.com"
>> v <- "3.2"
>> pkgs.gz <- paste(sep="/", repos, "bin/windows/contrib", v, "PACKAGES.gz")
>>
>> tfile <- tempfile(fileext=".gz")
>> download.file(pkgs.gz, dest=tfile)
> trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/PACKAGES.gz'
> Content type 'application/x-gzip' length 188174 bytes (183 KB)
> downloaded 183 KB
>
>> r.gz <- readLines(gzfile(tfile, "r"))
> Warning message:
> In readLines(gzfile(tfile, "r")) :
>    seek on a gzfile connection returned an internal error
>> tail(system(paste("c:\\cygwin\\bin\\gzip -d - ", shQuote(tfile)),
> intern=TRUE))
> [1] ""                                    "gzip: stdin: unexpected end of
> file"
> Warning message:
> running command 'c:\cygwin\bin\gzip -d -
>   "C:\Users\wdunlap\AppData\Local\Temp\RtmpG42jk4\file2a201a9e4802.gz"' had
> status 1
>
> R's gz code seems to recover from the bad seek, but Cygwin's gzip cannot.
>
>> pkgs <- paste(sep="/", repos, "bin/windows/contrib", v, "PACKAGES")
>> r <- readLines(url(pkgs, "rt"))
>> all.equal(r, r.gz)
> [1] TRUE
>
> I get the same results using the Spanish miror, https://ftp.cixug.es/CRAN
>
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list