goodrich at fas.harvard.edu
2008-Jan-23 18:45 UTC
[Rd] [wishlist, patch] Removing .bzr/ directory when calling R CMD build (PR#10625)
Full_Name: Ben Goodrich Version: 2.6.1 OS: Debian Submission from: (NULL) (128.103.222.166) bzr is another version control system and adds a .bzr folder to the top-level directory of a package, similar to .svn and .git for subversion and git respectively. However, while R CMD build removes directories called .svn, .git, and some others, it does not remove .bzr . As a result, the .bzr folder is unnecessarily included in the cleanly built package and there are accurate but unnecessary warnings that say certain subdirectories of the .bzr directory are empty. I believe the following patch, which is lightly tested with R-devel, is sufficient to remove the .bzr folder and prevent these warnings. It does not, however, remove the .bzrignore file (if it exists) but perhaps it should be augmented to do so. --- src/scripts/build.in 2008-01-23 11:42:47.000000000 -0500 +++ build.in 2008-01-23 11:45:02.000000000 -0500 @@ -215,6 +215,7 @@ print EXCLUDE "$File::Find::name\n" if(-d $_ && /^\.svn$/); print EXCLUDE "$File::Find::name\n" if(-d $_ && /^\.arch-ids$/); print EXCLUDE "$File::Find::name\n" if(-d $_ && /^\.git$/); + print EXCLUDE "$File::Find::name\n" if(-d $_ && /^\.bzr$/); ## Windows DLL resource file push(@exclude_patterns, "^src/" . $pkgname . "_res\\.rc"); my $filename = $File::Find::name;
Gabor Grothendieck
2008-Jan-23 19:21 UTC
[Rd] [wishlist, patch] Removing .bzr/ directory when calling R CMD build (PR#10625)
If you place an .Rbuildignore file in the top level of your package with this line single line as its contents: [.]bzr$ then the .bzr file will not be included. On Jan 23, 2008 1:45 PM, <goodrich at fas.harvard.edu> wrote:> Full_Name: Ben Goodrich > Version: 2.6.1 > OS: Debian > Submission from: (NULL) (128.103.222.166) > > > bzr is another version control system and adds a .bzr folder to the top-level > directory of a package, similar to .svn and .git for subversion and git > respectively. However, while R CMD build removes directories called .svn, .git, > and some others, it does not remove .bzr . As a result, the .bzr folder is > unnecessarily included in the cleanly built package and there are accurate but > unnecessary warnings that say certain subdirectories of the .bzr directory are > empty. I believe the following patch, which is lightly tested with R-devel, is > sufficient to remove the .bzr folder and prevent these warnings. It does not, > however, remove the .bzrignore file (if it exists) but perhaps it should be > augmented to do so. > > --- src/scripts/build.in 2008-01-23 11:42:47.000000000 -0500 > +++ build.in 2008-01-23 11:45:02.000000000 -0500 > @@ -215,6 +215,7 @@ > print EXCLUDE "$File::Find::name\n" if(-d $_ && /^\.svn$/); > print EXCLUDE "$File::Find::name\n" if(-d $_ && /^\.arch-ids$/); > print EXCLUDE "$File::Find::name\n" if(-d $_ && /^\.git$/); > + print EXCLUDE "$File::Find::name\n" if(-d $_ && /^\.bzr$/); > ## Windows DLL resource file > push(@exclude_patterns, "^src/" . $pkgname . "_res\\.rc"); > my $filename = $File::Find::name; > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >
Ben Goodrich
2008-Jan-23 19:23 UTC
[Rd] [wishlist, patch] Removing .bzr/ directory when calling R CMD build (PR#10625)
Gabor Grothendieck wrote:> If you place an .Rbuildignore file in the top level of > your package with this line single line as its contents: > > [.]bzr$ > > then the .bzr file will not be included.Thank you for the suggestion. In order to remove both the .bzr/ directory and the .bzrignore file, it seems to be necessary to specify [.]bzr$ [.]bzrignore in the .Rbuildignore file before calling R CMD build. This is certainly sufficient in my case, but since the patch is just one line, perhaps it should be considered for inclusion as well. Ben
Gabor Grothendieck
2008-Jan-23 19:39 UTC
[Rd] [wishlist, patch] Removing .bzr/ directory when calling R CMD build (PR#10625)
On Jan 23, 2008 2:23 PM, Ben Goodrich <goodrich at fas.harvard.edu> wrote:> Gabor Grothendieck wrote: > > If you place an .Rbuildignore file in the top level of > > your package with this line single line as its contents: > > > > [.]bzr$ > > > > then the .bzr file will not be included. > > Thank you for the suggestion. In order to remove both the .bzr/ > directory and the .bzrignore file, it seems to be necessary to specify > > [.]bzr$ > [.]bzrignoreor perhaps [.]bzr.*
Apparently Analagous Threads
- [LLVMdev] About setting up official git & bzr mirrors.
- [LLVMdev] About setting up official git & bzr mirrors.
- dos-style line endings in .Rbuildignore result in files not being excluded
- [LLVMdev] About setting up official git & bzr mirrors.
- no backup for excluded files?