librelist archives

« back to archive

Changing the "writable?" test, or making it optional?

Changing the "writable?" test, or making it optional?

From:
Adam Vandenberg
Date:
2011-03-27 @ 20:04
Before doing an install, Homebrew checks that the PREFIX and CELLAR
are writable locations.
This typically means, check that the current user (that brew is
running as) has permission to write to these folders (which may be
root owned.)

Homebrew doesn't actually write into the "PREFIX" folder, though, it
only writes into subfolders of the PREFIX folder (during the linking
step.)

Homebrew only writes symlinks (or creates real subfolders) into the
the folders listed in keg.rb, function "link".

Thus, our writability check is a shortcut.
There are two issues open about this:
* https://github.com/mxcl/homebrew/issues/issue/4544
* https://github.com/mxcl/homebrew/issues/issue/3930

So, should Homebrew do a more strict writability test, or provide a
HOMEBREW_ option to ignore the check?

Semi-relatedly, on install, should Homebrew chown "var/log" specifically?
* https://github.com/mxcl/homebrew/issues/issue/3960