Re: [Rd] Building Packages on Windows using .Rbuildignore (PR#7379)

From: <>
Date: Sat 20 Nov 2004 - 08:22:02 EST

On Thu, 18 Nov 2004 16:36:03 +0100 (CET), 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.

Duncan Murdoch mailing list Received on Sat Nov 20 08:32:21 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:01:38 EST