diff options
| author | Adam Vandenberg | 2010-07-30 09:23:29 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-07-30 09:23:44 -0700 |
| commit | bc82bfc6d5d6509591b675b727712b7cc9559815 (patch) | |
| tree | c8ee3d00ac3b6f86728ffa2426160007987ed5b5 /Library | |
| parent | 37ea70ed5e0cb14ce228dc5f90e7791042678f01 (diff) | |
| download | brew-bc82bfc6d5d6509591b675b727712b7cc9559815.tar.bz2 | |
brew doctor - check man access
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/brew_doctor.rb | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb index 002243938..d41ea95d4 100644 --- a/Library/Homebrew/brew_doctor.rb +++ b/Library/Homebrew/brew_doctor.rb @@ -125,15 +125,13 @@ def check_gcc_versions end end -def check_access_share_locale - # If PREFIX/share/locale already exists, "sudo make install" of - # non-brew installed software may cause installation failures. - locale = HOMEBREW_PREFIX+'share/locale' - return unless locale.exist? +def __check_subdir_access base + target = HOMEBREW_PREFIX+base + return unless target.exist? cant_read = [] - locale.find do |d| + target.find do |d| next unless d.directory? cant_read << d unless d.writable? end @@ -141,7 +139,7 @@ def check_access_share_locale cant_read.sort! if cant_read.length > 0 puts <<-EOS.undent - Some folders in #{locale} aren't writable. + Some folders in #{target} aren't writable. This can happen if you "sudo make install" software that isn't managed by Homebrew. If a brew tries to add locale information to one of these folders, then the install will fail during the link step. @@ -153,6 +151,14 @@ def check_access_share_locale end end +def check_access_share_locale + __check_subdir_access 'share/locale' +end + +def check_access_share_man + __check_subdir_access 'share/man' +end + def check_access_pkgconfig # If PREFIX/lib/pkgconfig already exists, "sudo make install" of # non-brew installed software may cause installation failures. @@ -427,6 +433,7 @@ def brew_doctor check_for_x11 check_for_nonstandard_x11 check_access_share_locale + check_access_share_man check_user_path check_which_pkg_config check_pkg_config_paths |
