diff options
| author | Mike McQuaid | 2017-09-16 14:10:21 +0100 |
|---|---|---|
| committer | GitHub | 2017-09-16 14:10:21 +0100 |
| commit | 827723dbac9049e30add51bd0de4219a0afc5670 (patch) | |
| tree | 181e817e0621ee5f17ce7f274971fb8f6d45494c /Library/Homebrew/dev-cmd | |
| parent | c0063bb827ffa9cd537a0ca107aa05ca1323393c (diff) | |
| parent | ffdda0eb9f4a2e56366e8c665d147d9be637f6f4 (diff) | |
| download | brew-827723dbac9049e30add51bd0de4219a0afc5670.tar.bz2 | |
Merge pull request #3158 from MikeMcQuaid/old-osx-tweaks
Tweaks for older Mac OS X versions.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 4220fce47..e2a288fdb 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -574,7 +574,7 @@ class FormulaAuditor return unless @online - return unless DevelopmentTools.curl_handles_most_https_homepages? + return unless DevelopmentTools.curl_handles_most_https_certificates? if http_content_problem = FormulaAuditor.check_http_content(homepage, user_agents: [:browser, :default], check_content: true, @@ -1175,9 +1175,9 @@ class ResourceAuditor problem "Redundant :using value in URL" end - def self.curl_git_openssl_and_deps - @curl_git_openssl_and_deps ||= begin - formulae_names = ["curl", "git", "openssl"] + def self.curl_openssl_and_deps + @curl_openssl_and_deps ||= begin + formulae_names = ["curl", "openssl"] formulae_names += formulae_names.flat_map do |f| Formula[f].recursive_dependencies.map(&:name) end @@ -1190,11 +1190,14 @@ class ResourceAuditor def audit_urls urls = [url] + mirrors - require_http = ResourceAuditor.curl_git_openssl_and_deps.include?(owner.name) + curl_openssl_or_deps = ResourceAuditor.curl_openssl_and_deps.include?(owner.name) - if spec_name == :stable && require_http && - !urls.find { |u| u.start_with?("http://") } - problem "should always include at least one HTTP mirror" + if spec_name == :stable && curl_openssl_or_deps + problem "should not use xz tarballs" if url.end_with?(".xz") + + unless urls.find { |u| u.start_with?("http://") } + problem "should always include at least one HTTP mirror" + end end return unless @online @@ -1206,7 +1209,7 @@ class ResourceAuditor # A `brew mirror`'ed URL is usually not yet reachable at the time of # pull request. next if url =~ %r{^https://dl.bintray.com/homebrew/mirror/} - if http_content_problem = FormulaAuditor.check_http_content(url, require_http: require_http) + if http_content_problem = FormulaAuditor.check_http_content(url, require_http: curl_openssl_or_deps) problem http_content_problem end elsif strategy <= GitDownloadStrategy |
