From f5b63f4a8dd3e22ffc405a1a6119a961f8332578 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 9 Jan 2017 12:31:00 +0000 Subject: Deprecate brew (un)linkapps. Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using either aliases or symlinks and Homebrew formulae do not build "proper" `.app` bundles that can be relocated. Instead, please consider using `brew cask` and migrate formulae using `.app`s to casks. --- Library/Homebrew/cmd/linkapps.rb | 16 +++++++++++++++- Library/Homebrew/cmd/unlinkapps.rb | 13 ++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cmd/linkapps.rb b/Library/Homebrew/cmd/linkapps.rb index bd88409aa..7dd1a6b93 100644 --- a/Library/Homebrew/cmd/linkapps.rb +++ b/Library/Homebrew/cmd/linkapps.rb @@ -1,6 +1,11 @@ #: * `linkapps` [`--local`] []: #: Find installed formulae that provide `.app`-style macOS apps and symlink them -#: into `/Applications`, allowing for easier access. +#: into `/Applications`, allowing for easier access (deprecated). +#: +#: Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using +#: either aliases or symlinks and Homebrew formulae do not build "proper" `.app` +#: bundles that can be relocated. Instead, please consider using `brew cask` and +#: migrate formulae using `.app`s to casks. #: #: If no are provided, all of them will have their apps symlinked. #: @@ -14,6 +19,15 @@ module Homebrew module_function def linkapps + opoo <<-EOS.undent + `brew linkapps` has been deprecated and will eventually be removed! + + Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using + either aliases or symlinks and Homebrew formulae do not build "proper" `.app` + bundles that can be relocated. Instead, please consider using `brew cask` and + migrate formulae using `.app`s to casks. + EOS + target_dir = linkapps_target(local: ARGV.include?("--local")) unless target_dir.directory? diff --git a/Library/Homebrew/cmd/unlinkapps.rb b/Library/Homebrew/cmd/unlinkapps.rb index d04ef9ee4..b2ba458bf 100644 --- a/Library/Homebrew/cmd/unlinkapps.rb +++ b/Library/Homebrew/cmd/unlinkapps.rb @@ -1,5 +1,10 @@ #: * `unlinkapps` [`--local`] [`--dry-run`] []: -#: Remove symlinks created by `brew linkapps` from `/Applications`. +#: Remove symlinks created by `brew linkapps` from `/Applications` (deprecated). +#: +#: Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using +#: either aliases or symlinks and Homebrew formulae do not build "proper" `.app` +#: bundles that can be relocated. Instead, please consider using `brew cask` and +#: migrate formulae using `.app`s to casks. #: #: If no are provided, all linked apps will be removed. #: @@ -15,6 +20,12 @@ module Homebrew module_function def unlinkapps + opoo <<-EOS.undent + `brew unlinkapps` has been deprecated and will eventually be removed! + + Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using either aliases or symlinks and Homebrew formulae do not build "proper" `.app` bundles that can be relocated. Instead, please consider using `brew cask` and migrate formulae using `.app`s to casks. + EOS + target_dir = linkapps_target(local: ARGV.include?("--local")) unlinkapps_from_dir(target_dir, dry_run: ARGV.dry_run?) -- cgit v1.2.3 From c0a29d664420bb568036f8e92654cf5e0b73da3e Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 9 Jan 2017 13:33:56 +0000 Subject: caveats, keg: remove linkapps caveats code. --- Library/Homebrew/caveats.rb | 11 ----------- Library/Homebrew/keg.rb | 4 ---- 2 files changed, 15 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index 3dfdb1c87..d1dda9d4c 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -23,7 +23,6 @@ class Caveats caveats << fish_function_caveats caveats << plist_caveats caveats << python_caveats - caveats << app_caveats caveats << elisp_caveats caveats.compact.join("\n") end @@ -169,16 +168,6 @@ class Caveats s end - def app_caveats - return unless keg - return unless keg.app_installed? - - <<-EOS.undent - .app bundles were installed. - Run `brew linkapps #{keg.name}` to symlink these to /Applications. - EOS - end - def elisp_caveats return if f.keg_only? return unless keg diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 4312c9454..14eb0e3f3 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -367,10 +367,6 @@ class Keg Pathname.glob("#{app_prefix}/{,libexec/}*.app") end - def app_installed? - !apps.empty? - end - def elisp_installed? return false unless (path/"share/emacs/site-lisp"/name).exist? (path/"share/emacs/site-lisp"/name).children.any? { |f| %w[.el .elc].include? f.extname } -- cgit v1.2.3