[R-SIG-Mac] Does R CMD check create invisible files?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Dec 16 17:08:14 CET 2016
On 16/12/2016 11:44, cstrato wrote:
> Dear all,
>
> On my Mac running Yosemite I zip my package:
>
> $ tar czf xps_1.35.1.tar.gz xps
>
> The directoy 'xps' does not contain any hidden files!
>
> However, when I run:
>
> $ R CMD check xps_1.35.1.tar.gz
>
> I get:
> ...
> * checking for hidden files and directories ... NOTE
> Found the following hidden files and directories:
> .BBSoptions
> ._.BBSoptions
> ._ACKNOWLEDGMENT
> ._DESCRIPTION
> ...
> etc
>
> When I unzip my package using:
>
> $ tar xvfz xps_1.35.1.tar.gz xps
>
> there are still no hidden files!
>
>
> However, the src directory created by R CMD check, i.e.
>
> CS-iMac:CRAN cstrato$ cd xps.Rcheck/00_pkg_src/xps/
> CS-iMac:xps cstrato$ ls -al
> total 504
> drwxr-xr-x 40 cstrato staff 1360 Dec 16 10:30 .
> drwxr-xr-x 4 cstrato staff 136 Dec 16 10:29 ..
> -rw-r--r-- 1 cstrato staff 26 Sep 30 23:33 .BBSoptions
> -rw-r--r-- 1 cstrato staff 181 Sep 30 23:33 ._.BBSoptions
> -rw-r--r-- 1 cstrato staff 181 Sep 30 23:33 ._ACKNOWLEDGMENT
> -rw-r--r-- 1 cstrato staff 181 Dec 16 10:20 ._DESCRIPTION
> -rw-r--r-- 1 cstrato staff 181 Dec 16 10:26 ._NAMESPACE
>
> does indeed contain hidden files from all my files!
>
>
> Can anybody explain this behavior and tell me how to avoid this behavior?
Those are fork files: the OS X tar differs from POSIX by treating Apple
forks in a non-POSIX-standard way, and *by default* R CMD check does not
use the OS's tar command (as ?check explains).
Do read and follow the documentation: use R CMD build not your OS's tar
to 'zip' (your incorrect terminology) a package. (Or read the source
code for tar() and note that it sets various environment variables on OS X.)
fortunes::fortune(14) really does apply.
>
> Here are my infos:
>
>> Sys.info()
> sysname
> "Darwin"
> release
> "14.5.0"
> version
> "Darwin Kernel Version 14.5.0: Sun Sep 25 22:07:15 PDT 2016;
> root:xnu-2782.50.9~1/RELEASE_X86_64"
> nodename
> "CS-iMac.local"
> machine
> "x86_64"
> login
> "_spotlight"
> user
> "cstrato"
> effective_user
> "cstrato"
>
>> sessionInfo()
> R version 3.3.2 (2016-10-31)
> Platform: x86_64-apple-darwin13.4.0 (64-bit)
> Running under: OS X Yosemite 10.10.5
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
>
> Thank you in advance
> Best regards,
> Christian
> _._._._._._._._._._._._._._._._._._
> C.h.r.i.s.t.i.a.n S.t.r.a.t.o.w.a
> V.i.e.n.n.a A.u.s.t.r.i.a
> e.m.a.i.l: cstrato at aon.at
> _._._._._._._._._._._._._._._._._._
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
More information about the R-SIG-Mac
mailing list