Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
3fcacb04
Commit
3fcacb04
authored
14 years ago
by
Adam Vandenberg
Browse files
Options
Downloads
Patches
Plain Diff
brew doctor - also check permisisons on share
parent
89720e1d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/cmd/doctor.rb
+29
-40
29 additions, 40 deletions
Library/Homebrew/cmd/doctor.rb
with
29 additions
and
40 deletions
Library/Homebrew/cmd/doctor.rb
+
29
−
40
View file @
3fcacb04
...
...
@@ -170,58 +170,46 @@ 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.
pkgconfig
=
HOMEBREW_PREFIX
+
'lib/pkgconfig'
return
unless
pkgconfig
.
exist?
def
__check_folder_access
base
,
msg
folder
=
HOMEBREW_PREFIX
+
base
return
unless
folder
.
exist?
unless
pkgconfig
.
writable?
unless
folder
.
writable?
puts
<<-
EOS
.
undent
#{
pkgconfig
}
isn't writable.
#{
folder
}
isn't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to write a .pc file to this folder, the
install will fail during the link step.
by Homebrew.
#{
msg
}
You should probably `chown`
#{
pkgconfig
}
You should probably `chown`
#{
folder
}
EOS
end
end
def
check_access_include
# Installing MySQL manually (for instance) can chown include to root.
include_folder
=
HOMEBREW_PREFIX
+
'include'
return
unless
include_folder
.
exist?
unless
include_folder
.
writable?
puts
<<-
EOS
.
undent
#{
include_folder
}
isn't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to write a header file to this folder, the
install will fail during the link step.
You should probably `chown`
#{
include_folder
}
def
check_access_pkgconfig
__check_folder_access
'lib/pkgconfig'
,
'If a brew tries to write a .pc file to this folder, the install will\n'
+
'fail during the link step.'
end
EOS
end
def
check_access_include
__check_folder_access
'include'
,
'If a brew tries to write a header file to this folder, the install will\n'
+
'fail during the link step.'
end
def
check_access_etc
etc_folder
=
HOMEBREW_PREFIX
+
'etc'
return
unless
etc_folder
.
exist?
unless
etc_folder
.
writable?
puts
<<-
EOS
.
undent
#{
etc_folder
}
isn't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to write a file to this folder, the install
will fail during the link step.
You should probably `chown`
#{
etc_folder
}
__check_folder_access
'etc'
,
'If a brew tries to write a file to this folder, the install will\n'
+
'fail during the link step.'
end
EOS
end
def
check_access_share
__check_folder_access
'share'
,
'If a brew tries to write a file to this folder, the install will\n'
+
'fail during the link step.'
end
def
check_usr_bin_ruby
...
...
@@ -598,10 +586,11 @@ module Homebrew extend self
check_for_other_package_managers
check_for_x11
check_for_nonstandard_x11
check_access_share_locale
check_access_share_man
check_access_include
check_access_etc
check_access_share
check_access_share_locale
check_access_share_man
check_user_path
check_which_pkg_config
check_pkg_config_paths
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment