From 8e2f0ccdc3d56bd30c7db3a4e7fdd5199405bf75 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 9 Dec 2016 17:59:08 +0000 Subject: [PATCH] formulary: remap deprecated options from keg. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When reading a building a formula from a keg (rather than e.g. from name) then the deprecation options were not remapped correctly as they are only done in `Tab.for_formula` and not `Tab.for_keg`. Ensure that after we’ve created the formula that the `used_options` are remapped correctly. --- Library/Homebrew/formula_installer.rb | 1 - Library/Homebrew/formulary.rb | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 19b6196255..1eae668a47 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -467,7 +467,6 @@ class FormulaInstaller fi = DependencyInstaller.new(df) fi.options |= tab.used_options - fi.options |= Tab.remap_deprecated_options(df.deprecated_options, dep.options) fi.options |= inherited_options fi.options &= df.options fi.build_from_source = ARGV.build_formula_from_source?(df) diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 772f4c902b..8d9633e3cc 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -276,6 +276,7 @@ class Formulary end end f.build = tab + f.build.used_options = Tab.remap_deprecated_options(f.deprecated_options, tab.used_options).as_flags f.version.update_commit(keg.version.version.commit) if f.head? && keg.version.head? f end