[Rd] install.packages("C", dep=TRUE) does not always install indirect dependencies

Duncan Murdoch murdoch at stats.uwo.ca
Fri Jun 9 20:03:35 CEST 2006


On 6/9/2006 1:47 PM, Herve Pages wrote:
> Duncan Murdoch wrote:
>> On 6/8/2006 3:31 PM, Herve Pages wrote:
>>> May be this is the desired behavior, I don't know. Personally, I would
>>> think of 'install.packages("C", dep=TRUE)' as a reliable way to get 
>>> every
>>> packages that C directly or indirectly relies on installed.
>>
>> This seems rather unreasonable.  If a user asked not to install B's 
>> dependencies, and A is not listed as a dependency of C, then I don't 
>> think a request to install C and its dependencies should install A.
> 
> Hi Duncan,
> 
> Maybe the user didn't _ask_ not to install B's deps. Maybe he simply 
> made a mistake
> (which is easy with 'dep=FALSE' being the default), or maybe this is a 
> shared system and
> someone else installed B without 'dep=TRUE' or removed A or...

Right, those are all possibilities.  But they can all be repaired by 
manually installing A, can't they?  Does the error message make clear 
that the problem is a lack of A?

> But I realize that there would be a significant extra cost if 
> 'install.packages("C", dep=TRUE)'
> had to check the whole deps tree instead of just checking whether only 
> the packages listed
> in C's Depends field are already installed (especially when those 
> packages _are_ already
> installed).
> So if checking the whole deps tree can't be done everytime 
> 'install.packages(..., dep=TRUE)'
> is used then may be it could be done on demand e.g. with something 
> similar to what
> "rpm -Va --nofiles" does on a Linux system (this checks the entire 
> system for missing deps).
> 
>> Perhaps the installation of B without dependencies was a mistake?  I 
>> think an argument could be made that dependencies=TRUE should be the 
>> default (as it is when using the corresponding menu item in the 
>> Windows GUI).
> Yes having 'dependencies=TRUE' as the default would definetly help the
> user to keep a system where all deps are satisfied.

I don't know the logic behind the "dependencies=FALSE" default, and I'm 
reluctant to change defaults on platforms I don't use.  Since this is 
really only an inconvenience, I think you'll have to find an R Core 
member who actually uses your platform to deal with it.

Duncan Murdoch



More information about the R-devel mailing list