[R-SIG-Mac] CRAN installer for macOS - directory permissions

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Tue May 3 10:50:03 CEST 2022

Just one more comment below.

On 03/05/2022 2:52 a.m., Patrick Schratz wrote:
>     I'd really rather have just one library on my system. In special
>     circumstances I sometimes want to have two different versions of a
>     package installed, and then I need an extra library, but normally I
>     want just one, because it reduces confusion and prevents errors that
>     can in the worst case be catastrophic. (An example is given down below.)
> I think we should distinguish here between “what one wants personally” 
> and “how R works on most systems” and “why a user library exists in the 
> first place”.
> Both Windows and Linux don’t allow “normal users” to write into the 
> system lib and require a user library (which to me is the right approach).
> -> Aligning macOS to this state would simplify things for users.
> Also user libraries are a quite common thing across many languages. R is 
> a bit special here in that it ships much of it “default” functionality 
> split in “base” and “recommended” packages of which some are mainly 
> there for historic reasons (arguably).
> I really don’t think that everything should be in one library, simply 
> for the fact that users can easily destroy the system-wide installation 
> by this.
>     Users *should* interact with recommended packages. As I said before,
>     recommended packages are contributed packages, and they can be
>     updated between R releases. If they are updated, in normal
>     circumstances users *should* update the default copy. If your
>     proposal makes this harder, then that's a strong negative in my opinion.
> I didn’t say they should not. But they should install updated 
> recommended packages into the user lib. Updated versions of rec. pkgs in 
> there will be take precedence when loading. This is how things are 
> working on Win and Linux since ever (?).
> Why would users need to update the default copy in the system lib?

It prevents easily made errors.

Let's pretend a contributed package (e.g. a recommended package) in the 
system lib has a newly discovered bug, and I update it with the fix, 
then a little while later accidentally remove it.

Two scenarios:

1.  I have a user lib and a system lib.  In this case, the fix would 
have gone into my user lib, and that's where the delete would happen 
too.  When I try to use the package, I'd get no warning that I'm using 
the buggy copy from the system lib, I'll just get incorrect results.

2.  I do everything in the system lib.  The fix went there, and the 
deletion happened there.  When I try to use the package, I'll get

   Error in library(foobar) : there is no package called ‘foobar’

and I'll realize I need to reinstall it.

I prefer scenario 2.  If I'm going to make mistakes, I want to know 
about them.  If I am updating buggy software, I want it to be harder to 
keep the old version than to replace it.

Duncan Murdoch

More information about the R-SIG-Mac mailing list