From ggrothendieck at myway.com  Sat Nov 20 01:39:17 2004
From: ggrothendieck at myway.com (Gabor Grothendieck)
Date: Sat Nov 20 01:39:31 2004
Subject: [Rd] Building Packages on Windows using .Rbuildignore (PR#7379)
References: <20041119212202.83F221043D@slim.kubism.ku.dk>
Message-ID: <loom.20041120T012822-611@post.gmane.org>

 <murdoch <at> stats.uwo.ca> writes:

: 
: On Thu, 18 Nov 2004 16:36:03 +0100 (CET), murdoch <at> stats.uwo.ca wrote :
: 
: >>The reason that the processing is different according to whether one
: >>uses .Rbuildignore or not is that 
: >>  R CMD build 
: >>takes the .Rbuildignore file into account but 
: >>  R CMD install
: >>  R CMD check
: >>  R CMD build --binary 
: >>do not take .Rbuildignore into account.  
: >
: >Okay, now I understand.  I think I'd call the last of those a bug, and
: >it would seem to me that the install and check scripts should also
: >respect this directive.   I've now copied this to the r-bugs list.
: >(This was reported for Windows; I don't know if it applies to other
: >platforms as well.)
: 
: I've taken a look at the source now, and it appears that the intention
: is that R CMD check should respect the .Rbuildignore file, but (on my
: system) it's looking for it in the wrong place:  it looks in the
: parent of the package directory, not in the main package directory.
: That is, if I have a package in subdirectory test, then 
: 
: Rcmd build test
: 
: looks for test/.Rbuildignore as it should, but 
: 
: Rcmd check test
: 
: looks for .Rbuildignore.  The problem is in these lines of code:
: 
:     my $exclude_file = ".Rbuildignore";
:     ## This is a bit tricky for bundles where the build ignore pattern
:     ## file is in the top-level bundle dir.
:     $exclude_file = &file_path(dirname($pkgdir), $exclude_file);
: 
: In my test, $pkgdir was "d:/stuff/R/test", and $exclude_file ended up
: as "d:/stuff/R/.Rbuildignore".
: 
: Could someone on Unix confirm this behaviour?  I think the fix should
: be to change the last line to 
: 
:     $exclude_file = &file_path($pkgdir, $exclude_file);
: 
: but I don't want to mess things up on other platforms.
: 
: Even with this change, Rcmd check is still going to install the files
: it's supposed to ignore, because it uses Rcmd INSTALL, and there's no
: .Rbuildignore support there.
: 

If the behaviour is suddenly changed then this is going to cause work
for people whose scripts depend on the current behavior.  In order to
minimize disruption I would ask that such change only be made at the
same time that a flag for turning on and off .Rbuildignore processing
is implemented on build, check, install and build --binary.  Even
with such a flag it may require revision to scripts but at least
any change with the flag will be minimal.  Even better, it may
mean some scripts can be eliminated.


[Rd] Building Packages on Windows using .Rbuildignore (PR#7379)
Gabor Grothendieck