aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-10-13 23:13:01 -0500
committerJack Nagel2014-10-13 23:13:01 -0500
commitb05351d0b2ded45824046d0d7b823e5149f59467 (patch)
tree00d765120bd15f34593bad8daf0acfc27e103ca6 /Library
parent634d67690bbb2f0d6520c2f87a1cf8c7e4ceb089 (diff)
downloadbrew-b05351d0b2ded45824046d0d7b823e5149f59467.tar.bz2
Reorganize post-install checks so we can share more code
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb13
-rw-r--r--Library/Homebrew/formula_cellar_checks.rb13
-rw-r--r--Library/Homebrew/formula_installer.rb44
3 files changed, 19 insertions, 51 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index ce8c1e9db..380afc286 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -554,19 +554,6 @@ class FormulaAuditor
problem(output) if output
end
- def audit_installed
- audit_check_output(check_manpages)
- audit_check_output(check_infopages)
- audit_check_output(check_jars)
- audit_check_output(check_non_libraries)
- audit_check_output(check_non_executables(f.bin))
- audit_check_output(check_generic_executables(f.bin))
- audit_check_output(check_non_executables(f.sbin))
- audit_check_output(check_generic_executables(f.sbin))
- audit_check_output(check_shadowed_headers)
- audit_check_output(check_easy_install_pth(f.lib))
- end
-
def audit
audit_file
audit_specs
diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb
index 7f30990e8..337cd50b7 100644
--- a/Library/Homebrew/formula_cellar_checks.rb
+++ b/Library/Homebrew/formula_cellar_checks.rb
@@ -133,6 +133,19 @@ module FormulaCellarChecks
EOS
end
+ def audit_installed
+ audit_check_output(check_manpages)
+ audit_check_output(check_infopages)
+ audit_check_output(check_jars)
+ audit_check_output(check_non_libraries)
+ audit_check_output(check_non_executables(f.bin))
+ audit_check_output(check_generic_executables(f.bin))
+ audit_check_output(check_non_executables(f.sbin))
+ audit_check_output(check_generic_executables(f.sbin))
+ audit_check_output(check_shadowed_headers)
+ audit_check_output(check_easy_install_pth(f.lib))
+ end
+
private
def relative_glob(dir, pattern)
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index d315ff1dd..0cc50ac82 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -378,14 +378,7 @@ class FormulaInstaller
def caveats
return if only_deps?
- if ARGV.homebrew_developer? and not f.keg_only?
- audit_bin
- audit_sbin
- audit_lib
- audit_man
- audit_info
- audit_include
- end
+ audit_installed if ARGV.homebrew_developer? and not f.keg_only?
c = Caveats.new(f)
@@ -637,42 +630,17 @@ class FormulaInstaller
FileUtils.rm_rf f.bottle_prefix
end
- ## checks
-
- def print_check_output(output)
+ def audit_check_output(output)
if output
opoo output
@show_summary_heading = true
end
end
- def audit_bin
- print_check_output(check_PATH(f.bin))
- print_check_output(check_non_executables(f.bin))
- print_check_output(check_generic_executables(f.bin))
- end
-
- def audit_sbin
- print_check_output(check_PATH(f.sbin))
- print_check_output(check_non_executables(f.sbin))
- print_check_output(check_generic_executables(f.sbin))
- end
-
- def audit_lib
- print_check_output(check_jars)
- print_check_output(check_non_libraries)
- end
-
- def audit_man
- print_check_output(check_manpages)
- end
-
- def audit_info
- print_check_output(check_infopages)
- end
-
- def audit_include
- print_check_output(check_shadowed_headers)
+ def audit_installed
+ audit_check_output(check_PATH(f.bin))
+ audit_check_output(check_PATH(f.sbin))
+ super
end
private