[Rd] R 3.0.0: wrong MD5 checksums for Windows?

Henrik Bengtsson hb at biostat.ucsf.edu
Thu Apr 4 21:26:24 CEST 2013


On Thu, Apr 4, 2013 at 12:10 PM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
> On 04/04/2013 2:38 PM, Tal Galili wrote:
>>
>> Hello dear R-devel,
>>
>> When installing R 3.0.0 on Windows 7, and then running:
>>
>> require(tools)
>> checkMD5sums(dir=R.home())
>>
>> I get the following massage:
>> files ‘etc/Rconsole’, ‘etc/Rprofile.site’ have the wrong MD5
>> checksums
>> [1] FALSE
>
>
> Rprofile.site is likely to be changed when you install R. It's pretty easy
> to change Rconsole as well.
>
> So perhaps the bug is that we are running checksums on those at all.

Maybe this is what you just implied/said, but if the MD5 checksums are
calculated on files with '\n' line breaks (on the build server) and
then they are simply rewritten "as-is" upon installation (but with
'\n' translated to '\r\n').  This could happen if they are written
using cat() or writeLines(), which writes using text-mode connections
and therefore have all '\n' translated to '\r\n' on Windows, e.g. (on
Windows):

> cat("a\nb", file="foo.txt"); file.info("foo.txt")$size
[1] 4
> cat("a\rb", file="foo.txt"); file.info("foo.txt")$size
[1] 3
> cat("a\r\nb", file="foo.txt"); file.info("foo.txt")$size
[1] 5
> writeChar("a\nb", eos=NULL, con="foo.txt"); file.info("foo.txt")$size
[1] 3

I've been bitten by '\n' -> '\r\n' so many times (e.g. can cause
unnecessary SVN commits/updates).  Out of curiosity, as of 2013, are
there any good reasons for generating '\r\n' - what Windows software
does not handle '\n' these days?

/Henrik

>
> Duncan Murdoch
>
>>
>> This happens when using the 32 and the 64 bit version of R.
>> And was also reported by 2 other users on other machines, as can be seen
>> in
>> the comments to this post:
>>
>> http://www.r-statistics.com/2013/04/r-3-0-0-is-released-whats-new-and-how-to-upgrade/
>>
>> The R version was downloaded from this mirror:
>> http://cran.rstudio.com/bin/windows/base/
>> And installed on both the C and D drive on different computers (to
>> rule-out
>> any permission issues during installation).
>>
>>
>>
>> I hope I didn't miss anything,
>> Tal
>>
>> ----------------Contact
>> Details:-------------------------------------------------------
>> Contact me: Tal.Galili at gmail.com |
>> Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
>> www.r-statistics.com (English)
>>
>> ----------------------------------------------------------------------------------------------
>>
>>         [[alternative HTML version deleted]]
>>
>>
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list