aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2018-01-18 15:29:40 +0000
committerGitHub2018-01-18 15:29:40 +0000
commit9201fbde824ad311ea510e22dd045f1573d5ca78 (patch)
tree7097204c30ea7e0aed500cb8455c409d9533b181 /Library
parentb17672a2b4946a9e8a4613006e984006d939479a (diff)
parent77f1768108272f2168e22a735bead49fe7045331 (diff)
downloadbrew-9201fbde824ad311ea510e22dd045f1573d5ca78.tar.bz2
Merge pull request #3694 from MikeMcQuaid/more-odisabled
Disable and add more deprecations.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/compat/ENV/std.rb14
-rw-r--r--Library/Homebrew/compat/ENV/super.rb24
-rw-r--r--Library/Homebrew/compat/extend/string.rb1
-rw-r--r--Library/Homebrew/compat/formula_support.rb18
-rw-r--r--Library/Homebrew/compat/language/haskell.rb3
-rw-r--r--Library/Homebrew/compat/utils/shell.rb3
-rw-r--r--Library/Homebrew/formula_support.rb14
7 files changed, 50 insertions, 27 deletions
diff --git a/Library/Homebrew/compat/ENV/std.rb b/Library/Homebrew/compat/ENV/std.rb
index 26dabe440..beca4ed6f 100644
--- a/Library/Homebrew/compat/ENV/std.rb
+++ b/Library/Homebrew/compat/ENV/std.rb
@@ -1,27 +1,25 @@
module Stdenv
def fast
- odeprecated "ENV.fast"
+ odisabled "ENV.fast"
end
def O4
- odeprecated "ENV.O4"
+ odisabled "ENV.O4"
end
def Og
- odeprecated "ENV.Og"
+ odisabled "ENV.Og"
end
def gcc_4_0_1
- odeprecated "ENV.gcc_4_0_1", "ENV.gcc_4_0"
- gcc_4_0
+ odisabled "ENV.gcc_4_0_1", "ENV.gcc_4_0"
end
def gcc
- odeprecated "ENV.gcc", "ENV.gcc_4_2"
- gcc_4_2
+ odisabled "ENV.gcc", "ENV.gcc_4_2"
end
def libpng
- odeprecated "ENV.libpng", "ENV.x11"
+ odisabled "ENV.libpng", "ENV.x11"
end
end
diff --git a/Library/Homebrew/compat/ENV/super.rb b/Library/Homebrew/compat/ENV/super.rb
index 2020ad752..53a6bdc4d 100644
--- a/Library/Homebrew/compat/ENV/super.rb
+++ b/Library/Homebrew/compat/ENV/super.rb
@@ -1,47 +1,45 @@
module Superenv
def fast
- odeprecated "ENV.fast"
+ odisabled "ENV.fast"
end
def O4
- odeprecated "ENV.O4"
+ odisabled "ENV.O4"
end
def Og
- odeprecated "ENV.Og"
+ odisabled "ENV.Og"
end
def gcc_4_0_1
- odeprecated "ENV.gcc_4_0_1", "ENV.gcc_4_0"
- gcc_4_0
+ odisabled "ENV.gcc_4_0_1", "ENV.gcc_4_0"
end
def gcc
- odeprecated "ENV.gcc", "ENV.gcc_4_2"
- gcc_4_2
+ odisabled "ENV.gcc", "ENV.gcc_4_2"
end
def libxml2
- odeprecated "ENV.libxml2"
+ odisabled "ENV.libxml2"
end
def minimal_optimization
- odeprecated "ENV.minimal_optimization"
+ odisabled "ENV.minimal_optimization"
end
def no_optimization
- odeprecated "ENV.no_optimization"
+ odisabled "ENV.no_optimization"
end
def enable_warnings
- odeprecated "ENV.enable_warnings"
+ odisabled "ENV.enable_warnings"
end
def macosxsdk
- odeprecated "ENV.macosxsdk"
+ odisabled "ENV.macosxsdk"
end
def remove_macosxsdk
- odeprecated "ENV.remove_macosxsdk"
+ odisabled "ENV.remove_macosxsdk"
end
end
diff --git a/Library/Homebrew/compat/extend/string.rb b/Library/Homebrew/compat/extend/string.rb
index 6069a6bec..9d1f66557 100644
--- a/Library/Homebrew/compat/extend/string.rb
+++ b/Library/Homebrew/compat/extend/string.rb
@@ -1,5 +1,6 @@
class String
def undent
+ odeprecated "<<-EOS.undent", "<<~EOS"
gsub(/^[ \t]{#{(slice(/^[ \t]+/) || '').length}}/, "")
end
alias unindent undent
diff --git a/Library/Homebrew/compat/formula_support.rb b/Library/Homebrew/compat/formula_support.rb
new file mode 100644
index 000000000..f56a4909b
--- /dev/null
+++ b/Library/Homebrew/compat/formula_support.rb
@@ -0,0 +1,18 @@
+require "formula_support"
+
+class KegOnlyReason
+ alias _to_s to_s
+
+ def to_s
+ case @reason
+ when :provided_by_osx
+ odeprecated "keg_only :provided_by_osx", "keg_only :provided_by_macos"
+ @reason = :provided_by_macos
+ when :shadowed_by_osx
+ odeprecated "keg_only :shadowed_by_osx", "keg_only :shadowed_by_macos"
+ @reason = :shadowed_by_macos
+ end
+
+ _to_s
+ end
+end
diff --git a/Library/Homebrew/compat/language/haskell.rb b/Library/Homebrew/compat/language/haskell.rb
index cef97d818..8e5059874 100644
--- a/Library/Homebrew/compat/language/haskell.rb
+++ b/Library/Homebrew/compat/language/haskell.rb
@@ -2,8 +2,7 @@ module Language
module Haskell
module Cabal
def cabal_clean_lib
- odeprecated "Language::Haskell::Cabal#cabal_clean_lib"
- rm_rf lib
+ odisabled "Language::Haskell::Cabal#cabal_clean_lib"
end
end
end
diff --git a/Library/Homebrew/compat/utils/shell.rb b/Library/Homebrew/compat/utils/shell.rb
index 161f10ebb..2f387d967 100644
--- a/Library/Homebrew/compat/utils/shell.rb
+++ b/Library/Homebrew/compat/utils/shell.rb
@@ -1,8 +1,7 @@
module Utils
module Shell
def self.shell_profile
- odeprecated "Utils::Shell.shell_profile", "Utils::Shell.profile"
- Utils::Shell.profile
+ odisabled "Utils::Shell.shell_profile", "Utils::Shell.profile"
end
end
end
diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb
index 53fd61db8..011d8a4b7 100644
--- a/Library/Homebrew/formula_support.rb
+++ b/Library/Homebrew/formula_support.rb
@@ -32,15 +32,25 @@ class KegOnlyReason
def to_s
return @explanation unless @explanation.empty?
+
+ case @reason
+ when :provided_by_osx
+ odeprecated "keg_only :provided_by_osx", "keg_only :provided_by_macos"
+ @reason = :provided_by_macos
+ when :shadowed_by_osx
+ odeprecated "keg_only :shadowed_by_osx", "keg_only :shadowed_by_macos"
+ @reason = :shadowed_by_macos
+ end
+
case @reason
when :versioned_formula then <<~EOS
this is an alternate version of another formula
EOS
- when :provided_by_macos, :provided_by_osx then <<~EOS
+ when :provided_by_macos then <<~EOS
macOS already provides this software and installing another version in
parallel can cause all kinds of trouble
EOS
- when :shadowed_by_macos, :shadowed_by_osx then <<~EOS
+ when :shadowed_by_macos then <<~EOS
macOS provides similar software and installing this software in
parallel can cause all kinds of trouble
EOS