Skip to content

hidden files and directories

14 messages · Rohmatul Fajriyah, David Winsemius, Brian Ripley +3 more

#
On Aug 5, 2013, at 5:00 PM, Rohmatul Fajriyah wrote:

            
Those files would both be invisible when using the Finder.app unless you used ls in a terminal session, but I guess you figured that out
In 2008 it was reported in the NEWS for R 2.7.1 that:

http://markmail.org/search/?q=list%3Aorg.r-project.r-help+DS_Store#query:list%3Aorg.r-project.r-help%20DS_Store+page:1+mid:cx3hryqssis2slx7+state:results

o R CMD build tries harder to clean up the inst/doc directory from the remnants of earlier builds.

It also removes any directories with extension .Rcheck, and files .DS_Store and ._* (created by tar on Mac OS X under some circumstances: it now sets environment variables to ask for such files not to be created by that tar.)

So we need to ask if this was just a warning message. It appears that there are mechanisms in place to remove those files.

(It's arguably an R-devel topic.)
#
On 06/08/2013 01:16, David Winsemius wrote:
invisible *by default*: it is a Finder setting.
It seems the OP did not use R CMD build, rather R CMD check.

But files like man/.Rapp.history will need to be removed manually.
#
On 06/08/2013 08:41, Rohmatul Fajriyah wrote:
You are supposed to check the tarball produced by R CMD build ....

  
    
#
On Aug 6, 2013, at 08:06 , Prof Brian Ripley wrote:

            
They're trying their damndest to hide it, though. It's only settable by "defaults write ..." in a Terminal. (And if you know how to do that, you might as well be using "ls".)
#
On Aug 6, 2013, at 16:59 , Rohmatul Fajriyah wrote:

            
You can do it with rm in a terminal, but as I understand it, .DS_store files are created _by_ Finder, so it is a bit of a fight against windmills. It'll be there again next time you view the directory. 

The key is to do what Kasper said. Exactly what he said, not what you think he meant to say! I.e., 

 R CMD build pkgName
 R CMD check pkgName_X_Y_Z.tar.gz

I.e., do not install, build and run check on the .tar.gz file. R CMD build should take care of skipping the .DS_store files.

  
    
#
You should be running R CMD check on the package *tarball*, not on the source folder tree. So:

  R CMD check pkgName_X.1.tar.gz

or perhaps:

  R CMD check --as-cran pkgName_X.1.tar.gz

after running:

  R CMD build pkgName

to create the source tarball.

The output regarding the .DS_Store files is a NOTE regarding the package folder tree, not on the tarball contents and is not a warning or an error. Don't worry about .DS_Store or other version control system files (eg. for SVN or Git) as they will be ignored when building the package tarball, as R excludes them by default.

Other hidden files however, may be problematic, so you should avoid explicitly creating them, just as you should remove other non-essential files that may have been created by editors, GUIs, etc. that should not be part of the source package content.

More generally, don't worry about the .DS_Store files on OSX. They contain metadata that is useful for Finder and are arguably an annoyance, but that's about it. There are parallel files on other OS's as well.

Regards,

Marc Schwartz
On Aug 6, 2013, at 9:59 AM, Rohmatul Fajriyah <rfajriyah at yahoo.com> wrote: