[Rd] R 2.13.0-beta for Windows, file.copy() throws suspicious errors due to default value of copy.mode

From: Sharpie <chuck_at_sharpsteen.net>
Date: Thu, 07 Apr 2011 13:59:02 -0700 (PDT)


While checking packages against R 2.13.0-beta on Windows, I have run into a few strange error messages related to copying files. The errors all relate to file.copy() and have the form of:

Error in Sys.chmod(to[okay], file.info(from[okay])$mode, TRUE) :   'mode' must be of length at least one

After half a day of tinkering, the best reproducible example I can come up with involves using Roxygen to generate man files for the tikzDevice:

# Install roxygen from CRAN and grab tikzDevice source code R --vanilla --slave -e "install.packages('roxygen')" git clone git://github.com/Sharpie/RTikZDevice.git

# Generate documentation, first run succeeds: R --vanilla --slave -e "require(roxygen); roxygenize('RTikZDevice',
'RTikZDevice.build', overwrite = TRUE)"

Loading required package: roxygen
Loading required package: digest
Writing anyMultibyteUTF8Characters to
RTikZDevice.copy/man/anyMultibyteUTF8Characters.Rd Warning in parse.name(partitum) :
  No name found for the following expression in RTikZDevice/R/cacheMetrics.R line 3:
  `NULL . . .'
Writing queryMetricsDictionary to
RTikZDevice.copy/man/queryMetricsDictionary.Rd ...
Writing namespace directives to RTikZDevice.copy/NAMESPACE Merging collate directive with RTikZDevice/DESCRIPTION to RTikZDevice.copy/DESCRIPTION

# Try running it again, and it bombs:
R --vanilla --slave -e "require(roxygen); roxygenize('RTikZDevice',
'RTikZDevice.build', overwrite = TRUE)"

Loading required package: roxygen
Loading required package: digest
Error in Sys.chmod(to[okay], file.info(from[okay])$mode, TRUE) :   'mode' must be of length at least one
Calls: roxygenize -> copy.dir -> file.copy -> Sys.chmod In addition: Warning message:
In file.create(to[okay]) :
  cannot create file
'RTikZDevice.copy/.git/objects/pack/pack-cc0dd1e2622e87f86f8c5a8e617fbf77e253cea1.idx',
reason 'Permission denied'
Execution halted

If I replace all calls to file.copy(...) in the roxygen package with file.copy(..., copy.mode = FALSE) and reinstall it, then I can regenerate package documentation all day long without errors. I also get no errors when I perform the same task with R 2.12.2 on Windows or R 2.13.0-beta on OS X and Linux.

Maybe roxygenize() is abusing file.copy() somehow, but I find the "'mode' must be of length at least one" error suspicious.

Any ideas?

Using:
Windows 7 x86_64
R 2.13.0-beta
Rtools 2.13

-Charlie



Charlie Sharpsteen
Undergraduate-- Environmental Resources Engineering Humboldt State University
--
View this message in context: http://r.789695.n4.nabble.com/R-2-13-0-beta-for-Windows-file-copy-throws-suspicious-errors-due-to-default-value-of-copy-mode-tp3434559p3434559.html
Sent from the R devel mailing list archive at Nabble.com.

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu 07 Apr 2011 - 21:06:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 23 Apr 2011 - 20:00:52 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive