aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-07-30 09:23:29 -0700
committerAdam Vandenberg2010-07-30 09:23:44 -0700
commitb08950fd714d69907176504bf5f752bdcf1bf555 (patch)
treec9cae6e2d51a0f5bf28d89d9c3a03c19f06624c0 /Library
parentd9a6e4a23f6c462abd1cc80e6c1e14bb2cb0207f (diff)
downloadhomebrew-b08950fd714d69907176504bf5f752bdcf1bf555.tar.bz2
brew doctor - check man access
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew_doctor.rb21
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