Dear all, quite a few package tools depend on R CMD INSTALL today for rapid testing of a package, eg: - devtools::install() - BiocCheck::BiocCheck() I've noticed that at least BiocCheck() doesn't ignore version control folders like .git. Trying to find out why this was, lead me to R CMD INSTALL. I know this R CMD build ignores these files and folders by default, but R CMD INSTALL doesn't apparently. Is there a way to tell R CMD INSTALL to ignore at least the .git folder, or are there plans to add this the R CMD INSTALL? And if so, where do I file the request best? Cheers Joris -- Joris Meys Statistical consultant Department of Data Analysis and Mathematical Modelling Ghent University Coupure Links 653, B-9000 Gent (Belgium) <https://maps.google.com/?q=Coupure+links+653,%C2%A0B-9000+Gent,%C2%A0Belgium&entry=gmail&source=g> ----------- Biowiskundedagen 2017-2018 http://www.biowiskundedagen.ugent.be/ ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php [[alternative HTML version deleted]]
Dirk Eddelbuettel
2018-Dec-06 14:37 UTC
[Rd] Dealing with .git folder when using R CMD INSTALL
On 6 December 2018 at 15:19, Joris Meys wrote: | Dear all, | | quite a few package tools depend on R CMD INSTALL today for rapid testing | of a package, eg: | | - devtools::install() | - BiocCheck::BiocCheck() | | I've noticed that at least BiocCheck() doesn't ignore version control | folders like .git. Trying to find out why this was, lead me to R CMD | INSTALL. | | I know this R CMD build ignores these files and folders by default, but R | CMD INSTALL doesn't apparently. Is there a way to tell R CMD INSTALL to | ignore at least the .git folder, or are there plans to add this the R CMD | INSTALL? And if so, where do I file the request best? Are you sure? Eg from src/library/tools/R/utils.R: ## Version control directory names: CVS, .svn (Subversion), .arch-ids ## (arch), .bzr, .git, .hg (mercurial) and _darcs (Darcs) ## And it seems .metadata (eclipse) is in the same category. .vc_dir_names <- c("CVS", ".svn", ".arch-ids", ".bzr", ".git", ".hg", "_darcs", ".metadata") ## and RE version (beware of the need for escapes if amending) .vc_dir_names_re <- "/(CVS|\\.svn|\\.arch-ids|\\.bzr|\\.git|\\.hg|_darcs|\\.metadata)(/|$)" (and many more similar places in the sources) These have been auto-ignored by R CMD build for a loooooong time. Are you maybe making the mistake of installing from a _directory_ as opposed to first creating a tarball? Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
On Thu, 6 Dec 2018, 15:37 Dirk Eddelbuettel <edd at debian.org wrote:> > > These have been auto-ignored by R CMD build for a loooooong time. Are you > maybe making the mistake of installing from a _directory_ as opposed to > first > creating a tarball? > > Dirk > > -- > http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.orgThat's indeed what devtools::install () and BiocCheck () are doing, and I wondered if R CMD INSTALL could be made to ignore at least those. Thx for the confirmation Cheers Joris [[alternative HTML version deleted]]
On 06.12.18 15:19, Joris Meys wrote:> I know this R CMD build ignores these files and folders by default, but R > CMD INSTALL doesn't apparently.to me this is not apparent. I just tried "R CMD INSTALL ." in a package directory with a .git directory. This went without any problems. What do you observe? cheerio ralf -- Ralf Stubner Senior Software Engineer / Trainer daqana GmbH Dortustra?e 48 14467 Potsdam T: +49 331 23 61 93 11 F: +49 331 23 61 93 90 M: +49 162 20 91 196 Mail: ralf.stubner at daqana.com Sitz: Potsdam Register: AG Potsdam HRB 27966 Ust.-IdNr.: DE300072622 Gesch?ftsf?hrer: Dr.-Ing. Stefan Knirsch, Prof. Dr. Dr. Karl-Kuno Kunze -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20181206/ace28937/attachment.sig>
On Thu, 6 Dec 2018, 16:04 Ralf Stubner <ralf.stubner at daqana.com wrote:> On 06.12.18 15:19, Joris Meys wrote: > > I know this R CMD build ignores these files and folders by default, but R > > CMD INSTALL doesn't apparently. > > to me this is not apparent. I just tried "R CMD INSTALL ." in a package > directory with a .git directory. This went without any problems. What do > you observe? >When running BiocCheck, I get complaints about file sizes in the .git folder. Checking the code I have noticed it uses R CMD INSTALL on the pkg directory. As .Rbuildignore is afaik not taken into account by INSTALL, I reckoned somewhere in the process R CMD INSTALL drags the .git folder along. I might have been too quick with my assessment, I will dig a bit deeper tonight Cheers Joris> > cheerio > ralf > > -- > Ralf Stubner > Senior Software Engineer / Trainer > > daqana GmbH > Dortustra?e 48 > 14467 Potsdam > > T: +49 331 23 61 93 11 > F: +49 331 23 61 93 90 > M: +49 162 20 91 196 > Mail: ralf.stubner at daqana.com > > Sitz: Potsdam > Register: AG Potsdam HRB 27966 > Ust.-IdNr.: DE300072622 > Gesch?ftsf?hrer: Dr.-Ing. Stefan Knirsch, Prof. Dr. Dr. Karl-Kuno Kunze > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >[[alternative HTML version deleted]]
Dirk Eddelbuettel
2018-Dec-06 15:13 UTC
[Rd] Dealing with .git folder when using R CMD INSTALL
On 6 December 2018 at 15:59, Ralf Stubner wrote: | On 06.12.18 15:19, Joris Meys wrote: | > I know this R CMD build ignores these files and folders by default, but R | > CMD INSTALL doesn't apparently. | | to me this is not apparent. I just tried "R CMD INSTALL ." in a package | directory with a .git directory. This went without any problems. What do | you observe? Seconded. I joked off-list to Joris that this post failed to contain a MCVE (== minimally complete verifiable example). Witness below -- two installations from a directory containing .git yet none in the installed directory. Could what you describe be particular to your OS or filesystem? edd at rob:~/git/dang$ ls -a . dang_0.0.7.tar.gz dang.Rproj .gitignore R .Rhistory .. dang_0.0.8.tar.gz DESCRIPTION man .Rbuildignore .Rproj.user ChangeLog dang.Rcheck .git NAMESPACE README.md .travis.yml edd at rob:~/git/dang$ R CMD INSTALL . * installing to library ?/usr/local/lib/R/site-library? * installing *source* package ?dang? ... ** R ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (dang) edd at rob:~/git/dang$ ls -a /usr/local/lib/R/site-library/dang/ . .. DESCRIPTION help html INDEX Meta NAMESPACE R edd at rob:~/git/dang$ install.r * installing *source* package found in current working directory ... * installing *source* package ?dang? ... ** R ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (dang) edd at rob:~/git/dang$ ls -a /usr/local/lib/R/site-library/dang/ . .. DESCRIPTION help html INDEX Meta NAMESPACE R edd at rob:~/git/dang$ Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org