From 2a36f61c190b14c462f8032912e1321c62f56b17 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 15 Feb 2020 19:40:53 +0000 Subject: [PATCH] missing_formula: TexLive is only blacklisted on macOS - In Homebrew/linuxbrew-core, [we have a Linux-only formula for `texlive`](https://github.com/Homebrew/linuxbrew-core/tree/master/Formula/texlive.rb). - When running `brew audit --strict texlive` on Linux, we got the following messaging: ``` $ brew audit --strict texlive texlive: * 'texlive' is blacklisted from homebrew/core. Error: 1 problem in 1 formula detected ``` - Looking at where this comes from leads to the missing formula messaging to install `mactex` via Homebrew Cask. The 'blacklisted in homebrew/core' messaging only applies to macOS where Casks are an option for users, so let's not surface the audit for `texlive` on Linux. --- Library/Homebrew/extend/os/mac/missing_formula.rb | 13 +++++++++++++ Library/Homebrew/missing_formula.rb | 12 ------------ Library/Homebrew/test/missing_formula_spec.rb | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Library/Homebrew/extend/os/mac/missing_formula.rb b/Library/Homebrew/extend/os/mac/missing_formula.rb index f195895cc2..37fe2d228b 100644 --- a/Library/Homebrew/extend/os/mac/missing_formula.rb +++ b/Library/Homebrew/extend/os/mac/missing_formula.rb @@ -14,6 +14,19 @@ module Homebrew <<~EOS Xcode can be installed from the App Store. EOS + when "tex", "tex-live", "texlive", "mactex", "latex" + <<~EOS + There are three versions of MacTeX. + + Full installation: + brew cask install mactex + + Full installation without bundled applications: + brew cask install mactex-no-gui + + Minimal installation: + brew cask install basictex + EOS else generic_blacklisted_reason(name) end diff --git a/Library/Homebrew/missing_formula.rb b/Library/Homebrew/missing_formula.rb index ba1895ac79..70ec26b1dd 100644 --- a/Library/Homebrew/missing_formula.rb +++ b/Library/Homebrew/missing_formula.rb @@ -16,18 +16,6 @@ module Homebrew macOS provides gem as part of Ruby. To install a newer version: brew install ruby EOS - when "tex", "tex-live", "texlive", "mactex", "latex" then <<~EOS - There are three versions of MacTeX. - - Full installation: - brew cask install mactex - - Full installation without bundled applications: - brew cask install mactex-no-gui - - Minimal installation: - brew cask install basictex - EOS when "pip" then <<~EOS pip is part of the python formula: brew install python diff --git a/Library/Homebrew/test/missing_formula_spec.rb b/Library/Homebrew/test/missing_formula_spec.rb index fc4a1fd0fa..3e807c475b 100644 --- a/Library/Homebrew/test/missing_formula_spec.rb +++ b/Library/Homebrew/test/missing_formula_spec.rb @@ -17,7 +17,7 @@ describe Homebrew::MissingFormula do end it { is_expected.to blacklist("gem") } - it { is_expected.to blacklist("latex") } + it("blacklists LaTeX", :needs_macos) { is_expected.to blacklist("latex") } it { is_expected.to blacklist("pip") } it { is_expected.to blacklist("pil") } it { is_expected.to blacklist("macruby") }