From 0344d243e4b7279490d9be806ee440fcdcb102b3 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 18 Dec 2014 18:04:22 -0500 Subject: [PATCH] Deprecate made-up URL schemes This deprecates URLs that begin with the following fake URL schemes: bzr:// cvs:// hg:// fossil:// svn+http:// Despite their appearance, they are not actually accepted by the corresponding tools. They exist only as hints to the download strategy detection code, and are stripped from the URL before the URL is handed off to the VCS program. This is not documented, and may lead one to believe it is a valid URL that can be used elsewhere, when it actually only works inside Homebrew. We have a better mechanism for specifying the download strategy that is straightforward and explicit: :using => :hg Recommend that instead. Closes Homebrew/homebrew#35114. --- Library/Homebrew/cmd/audit.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 82e53a35a3..e77e14cfe7 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -623,6 +623,10 @@ class ResourceAuditor end def audit_download_strategy + if url =~ %r[^(cvs|bzr|hg|fossil)://] || url =~ %r[^(svn)\+http://] + problem "Use of the #{$&} scheme is deprecated, pass `:using => :#{$1}` instead" + end + return unless using if using == :ssl3 || using == CurlSSL3DownloadStrategy