aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/ISSUE_TEMPLATE.md24
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/moved.rb18
-rw-r--r--Library/Homebrew/cask/lib/hbc/container.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/container/executable.rb18
-rw-r--r--Library/Homebrew/cask/lib/hbc/utils.rb19
-rw-r--r--Library/Homebrew/cleanup.rb47
-rw-r--r--Library/Homebrew/cmd/cleanup.rb14
-rw-r--r--Library/Homebrew/cmd/fetch.rb4
-rw-r--r--Library/Homebrew/cmd/install.rb24
-rw-r--r--Library/Homebrew/cmd/link.rb6
-rw-r--r--Library/Homebrew/cmd/migrate.rb2
-rw-r--r--Library/Homebrew/cmd/outdated.rb10
-rw-r--r--Library/Homebrew/cmd/reinstall.rb1
-rw-r--r--Library/Homebrew/cmd/uninstall.rb2
-rw-r--r--Library/Homebrew/cmd/unpack.rb2
-rw-r--r--Library/Homebrew/cmd/update-report.rb24
-rw-r--r--Library/Homebrew/cmd/update.sh2
-rw-r--r--Library/Homebrew/cmd/upgrade.rb1
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb48
-rw-r--r--Library/Homebrew/dev-cmd/boneyard-formula-pr.rb166
-rw-r--r--Library/Homebrew/dev-cmd/bottle.rb2
-rw-r--r--Library/Homebrew/dev-cmd/man.rb4
-rw-r--r--Library/Homebrew/dev-cmd/test.rb2
-rw-r--r--Library/Homebrew/dev-cmd/tests.rb2
-rw-r--r--Library/Homebrew/dev-cmd/update-test.rb14
-rw-r--r--Library/Homebrew/diagnostic.rb49
-rw-r--r--Library/Homebrew/exceptions.rb8
-rw-r--r--Library/Homebrew/formula.rb8
-rw-r--r--Library/Homebrew/keg.rb5
-rw-r--r--Library/Homebrew/migrator.rb116
-rw-r--r--Library/Homebrew/missing_formula.rb16
-rw-r--r--Library/Homebrew/official_taps.rb3
-rw-r--r--Library/Homebrew/requirements/ruby_requirement.rb2
-rw-r--r--Library/Homebrew/tab.rb5
-rw-r--r--Library/Homebrew/test/cask/dsl_spec.rb2
-rw-r--r--Library/Homebrew/test/cleanup_spec.rb33
-rw-r--r--Library/Homebrew/test/cmd/link_spec.rb6
-rw-r--r--Library/Homebrew/test/cmd/outdated_spec.rb92
-rw-r--r--Library/Homebrew/test/formula_installer_spec.rb7
-rw-r--r--Library/Homebrew/test/formula_spec.rb28
-rw-r--r--Library/Homebrew/test/missing_formula_spec.rb8
-rw-r--r--Library/Homebrew/test/tab_spec.rb2
-rw-r--r--completions/zsh/_brew8
-rw-r--r--docs/External-Commands.md6
-rw-r--r--docs/FAQ.md10
-rw-r--r--docs/Formula-Cookbook.md2
-rw-r--r--docs/Interesting-Taps-&-Forks.md24
-rw-r--r--docs/Manpage.md391
-rw-r--r--manpages/brew-cask.12
-rw-r--r--manpages/brew.132
50 files changed, 714 insertions, 609 deletions
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index e31809091..9eca6149b 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -1,17 +1,17 @@
-If Homebrew was updated on Aug 10-11th 2016 and `brew update` always says `Already up-to-date.` you need to run: `cd "$(brew --repo)" && git fetch && git reset --hard origin/master && brew update`.
-
-# Please follow the general troubleshooting steps first:
-
+# Please always follow these steps:
+- [ ] Confirmed this is a problem with Homebrew/brew and not one or more formulae? If it's a formulae-specific problem please file this issue at https://github.com/Homebrew/homebrew-core/issues/new
- [ ] Ran `brew update` and retried your prior step?
- [ ] Ran `brew doctor`, fixed as many issues as possible and retried your prior step?
-- [ ] Confirmed this is a problem with Homebrew/brew and not specific formulae? If it's a formulae-specific problem please file this issue at https://github.com/Homebrew/homebrew-core/issues/new
-
-_You can erase any parts of this template not applicable to your Issue._
-
-### Bug reports:
+- [ ] Ran `brew config` and `brew doctor` and included their output with your issue?
-Please replace this section with a brief summary of your issue **AND** the output of `brew config` and `brew doctor`. Please note we may immediately close your issue without comment if you do not fill out the issue template and provide the requested information.
+To help us debug your issue please explain:
+- What you were trying to do (and why)
+- What happened (include command output)
+- What you expected to happen
+- Step-by-step reproduction instructions (by running `brew` commands)
-### Propose a feature:
+**Please note we may immediately close your issue without comment if you do not fill out the issue template and provide ALL the requested information.**
-Please replace this section with a detailed description of your proposed feature, the motivation for it and alternatives considered. Please note we may close this issue or ask you to create a pull-request if it's something we're not actively planning to work on.
+# Or propose a feature:
+Please replace this section with a detailed description of your proposed feature, the motivation for it and alternatives considered.
+Please note we may close this issue or ask you to create a pull-request if it's something we're not actively planning to work on.
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb
index 01e98ac35..eaaa49e20 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb
@@ -31,20 +31,26 @@ module Hbc
ohai "Moving #{self.class.artifact_english_name} '#{source.basename}' to '#{target}'."
target.dirname.mkpath
- FileUtils.move(source, target)
+
+ if target.parent.writable?
+ FileUtils.move(source, target)
+ else
+ SystemCommand.run("/bin/mv", args: [source, target], sudo: true)
+ end
+
add_altname_metadata target, source.basename.to_s
end
def delete
ohai "Removing #{self.class.artifact_english_name} '#{target}'."
- return unless Utils.path_occupied?(target)
-
raise CaskError, "Cannot remove undeletable #{self.class.artifact_english_name}." if MacOS.undeletable?(target)
- if force
- Utils.gain_permissions_remove(target, command: @command)
- else
+ return unless Utils.path_occupied?(target)
+
+ if target.parent.writable? && !force
target.rmtree
+ else
+ Utils.gain_permissions_remove(target, command: @command)
end
end
diff --git a/Library/Homebrew/cask/lib/hbc/container.rb b/Library/Homebrew/cask/lib/hbc/container.rb
index fc7246f3d..c6b2c3c37 100644
--- a/Library/Homebrew/cask/lib/hbc/container.rb
+++ b/Library/Homebrew/cask/lib/hbc/container.rb
@@ -4,6 +4,7 @@ require "hbc/container/bzip2"
require "hbc/container/cab"
require "hbc/container/criteria"
require "hbc/container/dmg"
+require "hbc/container/executable"
require "hbc/container/generic_unar"
require "hbc/container/gzip"
require "hbc/container/lzma"
@@ -39,6 +40,7 @@ module Hbc
Gzip, # pure gzip
Lzma, # pure lzma
Xz, # pure xz
+ Executable,
]
# for explicit use only (never autodetected):
# Hbc::Container::Naked
diff --git a/Library/Homebrew/cask/lib/hbc/container/executable.rb b/Library/Homebrew/cask/lib/hbc/container/executable.rb
new file mode 100644
index 000000000..848f6d4be
--- /dev/null
+++ b/Library/Homebrew/cask/lib/hbc/container/executable.rb
@@ -0,0 +1,18 @@
+require "hbc/container/naked"
+require "vendor/macho/macho"
+
+module Hbc
+ class Container
+ class Executable < Naked
+ def self.me?(criteria)
+ return true if criteria.magic_number(/^#!\s*\S+/)
+
+ begin
+ MachO.open(criteria.path).header.executable?
+ rescue MachO::MagicError
+ false
+ end
+ end
+ end
+ end
+end
diff --git a/Library/Homebrew/cask/lib/hbc/utils.rb b/Library/Homebrew/cask/lib/hbc/utils.rb
index 3fc817dd5..ecb565e8e 100644
--- a/Library/Homebrew/cask/lib/hbc/utils.rb
+++ b/Library/Homebrew/cask/lib/hbc/utils.rb
@@ -4,8 +4,7 @@ require "stringio"
require "hbc/utils/file"
-PREBUG_URL = "https://github.com/caskroom/homebrew-cask/blob/master/doc/reporting_bugs/pre_bug_report.md".freeze
-ISSUES_URL = "https://github.com/caskroom/homebrew-cask#reporting-bugs".freeze
+BUG_REPORTS_URL = "https://github.com/caskroom/homebrew-cask#reporting-bugs".freeze
# monkeypatch Object - not a great idea
class Object
@@ -39,7 +38,15 @@ module Hbc
module Utils
def self.gain_permissions_remove(path, command: SystemCommand)
if path.respond_to?(:rmtree) && path.exist?
- gain_permissions(path, ["-R"], command, &:rmtree)
+ gain_permissions(path, ["-R"], command) do |p|
+ if p.parent.writable?
+ p.rmtree
+ else
+ command.run("/bin/rm",
+ args: command_args + ["-r", "-f", "--", p],
+ sudo: true)
+ end
+ end
elsif File.symlink?(path)
gain_permissions(path, ["-h"], command, &FileUtils.method(:rm_f))
end
@@ -96,11 +103,7 @@ module Hbc
def self.error_message_with_suggestions
<<-EOS.undent
Follow the instructions here:
- #{Formatter.url(PREBUG_URL)}
-
- If this doesn’t fix the problem, please report this bug:
- #{Formatter.url(ISSUES_URL)}
-
+ #{Formatter.url(BUG_REPORTS_URL)}
EOS
end
diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb
index 615a7ce9e..d1f0b2516 100644
--- a/Library/Homebrew/cleanup.rb
+++ b/Library/Homebrew/cleanup.rb
@@ -6,7 +6,9 @@ module Homebrew
module Cleanup
@disk_cleanup_size = 0
- def self.cleanup
+ module_function
+
+ def cleanup
cleanup_cellar
cleanup_cache
cleanup_logs
@@ -15,34 +17,41 @@ module Homebrew
rm_ds_store
end
- def self.update_disk_cleanup_size(path_size)
+ def update_disk_cleanup_size(path_size)
@disk_cleanup_size += path_size
end
- def self.disk_cleanup_size
+ def disk_cleanup_size
@disk_cleanup_size
end
- def self.cleanup_formula(formula)
- formula.eligible_kegs_for_cleanup.each do |keg|
- cleanup_path(keg) { keg.uninstall }
- end
+ def unremovable_kegs
+ @unremovable_kegs ||= []
+ end
+
+ def cleanup_cellar(formulae = Formula.installed)
+ formulae.each(&method(:cleanup_formula))
+ end
+
+ def cleanup_formula(formula)
+ formula.eligible_kegs_for_cleanup.each(&method(:cleanup_keg))
end
- def self.cleanup_logs
+ def cleanup_keg(keg)
+ cleanup_path(keg) { keg.uninstall }
+ rescue Errno::EACCES => e
+ opoo e.message
+ unremovable_kegs << keg
+ end
+
+ def cleanup_logs
return unless HOMEBREW_LOGS.directory?
HOMEBREW_LOGS.subdirs.each do |dir|
cleanup_path(dir) { dir.rmtree } if prune?(dir, days_default: 14)
end
end
- def self.cleanup_cellar
- Formula.installed.each do |formula|
- cleanup_formula formula
- end
- end
-
- def self.cleanup_cache(cache = HOMEBREW_CACHE)
+ def cleanup_cache(cache = HOMEBREW_CACHE)
return unless cache.directory?
cache.children.each do |path|
if path.to_s.end_with? ".incomplete"
@@ -97,7 +106,7 @@ module Homebrew
end
end
- def self.cleanup_path(path)
+ def cleanup_path(path)
if ARGV.dry_run?
puts "Would remove: #{path} (#{path.abv})"
else
@@ -108,7 +117,7 @@ module Homebrew
update_disk_cleanup_size(path.disk_usage)
end
- def self.cleanup_lockfiles
+ def cleanup_lockfiles
return unless HOMEBREW_LOCK_DIR.directory?
candidates = HOMEBREW_LOCK_DIR.children
lockfiles = candidates.select(&:file?)
@@ -118,7 +127,7 @@ module Homebrew
end
end
- def self.rm_ds_store
+ def rm_ds_store
paths = Queue.new
%w[Cellar Frameworks Library bin etc include lib opt sbin share var]
.map { |p| HOMEBREW_PREFIX/p }.each { |p| paths << p if p.exist? }
@@ -136,7 +145,7 @@ module Homebrew
workers.map(&:join)
end
- def self.prune?(path, options = {})
+ def prune?(path, options = {})
@time ||= Time.now
path_modified_time = path.mtime
diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb
index 126309579..d8f669e85 100644
--- a/Library/Homebrew/cmd/cleanup.rb
+++ b/Library/Homebrew/cmd/cleanup.rb
@@ -21,11 +21,14 @@ module Homebrew
if ARGV.named.empty?
Cleanup.cleanup
else
- ARGV.resolved_formulae.each { |f| Cleanup.cleanup_formula f }
+ Cleanup.cleanup_cellar(ARGV.resolved_formulae)
end
- return if Cleanup.disk_cleanup_size.zero?
+ report_disk_usage unless Cleanup.disk_cleanup_size.zero?
+ report_unremovable_kegs unless Cleanup.unremovable_kegs.empty?
+ end
+ def report_disk_usage
disk_space = disk_usage_readable(Cleanup.disk_cleanup_size)
if ARGV.dry_run?
ohai "This operation would free approximately #{disk_space} of disk space."
@@ -33,4 +36,11 @@ module Homebrew
ohai "This operation has freed approximately #{disk_space} of disk space."
end
end
+
+ def report_unremovable_kegs
+ ofail <<-EOS.undent
+ Could not cleanup old kegs! Fix your permissions on:
+ #{Cleanup.unremovable_kegs.join "\n "}
+ EOS
+ end
end
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb
index 820a27e31..006c63746 100644
--- a/Library/Homebrew/cmd/fetch.rb
+++ b/Library/Homebrew/cmd/fetch.rb
@@ -8,14 +8,14 @@
#: If `-v` is passed, do a verbose VCS checkout, if the URL represents a VCS.
#: This is useful for seeing if an existing VCS cache has been updated.
#:
-#: If `--force` is passed, remove a previously cached version and re-fetch.
+#: If `--force` (or `-f`) is passed, remove a previously cached version and re-fetch.
#:
#: If `--retry` is passed, retry if a download fails or re-download if the
#: checksum of a previously cached version no longer matches.
#:
#: If `--deps` is passed, also download dependencies for any listed <formulae>.
#:
-#: If `--build-from-source` is passed, download the source rather than a
+#: If `--build-from-source` (or `-s`) is passed, download the source rather than a
#: bottle.
#:
#: If `--force-bottle` is passed, download a bottle if it exists for the
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index e54286f09..1808c4d9c 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -4,7 +4,7 @@
#: <formula> is usually the name of the formula to install, but it can be specified
#: in several different ways. See [SPECIFYING FORMULAE][].
#:
-#: If `--debug` is passed and brewing fails, open an interactive debugging
+#: If `--debug` (or `-d`) is passed and brewing fails, open an interactive debugging
#: session with access to IRB or a shell inside the temporary build directory.
#:
#: If `--env=std` is passed, use the standard build environment instead of superenv.
@@ -24,7 +24,7 @@
#: `gcc-4.2` for Apple's GCC 4.2, or `gcc-4.9` for a Homebrew-provided GCC
#: 4.9.
#:
-#: If `--build-from-source` or `-s` is passed, compile the specified <formula> from
+#: If `--build-from-source` (or `-s`) is passed, compile the specified <formula> from
#: source even if a bottle is provided. Dependencies will still be installed
#: from bottles if they are available.
#:
@@ -48,11 +48,12 @@
#: during installation.
#:
#: * `install` `--interactive` [`--git`] <formula>:
-#: Download and patch <formula>, then open a shell. This allows the user to
-#: run `./configure --help` and otherwise determine how to turn the software
-#: package into a Homebrew formula.
+#: If `--interactive` (or `-i`) is passed, download and patch <formula>, then
+#: open a shell. This allows the user to run `./configure --help` and
+#: otherwise determine how to turn the software package into a Homebrew
+#: formula.
#:
-#: If `--git` is passed, Homebrew will create a Git repository, useful for
+#: If `--git` (or `-g`) is passed, Homebrew will create a Git repository, useful for
#: creating patches to the software.
require "missing_formula"
@@ -193,13 +194,18 @@ module Homebrew
next unless f.opt_prefix.directory?
keg = Keg.new(f.opt_prefix.resolved_path)
tab = Tab.for_keg(keg)
- tab.installed_on_request = true
- tab.write
+ unless tab.installed_on_request
+ tab.installed_on_request = true
+ tab.write
+ end
end
perform_preinstall_checks
- formulae.each { |f| install_formula(f) }
+ formulae.each do |f|
+ Migrator.migrate_if_needed(f)
+ install_formula(f)
+ end
rescue FormulaClassUnavailableError => e
# Need to rescue before `FormulaUnavailableError` (superclass of this)
# is handled, as searching for a formula doesn't make sense here (the
diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb
index 293f09eef..5ce6bea48 100644
--- a/Library/Homebrew/cmd/link.rb
+++ b/Library/Homebrew/cmd/link.rb
@@ -10,7 +10,7 @@
#: be linked or which would be deleted by `brew link --overwrite`, but will not
#: actually link or delete any files.
#:
-#: If `--force` is passed, Homebrew will allow keg-only formulae to be linked.
+#: If `--force` (or `-f`) is passed, Homebrew will allow keg-only formulae to be linked.
require "ostruct"
@@ -86,8 +86,8 @@ module Homebrew
opt = HOMEBREW_PREFIX/"opt/#{keg.name}"
puts "\nIf you need to have this software first in your PATH instead consider running:"
- puts " #{Utils::Shell.prepend_path_in_shell_profile(opt)}/bin" if bin.directory?
- puts " #{Utils::Shell.prepend_path_in_shell_profile(opt)}/sbin" if sbin.directory?
+ puts " #{Utils::Shell.prepend_path_in_shell_profile(opt/"bin")}" if bin.directory?
+ puts " #{Utils::Shell.prepend_path_in_shell_profile(opt/"sbin")}" if sbin.directory?
end
def keg_only?(rack)
diff --git a/Library/Homebrew/cmd/migrate.rb b/Library/Homebrew/cmd/migrate.rb
index 2726b1480..951a2942e 100644
--- a/Library/Homebrew/cmd/migrate.rb
+++ b/Library/Homebrew/cmd/migrate.rb
@@ -2,7 +2,7 @@
#: Migrate renamed packages to new name, where <formulae> are old names of
#: packages.
#:
-#: If `--force` is passed, then treat installed <formulae> and passed <formulae>
+#: If `--force` (or `-f`) is passed, then treat installed <formulae> and passed <formulae>
#: like if they are from same taps and migrate them anyway.
require "migrator"
diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb
index a18f4e399..f163212e1 100644
--- a/Library/Homebrew/cmd/outdated.rb
+++ b/Library/Homebrew/cmd/outdated.rb
@@ -7,7 +7,7 @@
#: If `--quiet` is passed, list only the names of outdated brews (takes
#: precedence over `--verbose`).
#:
-#: If `--verbose` is passed, display detailed version information.
+#: If `--verbose` (or `-v`) is passed, display detailed version information.
#:
#: If `--json=`<version> is passed, the output will be in JSON format. The only
#: valid version is `v1`.
@@ -64,7 +64,9 @@ module Homebrew
"#{full_name} (#{kegs.map(&:version).join(", ")})"
end.join(", ")
- puts "#{outdated_versions} < #{current_version}"
+ pinned_version = " [pinned at #{f.pinned_version}]" if f.pinned?
+
+ puts "#{outdated_versions} < #{current_version}#{pinned_version}"
else
puts f.full_installed_specified_name
end
@@ -86,7 +88,9 @@ module Homebrew
json << { name: f.full_name,
installed_versions: outdated_versions.collect(&:to_s),
- current_version: current_version }
+ current_version: current_version,
+ pinned: f.pinned?,
+ pinned_version: f.pinned_version }
end
puts JSON.generate(json)
diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb
index 586405909..c625d2d97 100644
--- a/Library/Homebrew/cmd/reinstall.rb
+++ b/Library/Homebrew/cmd/reinstall.rb
@@ -15,6 +15,7 @@ module Homebrew
onoe "#{f.full_name} is pinned. You must unpin it to reinstall."
next
end
+ Migrator.migrate_if_needed(f)
reinstall_formula(f)
end
end
diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb
index 5d02ebd1e..9c51a0d1c 100644
--- a/Library/Homebrew/cmd/uninstall.rb
+++ b/Library/Homebrew/cmd/uninstall.rb
@@ -1,7 +1,7 @@
#: * `uninstall`, `rm`, `remove` [`--force`] [`--ignore-dependencies`] <formula>:
#: Uninstall <formula>.
#:
-#: If `--force` is passed, and there are multiple versions of <formula>
+#: If `--force` (or `-f`) is passed, and there are multiple versions of <formula>
#: installed, delete all installed versions.
#:
#: If `--ignore-dependencies` is passed, uninstalling won't fail, even if
diff --git a/Library/Homebrew/cmd/unpack.rb b/Library/Homebrew/cmd/unpack.rb
index 60d796d9f..89992e1f0 100644
--- a/Library/Homebrew/cmd/unpack.rb
+++ b/Library/Homebrew/cmd/unpack.rb
@@ -6,7 +6,7 @@
#: If `--patch` is passed, patches for <formulae> will be applied to the
#: unpacked source.
#:
-#: If `--git` is passed, a Git repository will be initialized in the unpacked
+#: If `--git` (or `-g`) is passed, a Git repository will be initialized in the unpacked
#: source. This is useful for creating patches for the software.
require "stringio"
diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb
index 4002df75c..a6936c78c 100644
--- a/Library/Homebrew/cmd/update-report.rb
+++ b/Library/Homebrew/cmd/update-report.rb
@@ -502,12 +502,18 @@ class Reporter
end
def migrate_formula_rename
- Formula.installed.map(&:oldname).compact.each do |old_name|
- old_name_dir = HOMEBREW_CELLAR/old_name
- next if old_name_dir.symlink?
- next unless old_name_dir.directory? && !old_name_dir.subdirs.empty?
+ Formula.installed.each do |formula|
+ next unless Migrator.needs_migration?(formula)
- new_name = tap.formula_renames[old_name]
+ oldname = formula.oldname
+ oldname_rack = HOMEBREW_CELLAR/oldname
+
+ if oldname_rack.subdirs.empty?
+ oldname_rack.rmdir_if_possible
+ next
+ end
+
+ new_name = tap.formula_renames[oldname]
next unless new_name
new_full_name = "#{tap}/#{new_name}"
@@ -519,13 +525,7 @@ class Reporter
next
end
- begin
- migrator = Migrator.new(f)
- migrator.migrate
- rescue Migrator::MigratorDifferentTapsError
- rescue Exception => e
- onoe e
- end
+ Migrator.migrate_if_needed(f)
end
end
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index 5cfdb3f46..197a99f2e 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -5,7 +5,7 @@
#: If `--merge` is specified then `git merge` is used to include updates
#: (rather than `git rebase`).
#:
-#: If `--force` is specified then always do a slower, full update check even
+#: If `--force` (or `-f`) is specified then always do a slower, full update check even
#: if unnecessary.
# Hide shellcheck complaint:
diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb
index ed36b8f33..d007ff8c8 100644
--- a/Library/Homebrew/cmd/upgrade.rb
+++ b/Library/Homebrew/cmd/upgrade.rb
@@ -88,6 +88,7 @@ module Homebrew
end
formulae_to_install.each do |f|
+ Migrator.migrate_if_needed(f)
upgrade_formula(f)
next unless ARGV.include?("--cleanup")
next unless f.installed?
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 0fc26656a..1a4bb24a1 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -331,25 +331,33 @@ class FormulaAuditor
problem "File should end with a newline" unless text.trailing_newline?
- versioned_formulae = Dir[formula.path.to_s.gsub(/\.rb$/, "@*.rb")]
- needs_versioned_alias = !versioned_formulae.empty? &&
- formula.tap &&
- formula.aliases.grep(/.@\d/).empty?
- if needs_versioned_alias
- _, last_alias_version = File.basename(versioned_formulae.sort.reverse.first)
- .gsub(/\.rb$/, "")
- .split("@")
- major, minor, = formula.version.to_s.split(".")
- alias_name = if last_alias_version.split(".").length == 1
- "#{formula.name}@#{major}"
- else
- "#{formula.name}@#{major}.#{minor}"
+ if formula.versioned_formula?
+ unversioned_formula = Pathname.new formula.path.to_s.gsub(/@.*\.rb$/, ".rb")
+ unless unversioned_formula.exist?
+ unversioned_name = unversioned_formula.basename(".rb")
+ problem "#{formula} is versioned but no #{unversioned_name} formula exists"
+ end
+ else
+ versioned_formulae = Dir[formula.path.to_s.gsub(/\.rb$/, "@*.rb")]
+ needs_versioned_alias = !versioned_formulae.empty? &&
+ formula.tap &&
+ formula.aliases.grep(/.@\d/).empty?
+ if needs_versioned_alias
+ _, last_alias_version = File.basename(versioned_formulae.sort.reverse.first)
+ .gsub(/\.rb$/, "")
+ .split("@")
+ major, minor, = formula.version.to_s.split(".")
+ alias_name = if last_alias_version.split(".").length == 1
+ "#{formula.name}@#{major}"
+ else
+ "#{formula.name}@#{major}.#{minor}"
+ end
+ problem <<-EOS.undent
+ Formula has other versions so create an alias:
+ cd #{formula.tap.alias_dir}
+ ln -s #{formula.path.to_s.gsub(formula.tap.path, "..")} #{alias_name}
+ EOS
end
- problem <<-EOS.undent
- Formula has other versions so create an alias:
- cd #{formula.tap.alias_dir}
- ln -s #{formula.path.to_s.gsub(formula.tap.path, "..")} #{alias_name}
- EOS
end
return unless @strict
@@ -1185,6 +1193,10 @@ class FormulaAuditor
problem "'fails_with :llvm' is now a no-op so should be removed"
end
+ if line =~ /system\s+['"](otool|install_name_tool|lipo)/ && formula.name != "cctools"
+ problem "Use ruby-macho instead of calling #{$1}"
+ end
+
if formula.tap.to_s == "homebrew/core"
["OS.mac?", "OS.linux?"].each do |check|
next unless line.include?(check)
diff --git a/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb b/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb
deleted file mode 100644
index 7531ef9cf..000000000
--- a/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb
+++ /dev/null
@@ -1,166 +0,0 @@
-#: @hide_from_man_page
-#: * `boneyard-formula-pr` [`--dry-run`] [`--local`] [`--reason=<reason>`] <formula> :
-#: Creates a pull request to boneyard a formula.
-#:
-#: If `--dry-run` is passed, print what would be done rather than doing it.
-#:
-#: If `--local` is passed, perform only local operations (i.e. don't push or create PR).
-#:
-#: If `--reason=<reason>` is passed, append this to the commit/PR message.
-
-require "formula"
-require "json"
-require "fileutils"
-
-begin
- require "json"
-rescue LoadError
- puts "Homebrew does not provide Ruby dependencies; install with:"
- puts " gem install json"
- odie "Dependency json is not installed."
-end
-
-module Homebrew
- module_function
-
- def boneyard_formula_pr
- local_only = ARGV.include?("--local")
- formula = ARGV.formulae.first
- reason = ARGV.value("reason")
- odie "No formula found!" unless formula
-
- formula_relpath = formula.path.relative_path_from(formula.tap.path)
- formula_file = "#{formula.name}.rb"
- bottle_block = File.read(formula.path).include? " bottle do"
- boneyard_tap = Tap.fetch("homebrew", "boneyard")
- tap_migrations_path = formula.tap.path/"tap_migrations.json"
- if ARGV.dry_run?
- ohai "brew update"
- ohai "brew tap #{boneyard_tap.name}"
- ohai "cd #{formula.tap.path}"
- cd formula.tap.path
- ohai "cp #{formula_relpath} #{boneyard_tap.path}"
- ohai "git rm #{formula_relpath}"
- unless File.exist? tap_migrations_path
- ohai "Creating tap_migrations.json for #{formula.tap.name}"
- ohai "git add #{tap_migrations_path}"
- end
- ohai "Loading tap_migrations.json"
- ohai "Adding #{formula.name} to tap_migrations.json"
- else
- safe_system HOMEBREW_BREW_FILE, "update"
- safe_system HOMEBREW_BREW_FILE, "tap", boneyard_tap.name
- cd formula.tap.path
- cp formula_relpath, boneyard_tap.formula_dir
- safe_system "git", "rm", formula_relpath
- unless File.exist? tap_migrations_path
- tap_migrations_path.write <<-EOS.undent
- {
- }
- EOS
- safe_system "git", "add", tap_migrations_path
- end
- tap_migrations = JSON.parse(File.read(tap_migrations_path))
- tap_migrations[formula.name] = boneyard_tap.name
- tap_migrations = tap_migrations.sort.inject({}) { |acc, elem| acc.merge!(elem[0] => elem[1]) }
- tap_migrations_path.atomic_write(JSON.pretty_generate(tap_migrations) + "\n")
- end
- unless which("hub") || local_only
- if ARGV.dry_run?
- ohai "brew install hub"
- else
- safe_system HOMEBREW_BREW_FILE, "install", "hub"
- end
- end
- branch = "#{formula.name}-boneyard"
-
- reason = " because #{reason}" if reason
-
- if ARGV.dry_run?
- ohai "cd #{formula.tap.path}"
- ohai "git checkout --no-track -b #{branch} origin/master"
- ohai "git commit --no-edit --verbose --message=\"#{formula.name}: migrate to boneyard\" -- #{formula_relpath} #{tap_migrations_path.basename}"
-
- unless local_only
- ohai "hub fork --no-remote"
- ohai "hub fork"
- ohai "hub fork (to read $HUB_REMOTE)"
- ohai "git push $HUB_REMOTE #{branch}:#{branch}"
- ohai "hub pull-request -m $'#{formula.name}: migrate to boneyard\\n\\nCreated with `brew boneyard-formula-pr`#{reason}.'"
- end
-
- ohai "git checkout -"
- else
- cd formula.tap.path
- safe_system "git", "checkout", "--no-track", "-b", branch, "origin/master"
- safe_system "git", "commit", "--no-edit", "--verbose",
- "--message=#{formula.name}: migrate to boneyard",
- "--", formula_relpath, tap_migrations_path.basename
-
- unless local_only
- safe_system "hub", "fork", "--no-remote"
- quiet_system "hub", "fork"
- remote = Utils.popen_read("hub fork 2>&1")[/fatal: remote (.+) already exists\./, 1]
- odie "cannot get remote from 'hub'!" unless remote
- safe_system "git", "push", remote, "#{branch}:#{branch}"
- pr_message = <<-EOS.undent
- #{formula.name}: migrate to boneyard
-
- Created with `brew boneyard-formula-pr`#{reason}.
- EOS
- pr_url = Utils.popen_read("hub", "pull-request", "-m", pr_message).chomp
- end
-
- safe_system "git", "checkout", "-"
- end
-
- if ARGV.dry_run?
- ohai "cd #{boneyard_tap.path}"
- ohai "git checkout --no-track -b #{branch} origin/master"
- if bottle_block
- ohai "Removing bottle block"
- else
- ohai "No bottle block to remove"
- end
- ohai "git add #{formula_file}"
- ohai "git commit --no-edit --verbose --message=\"#{formula.name}: migrate from #{formula.tap.repo}\" -- #{formula_file}"
-
- unless local_only
- ohai "hub fork --no-remote"
- ohai "hub fork"
- ohai "hub fork (to read $HUB_REMOTE)"
- ohai "git push $HUB_REMOTE #{branch}:#{branch}"
- ohai "hub pull-request --browse -m $'#{formula.name}: migrate from #{formula.tap.repo}\\n\\nGoes together with $PR_URL\\n\\nCreated with `brew boneyard-formula-pr`#{reason}.'"
- end
-
- ohai "git checkout -"
- else
- cd boneyard_tap.formula_dir
- safe_system "git", "checkout", "--no-track", "-b", branch, "origin/master"
- if bottle_block
- Utils::Inreplace.inreplace formula_file, / bottle do.+?end\n\n/m, ""
- end
- safe_system "git", "add", formula_file
- safe_system "git", "commit", "--no-edit", "--verbose",
- "--message=#{formula.name}: migrate from #{formula.tap.repo}",
- "--", formula_file
-
- unless local_only
- safe_system "hub", "fork", "--no-remote"
- quiet_system "hub", "fork"
- remote = Utils.popen_read("hub fork 2>&1")[/fatal: remote (.+) already exists\./, 1]
- odie "cannot get remote from 'hub'!" unless remote
- safe_system "git", "push", remote, "#{branch}:#{branch}"
- safe_system "hub", "pull-request", "--browse", "-m", <<-EOS.undent
- #{formula.name}: migrate from #{formula.tap.repo}
-
- Goes together with #{pr_url}.
-
- Created with `brew boneyard-formula-pr`#{reason}.
- EOS
- end
-
- safe_system "git", "checkout", "-"
- end
- end
-end
diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb
index b11da5607..8d3038a5a 100644
--- a/Library/Homebrew/dev-cmd/bottle.rb
+++ b/Library/Homebrew/dev-cmd/bottle.rb
@@ -6,7 +6,7 @@
#: generated DSL. Passing `--keep-old` will attempt to keep it at its
#: original value, while `--no-rebuild` will remove it.
#:
-#: If `--verbose` is passed, print the bottling commands and any warnings
+#: If `--verbose` (or `-v`) is passed, print the bottling commands and any warnings
#: encountered.
#:
#: If `--skip-relocation` is passed, do not check if the bottle can be marked
diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb
index a146f23a8..4e5103910 100644
--- a/Library/Homebrew/dev-cmd/man.rb
+++ b/Library/Homebrew/dev-cmd/man.rb
@@ -106,7 +106,9 @@ module Homebrew
Utils.popen(["ronn", format_flag] + shared_args, "rb+") do |ronn|
ronn.write markup
ronn.close_write
- target.atomic_write ronn.read
+ ronn_output = ronn.read
+ ronn_output.gsub!(%r{</?var>}, "`") if format_flag == "--markdown"
+ target.atomic_write ronn_output
end
end
diff --git a/Library/Homebrew/dev-cmd/test.rb b/Library/Homebrew/dev-cmd/test.rb
index 4898629b0..288aa8a87 100644
--- a/Library/Homebrew/dev-cmd/test.rb
+++ b/Library/Homebrew/dev-cmd/test.rb
@@ -7,7 +7,7 @@
#: To test the development or head version of a formula, use `--devel` or
#: `--HEAD`.
#:
-#: If `--debug` is passed and the test fails, an interactive debugger will be
+#: If `--debug` (or `-d`) is passed and the test fails, an interactive debugger will be
#: launched with access to IRB or a shell inside the temporary test directory.
#:
#: If `--keep-tmp` is passed, the temporary files created for the test are
diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb
index 18e7d96f2..91c7d880b 100644
--- a/Library/Homebrew/dev-cmd/tests.rb
+++ b/Library/Homebrew/dev-cmd/tests.rb
@@ -3,7 +3,7 @@
#: `--only=`<test_script> runs only <test_script>_spec.rb, and `--seed`
#: randomizes tests with the provided value instead of a random seed.
#:
-#: If `--verbose` is passed, print the command that runs the tests.
+#: If `--verbose` (or `-v`) is passed, print the command that runs the tests.
#:
#: If `--coverage` is passed, also generate code coverage reports.
#:
diff --git a/Library/Homebrew/dev-cmd/update-test.rb b/Library/Homebrew/dev-cmd/update-test.rb
index 2ff168669..add05bc7c 100644
--- a/Library/Homebrew/dev-cmd/update-test.rb
+++ b/Library/Homebrew/dev-cmd/update-test.rb
@@ -33,12 +33,24 @@ module Homebrew
elsif date = ARGV.value("before")
Utils.popen_read("git", "rev-list", "-n1", "--before=#{date}", "origin/master").chomp
elsif ARGV.include?("--to-tag")
- Utils.popen_read("git", "tag", "--list", "--sort=-version:refname").lines[1].chomp
+ previous_tag =
+ Utils.popen_read("git", "tag", "--list", "--sort=-version:refname").lines[1]
+ unless previous_tag
+ safe_system "git", "fetch", "--tags", "--depth=1"
+ previous_tag =
+ Utils.popen_read("git", "tag", "--list", "--sort=-version:refname").lines[1]
+ end
+ previous_tag.to_s.chomp
else
Utils.popen_read("git", "rev-parse", "origin/master").chomp
end
+ odie "Could not find start commit!" if start_commit.empty?
+
start_commit = Utils.popen_read("git", "rev-parse", start_commit).chomp
+ odie "Could not find start commit!" if start_commit.empty?
+
end_commit = Utils.popen_read("git", "rev-parse", "HEAD").chomp
+ odie "Could not find end commit!" if end_commit.empty?
puts "Start commit: #{start_commit}"
puts "End commit: #{end_commit}"
diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb
index c8c4b83d2..61cdf2f1a 100644
--- a/Library/Homebrew/diagnostic.rb
+++ b/Library/Homebrew/diagnostic.rb
@@ -753,13 +753,14 @@ module Homebrew
def check_git_version
# https://help.github.com/articles/https-cloning-errors
return unless Utils.git_available?
- return unless Version.create(Utils.git_version) < Version.create("1.7.10")
+ return unless Version.create(Utils.git_version) < Version.create("1.8.5")
git = Formula["git"]
git_upgrade_cmd = git.any_version_installed? ? "upgrade" : "install"
<<-EOS.undent
An outdated version (#{Utils.git_version}) of Git was detected in your PATH.
- Git 1.7.10 or newer is required to perform checkouts over HTTPS from GitHub.
+ Git 1.8.5 or newer is required to perform checkouts over HTTPS from GitHub and
+ to support the 'git -C <path>' option.
Please upgrade:
brew #{git_upgrade_cmd} git
EOS
@@ -794,31 +795,59 @@ module Homebrew
EOS
end
- def check_git_origin
+ def check_brew_git_origin
return if !Utils.git_available? || !(HOMEBREW_REPOSITORY/".git").exist?
origin = HOMEBREW_REPOSITORY.git_origin
if origin.nil?
<<-EOS.undent
- Missing git origin remote.
+ Missing Homebrew/brew git origin remote.
Without a correctly configured origin, Homebrew won't update
properly. You can solve this by adding the Homebrew remote:
- cd #{HOMEBREW_REPOSITORY}
- git remote add origin #{Formatter.url("https://github.com/Homebrew/brew.git")}
+ git -C "#{HOMEBREW_REPOSITORY}" remote add origin #{Formatter.url("https://github.com/Homebrew/brew.git")}
EOS
- elsif origin !~ %r{Homebrew/brew(\.git)?$}
+ elsif origin !~ %r{Homebrew/brew(\.git|/)?$}
<<-EOS.undent
- Suspicious git origin remote found.
+ Suspicious Homebrew/brew git origin remote found.
With a non-standard origin, Homebrew won't pull updates from
the main repository. The current git origin is:
#{origin}
Unless you have compelling reasons, consider setting the
- origin remote to point at the main repository, located at:
- #{Formatter.url("https://github.com/Homebrew/brew.git")}
+ origin remote to point at the main repository by running:
+ git -C "#{HOMEBREW_REPOSITORY}" remote add origin #{Formatter.url("https://github.com/Homebrew/brew.git")}
+ EOS
+ end
+ end
+
+ def check_coretap_git_origin
+ coretap_path = CoreTap.instance.path
+ return if !Utils.git_available? || !(coretap_path/".git").exist?
+
+ origin = coretap_path.git_origin
+
+ if origin.nil?
+ <<-EOS.undent
+ Missing #{CoreTap.instance} git origin remote.
+
+ Without a correctly configured origin, Homebrew won't update
+ properly. You can solve this by adding the Homebrew remote:
+ git -C "#{coretap_path}" remote add origin #{Formatter.url("https://github.com/Homebrew/homebrew-core.git")}
+ EOS
+ elsif origin !~ %r{Homebrew/homebrew-core(\.git|/)?$}
+ <<-EOS.undent
+ Suspicious #{CoreTap.instance} git origin remote found.
+
+ With a non-standard origin, Homebrew won't pull updates from
+ the main repository. The current git origin is:
+ #{origin}
+
+ Unless you have compelling reasons, consider setting the
+ origin remote to point at the main repository by running:
+ git -C "#{coretap_path}" remote add origin #{Formatter.url("https://github.com/Homebrew/homebrew-core.git")}
EOS
end
end
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index 77da4489e..cfdf5e12d 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -363,14 +363,6 @@ class BuildError < RuntimeError
end
end
- if formula.tap && formula.tap.name == "homebrew/boneyard"
- onoe <<-EOS.undent
- #{formula} was moved to homebrew-boneyard because it has unfixable issues.
- Please do not file any issues about this. Sorry!
- EOS
- return
- end
-
if formula.tap && defined?(OS::ISSUES_URL)
if formula.tap.official?
puts Formatter.error(Formatter.url(OS::ISSUES_URL), label: "READ THIS")
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 443619206..523de244d 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -252,12 +252,14 @@ class Formula
public
- # The alias path that was used to install this formula, if present.
+ # The alias path that was used to install this formula, if it exists.
# Can differ from alias_path, which is the alias used to find the formula,
# and is specified to this instance.
def installed_alias_path
path = build.source["path"] if build.is_a?(Tab)
- path if path =~ %r{#{HOMEBREW_TAP_DIR_REGEX}/Aliases}
+ return unless path =~ %r{#{HOMEBREW_TAP_DIR_REGEX}/Aliases}
+ return unless File.symlink?(path)
+ path
end
def installed_alias_name
@@ -1555,6 +1557,8 @@ class Formula
hide.include?(d.name) || d.installed_prefixes.empty?
end
missing_dependencies
+ rescue FormulaUnavailableError
+ []
end
# @private
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index cb9cd9113..d4b9c5d77 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -240,8 +240,9 @@ class Keg
def remove_opt_record
opt_record.unlink
aliases.each do |a|
- next if !opt_record.symlink? && !opt_record.exist?
- (opt_record.parent/a).delete
+ alias_symlink = opt_record.parent/a
+ next if !alias_symlink.symlink? && !alias_symlink.exist?
+ alias_symlink.delete
end
opt_record.parent.rmdir_if_possible
end
diff --git a/Library/Homebrew/migrator.rb b/Library/Homebrew/migrator.rb
index 3eb7f833e..3cb6c5178 100644
--- a/Library/Homebrew/migrator.rb
+++ b/Library/Homebrew/migrator.rb
@@ -77,13 +77,35 @@ class Migrator
# path to newname cellar according to new name
attr_reader :new_cellar
+ # true if new cellar existed at initialization time
+ attr_reader :new_cellar_existed
+
# path to newname pin
attr_reader :new_pin_record
# path to newname keg that will be linked if old_linked_keg isn't nil
attr_reader :new_linked_keg_record
- def initialize(formula)
+ def self.needs_migration?(formula)
+ oldname = formula.oldname
+ return false unless oldname
+ oldname_rack = HOMEBREW_CELLAR/oldname
+ return false if oldname_rack.symlink?
+ return false unless oldname_rack.directory?
+ true
+ end
+
+ def self.migrate_if_needed(formula)
+ return unless Migrator.needs_migration?(formula)
+ begin
+ migrator = Migrator.new(formula)
+ migrator.migrate
+ rescue Exception => e
+ onoe e
+ end
+ end
+
+ def initialize(formula, force: ARGV.force?)
@oldname = formula.oldname
@newname = formula.name
raise MigratorNoOldnameError, formula unless oldname
@@ -95,11 +117,12 @@ class Migrator
@old_tabs = old_cellar.subdirs.map { |d| Tab.for_keg(Keg.new(d)) }
@old_tap = old_tabs.first.tap
- if !ARGV.force? && !from_same_taps?
+ if !force && !from_same_tap_user?
raise MigratorDifferentTapsError.new(formula, old_tap)
end
@new_cellar = HOMEBREW_CELLAR/formula.name
+ @new_cellar_existed = @new_cellar.exist?
if @old_linked_keg = linked_old_linked_keg
@old_linked_keg_record = old_linked_keg.linked_keg_record if old_linked_keg.linked?
@@ -121,15 +144,26 @@ class Migrator
end
end
- def from_same_taps?
- if formula.tap == old_tap
+ def from_same_tap_user?
+ formula_tap_user = formula.tap.user if formula.tap
+ old_tap_user = nil
+
+ new_tap = if old_tap
+ old_tap_user, = old_tap.user
+ if migrate_tap = old_tap.tap_migrations[formula.oldname]
+ new_tap_user, new_tap_repo = migrate_tap.split("/")
+ "#{new_tap_user}/#{new_tap_repo}"
+ end
+ end
+
+ if formula_tap_user == old_tap_user
true
# Homebrew didn't use to update tabs while performing tap-migrations,
# so there can be INSTALL_RECEIPT's containing wrong information about tap,
# so we check if there is an entry about oldname migrated to tap and if
# newname's tap is the same as tap to which oldname migrated, then we
# can perform migrations and the taps for oldname and newname are the same.
- elsif formula.tap && old_tap && formula.tap == old_tap.tap_migrations[formula.oldname]
+ elsif formula.tap && old_tap && formula.tap == new_tap
fix_tabs
true
else
@@ -138,7 +172,10 @@ class Migrator
end
def linked_old_linked_keg
- kegs = old_cellar.subdirs.map { |d| Keg.new(d) }
+ keg_dirs = []
+ keg_dirs += new_cellar.subdirs if new_cellar.exist?
+ keg_dirs += old_cellar.subdirs
+ kegs = keg_dirs.map { |d| Keg.new(d) }
kegs.detect(&:linked?) || kegs.detect(&:optlinked?)
end
@@ -147,47 +184,50 @@ class Migrator
end
def migrate
- if old_cellar.exist? && new_cellar.exist?
+ oh1 "Migrating #{Formatter.identifier(oldname)} to #{Formatter.identifier(newname)}"
+ lock
+ unlink_oldname
+ unlink_newname if new_cellar.exist?
+ repin
+ move_to_new_directory
+ link_oldname_cellar
+ link_oldname_opt
+ link_newname unless old_linked_keg.nil?
+ update_tabs
+ rescue Interrupt
+ ignore_interrupts { backup_oldname }
+ rescue Exception => e
+ onoe "Error occurred while migrating."
+ puts e
+ puts e.backtrace if ARGV.debug?
+ puts "Backing up..."
+ ignore_interrupts { backup_oldname }
+ ensure
+ unlock
+ end
+
+ # move everything from Cellar/oldname to Cellar/newname
+ def move_to_new_directory
+ return unless old_cellar.exist?
+
+ if new_cellar.exist?
conflicted = false
old_cellar.each_child do |c|
- if (new_cellar/c.basename).exist?
+ next unless (new_cellar/c.basename).exist?
+ begin
+ FileUtils.rm_rf c
+ rescue Errno::EACCES
conflicted = true
onoe "#{new_cellar/c.basename} already exists."
end
end
+
if conflicted
- onoe "Remove #{new_cellar} manually and run brew migrate #{oldname}."
- return
+ odie "Remove #{new_cellar} manually and run brew migrate #{oldname}."
end
end
- begin
- oh1 "Migrating #{Formatter.identifier(oldname)} to #{Formatter.identifier(newname)}"
- lock
- unlink_oldname
- unlink_newname if new_cellar.exist?
- move_to_new_directory
- repin
- link_oldname_cellar
- link_oldname_opt
- link_newname unless old_linked_keg.nil?
- update_tabs
- rescue Interrupt
- ignore_interrupts { backup_oldname }
- rescue Exception => e
- onoe "Error occurred while migrating."
- puts e
- puts e.backtrace if ARGV.debug?
- puts "Backuping..."
- ignore_interrupts { backup_oldname }
- ensure
- unlock
- end
- end
-
- # move everything from Cellar/oldname to Cellar/newname
- def move_to_new_directory
- puts "Moving to: #{new_cellar}"
+ oh1 "Moving #{Formatter.identifier(oldname)} children"
if new_cellar.exist?
FileUtils.mv(old_cellar.children, new_cellar)
else
@@ -332,7 +372,7 @@ class Migrator
new_cellar.subdirs.each do |d|
newname_keg = Keg.new(d)
newname_keg.unlink
- newname_keg.uninstall
+ newname_keg.uninstall if new_cellar_existed
end
end
diff --git a/Library/Homebrew/missing_formula.rb b/Library/Homebrew/missing_formula.rb
index 9c1656aa2..5b903b899 100644
--- a/Library/Homebrew/missing_formula.rb
+++ b/Library/Homebrew/missing_formula.rb
@@ -31,7 +31,7 @@ module Homebrew
#{Formatter.url("https://pip.readthedocs.io/en/stable/installing/")}
EOS
when "pil" then <<-EOS.undent
- Instead of PIL, consider `pip install pillow` or `brew install Homebrew/python/pillow`.
+ Instead of PIL, consider `pip install pillow` or `brew install Homebrew/science/pillow`.
EOS
when "macruby" then <<-EOS.undent
MacRuby is not packaged and is on an indefinite development hiatus.
@@ -64,10 +64,6 @@ module Homebrew
and then follow the tutorial:
#{Formatter.url("https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md")}
EOS
- when "osmium" then <<-EOS.undent
- The creator of Osmium requests that it not be packaged and that people
- use the GitHub master branch instead.
- EOS
when "gfortran" then <<-EOS.undent
GNU Fortran is now provided as part of GCC, and can be installed with:
brew install gcc
@@ -105,10 +101,14 @@ module Homebrew
message = nil
Tap.each do |old_tap|
- new_tap_name = old_tap.tap_migrations[name]
- next unless new_tap_name
+ new_tap = old_tap.tap_migrations[name]
+ next unless new_tap
+
+ new_tap_user, new_tap_repo, = new_tap.split("/")
+ new_tap_name = "#{new_tap_user}/#{new_tap_repo}"
+
message = <<-EOS.undent
- It was migrated from #{old_tap} to #{new_tap_name}.
+ It was migrated from #{old_tap} to #{new_tap}.
You can access it again by running:
brew tap #{new_tap_name}
EOS
diff --git a/Library/Homebrew/official_taps.rb b/Library/Homebrew/official_taps.rb
index c7b96ae64..a7bc4a1d6 100644
--- a/Library/Homebrew/official_taps.rb
+++ b/Library/Homebrew/official_taps.rb
@@ -1,11 +1,8 @@
OFFICIAL_TAPS = %w[
apache
- dupes
- fuse
nginx
php
science
- tex
].freeze
OFFICIAL_CMD_TAPS = {
diff --git a/Library/Homebrew/requirements/ruby_requirement.rb b/Library/Homebrew/requirements/ruby_requirement.rb
index 327c13170..acc655924 100644
--- a/Library/Homebrew/requirements/ruby_requirement.rb
+++ b/Library/Homebrew/requirements/ruby_requirement.rb
@@ -11,7 +11,7 @@ class RubyRequirement < Requirement
satisfy(build_env: false) { new_enough_ruby }
env do
- ENV.prepend_path "PATH", new_enough_ruby
+ ENV.prepend_path "PATH", new_enough_ruby.dirname
end
def message
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index fd59539df..db4b1c585 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -100,11 +100,14 @@ class Tab < OpenStruct
def self.for_keg(keg)
path = keg.join(FILENAME)
- if path.exist?
+ tab = if path.exist?
from_file(path)
else
empty
end
+
+ tab["tabfile"] = path
+ tab
end
# Returns a tab for the named formula's installation,
diff --git a/Library/Homebrew/test/cask/dsl_spec.rb b/Library/Homebrew/test/cask/dsl_spec.rb
index 7872b42a6..7eeabcf49 100644
--- a/Library/Homebrew/test/cask/dsl_spec.rb
+++ b/Library/Homebrew/test/cask/dsl_spec.rb
@@ -26,8 +26,6 @@ describe Hbc::DSL, :cask do
.*
Unexpected method 'future_feature' called on Cask unexpected-method-cask\\.
.*
- https://github.com/caskroom/homebrew-cask/blob/master/doc/reporting_bugs/pre_bug_report.md
- .*
https://github.com/caskroom/homebrew-cask#reporting-bugs
EOS
diff --git a/Library/Homebrew/test/cleanup_spec.rb b/Library/Homebrew/test/cleanup_spec.rb
index b0e824767..2c3eddb8c 100644
--- a/Library/Homebrew/test/cleanup_spec.rb
+++ b/Library/Homebrew/test/cleanup_spec.rb
@@ -34,6 +34,39 @@ describe Homebrew::Cleanup do
expect(ds_store).to exist
end
+
+ context "when it can't remove a keg" do
+ let(:f1) { Class.new(Testball) { version "0.1" }.new }
+ let(:f2) { Class.new(Testball) { version "0.2" }.new }
+ let(:unremovable_kegs) { [] }
+
+ before(:each) do
+ described_class.instance_variable_set(:@unremovable_kegs, [])
+ shutup do
+ [f1, f2].each do |f|
+ f.brew do
+ f.install
+ end
+
+ Tab.create(f, DevelopmentTools.default_compiler, :libcxx).write
+ end
+ end
+
+ allow_any_instance_of(Keg)
+ .to receive(:uninstall)
+ .and_raise(Errno::EACCES)
+ end
+
+ it "doesn't remove any kegs" do
+ shutup { described_class.cleanup_formula f2 }
+ expect(f1.installed_kegs.size).to eq(2)
+ end
+
+ it "lists the unremovable kegs" do
+ shutup { described_class.cleanup_formula f2 }
+ expect(described_class.unremovable_kegs).to contain_exactly(f1.installed_kegs[0])
+ end
+ end
end
specify "::cleanup_formula" do
diff --git a/Library/Homebrew/test/cmd/link_spec.rb b/Library/Homebrew/test/cmd/link_spec.rb
index 7b85c96dc..59ab86cc4 100644
--- a/Library/Homebrew/test/cmd/link_spec.rb
+++ b/Library/Homebrew/test/cmd/link_spec.rb
@@ -48,9 +48,11 @@ describe "brew link", :integration_test do
expect { brew "install", "testball1" }.to be_a_success
end
- expect { brew "link", "testball1" }
+ expect { brew "link", "testball1", "SHELL" => "/bin/zsh" }
.to output(/testball1 is keg-only/).to_stderr
- .and output(/Note that doing so can interfere with building software\./).to_stdout
+ .and output(a_string_matching(/Note that doing so can interfere with building software\./)
+ .and(matching("If you need to have this software first in your PATH instead consider running:")
+ .and(including("echo 'export PATH=\"#{HOMEBREW_PREFIX}/opt/testball1/bin:$PATH\"' >> ~/.zshrc")))).to_stdout
.and be_a_success
end
end
diff --git a/Library/Homebrew/test/cmd/outdated_spec.rb b/Library/Homebrew/test/cmd/outdated_spec.rb
index 2ce0825e8..65cce27c3 100644
--- a/Library/Homebrew/test/cmd/outdated_spec.rb
+++ b/Library/Homebrew/test/cmd/outdated_spec.rb
@@ -1,11 +1,87 @@
describe "brew outdated", :integration_test do
- it "prints outdated Formulae" do
- setup_test_formula "testball"
- (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
-
- expect { brew "outdated" }
- .to output("testball\n").to_stdout
- .and not_to_output.to_stderr
- .and be_a_success
+ context "quiet output" do
+ it "prints outdated Formulae" do
+ setup_test_formula "testball"
+ (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
+
+ expect { brew "outdated" }
+ .to output("testball\n").to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+ end
+
+ context "verbose output" do
+ it "prints out the installed and newer versions" do
+ setup_test_formula "testball"
+ (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
+
+ expect { brew "outdated", "--verbose" }
+ .to output("testball (0.0.1) < 0.1\n").to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+ end
+
+ context "pinned formula, verbose output" do
+ it "prints out the pinned version" do
+ setup_test_formula "testball"
+ (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
+
+ shutup do
+ expect { brew "pin", "testball" }.to be_a_success
+ end
+
+ expect { brew "outdated", "--verbose" }
+ .to output("testball (0.0.1) < 0.1 [pinned at 0.0.1]\n").to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+ end
+
+ context "json output" do
+ it "includes pinned version in the json output" do
+ setup_test_formula "testball"
+ (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
+
+ shutup do
+ expect { brew "pin", "testball" }.to be_a_success
+ end
+
+ expected_json = [
+ {
+ name: "testball",
+ installed_versions: ["0.0.1"],
+ current_version: "0.1",
+ pinned: true,
+ pinned_version: "0.0.1",
+ },
+ ].to_json
+
+ expect { brew "outdated", "--json=v1" }
+ .to output(expected_json + "\n").to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+
+ it "has no pinned version when the formula isn't pinned" do
+ setup_test_formula "testball"
+ (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
+
+ expected_json = [
+ {
+ name: "testball",
+ installed_versions: ["0.0.1"],
+ current_version: "0.1",
+ pinned: false,
+ pinned_version: nil,
+ },
+ ].to_json
+
+ expect { brew "outdated", "--json=v1" }
+ .to output(expected_json + "\n").to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
end
end
diff --git a/Library/Homebrew/test/formula_installer_spec.rb b/Library/Homebrew/test/formula_installer_spec.rb
index f5218db73..efe2bf5a2 100644
--- a/Library/Homebrew/test/formula_installer_spec.rb
+++ b/Library/Homebrew/test/formula_installer_spec.rb
@@ -159,6 +159,13 @@ describe FormulaInstaller do
it { is_expected.to be false }
end
+ context "it returns false when requirement is satisfied but default formula is installed" do
+ let(:satisfied?) { true }
+ let(:satisfied_by_formula?) { false }
+ let(:installed?) { true }
+ it { is_expected.to be false }
+ end
+
context "it returns true when requirement isn't satisfied" do
let(:satisfied?) { false }
let(:satisfied_by_formula?) { false }
diff --git a/Library/Homebrew/test/formula_spec.rb b/Library/Homebrew/test/formula_spec.rb
index 1e064912f..2309c36fb 100644
--- a/Library/Homebrew/test/formula_spec.rb
+++ b/Library/Homebrew/test/formula_spec.rb
@@ -129,6 +129,8 @@ describe Formula do
alias_name = "bar"
alias_path = "#{CoreTap.instance.alias_dir}/#{alias_name}"
+ CoreTap.instance.alias_dir.mkpath
+ FileUtils.ln_sf f.path, alias_path
f.build = Tab.new(source: { "path" => alias_path })
@@ -160,6 +162,8 @@ describe Formula do
alias_name = "bar"
full_alias_name = "#{tap.user}/#{tap.repo}/#{alias_name}"
alias_path = "#{tap.alias_dir}/#{alias_name}"
+ tap.alias_dir.mkpath
+ FileUtils.ln_sf f.path, alias_path
f.build = Tab.new(source: { "path" => alias_path })
@@ -168,6 +172,8 @@ describe Formula do
expect(f.full_installed_alias_name).to eq(full_alias_name)
expect(f.installed_specified_name).to eq(alias_name)
expect(f.full_installed_specified_name).to eq(full_alias_name)
+
+ FileUtils.rm_rf HOMEBREW_LIBRARY/"Taps/user"
end
specify "#prefix" do
@@ -402,6 +408,8 @@ describe Formula do
url "foo-1.0"
end
f.build = Tab.new(source: { "path" => source_path.to_s })
+ CoreTap.instance.alias_dir.mkpath
+ FileUtils.ln_sf f.path, source_path
expect(f.alias_path).to eq(alias_path)
expect(f.installed_alias_path).to eq(source_path.to_s)
@@ -443,6 +451,9 @@ describe Formula do
allow(described_class).to receive(:installed).and_return(formulae)
+ CoreTap.instance.alias_dir.mkpath
+ FileUtils.ln_sf formula_with_alias.path, alias_path
+
expect(described_class.installed_with_alias_path(alias_path))
.to eq([formula_with_alias])
end
@@ -940,6 +951,9 @@ describe Formula do
tab.source["path"] = alias_path
stub_formula_loader(f, alias_path)
+ CoreTap.instance.alias_dir.mkpath
+ FileUtils.ln_sf f.path, alias_path
+
expect(f.current_installed_alias_target).to eq(f)
expect(f.latest_formula).to eq(f)
expect(f).not_to have_changed_installed_alias_target
@@ -952,6 +966,9 @@ describe Formula do
tab.source["path"] = alias_path
stub_formula_loader(new_formula, alias_path)
+ CoreTap.instance.alias_dir.mkpath
+ FileUtils.ln_sf new_formula.path, alias_path
+
expect(f.current_installed_alias_target).to eq(new_formula)
expect(f.latest_formula).to eq(new_formula)
expect(f).to have_changed_installed_alias_target
@@ -964,6 +981,9 @@ describe Formula do
tab.source["path"] = alias_path
stub_formula_loader(new_formula, alias_path)
+ CoreTap.instance.alias_dir.mkpath
+ FileUtils.ln_sf new_formula.path, alias_path
+
expect(new_formula.current_installed_alias_target).to eq(new_formula)
expect(new_formula.latest_formula).to eq(new_formula)
expect(new_formula).not_to have_changed_installed_alias_target
@@ -1050,6 +1070,10 @@ describe Formula do
f.follow_installed_alias = true
f.build = setup_tab_for_prefix(same_prefix, path: alias_path)
stub_formula_loader(new_formula, alias_path)
+
+ CoreTap.instance.alias_dir.mkpath
+ FileUtils.ln_sf new_formula.path, alias_path
+
expect(f.outdated_kegs).not_to be_empty
end
@@ -1088,6 +1112,10 @@ describe Formula do
tab = setup_tab_for_prefix(old_alias_target_prefix, path: alias_path)
old_formula.build = tab
allow(described_class).to receive(:installed).and_return([old_formula])
+
+ CoreTap.instance.alias_dir.mkpath
+ FileUtils.ln_sf f.path, alias_path
+
expect(f.outdated_kegs).not_to be_empty
end
diff --git a/Library/Homebrew/test/missing_formula_spec.rb b/Library/Homebrew/test/missing_formula_spec.rb
index f395965a6..215cf17f7 100644
--- a/Library/Homebrew/test/missing_formula_spec.rb
+++ b/Library/Homebrew/test/missing_formula_spec.rb
@@ -88,14 +88,6 @@ describe Homebrew::MissingFormula do
it { is_expected.to be_blacklisted }
end
- context "osmium" do
- %w[osmium Osmium].each do |s|
- subject { s }
-
- it { is_expected.to be_blacklisted }
- end
- end
-
context "gfortran" do
subject { "gfortran" }
diff --git a/Library/Homebrew/test/tab_spec.rb b/Library/Homebrew/test/tab_spec.rb
index fec390c28..1b0836c93 100644
--- a/Library/Homebrew/test/tab_spec.rb
+++ b/Library/Homebrew/test/tab_spec.rb
@@ -258,7 +258,7 @@ describe Tab do
it "can create a Tab for a non-existant Keg" do
f.prefix.mkpath
- expect(subject.tabfile).to be nil
+ expect(subject.tabfile).to eq(f_tab_path)
end
end
diff --git a/completions/zsh/_brew b/completions/zsh/_brew
index 04cf56f70..970b4f899 100644
--- a/completions/zsh/_brew
+++ b/completions/zsh/_brew
@@ -205,14 +205,6 @@ _brew_audit() {
'*:formula:__brew_formulae'
}
-# brew boneyard-formula-pr [--dry-run] [--local] formula-name
-_brew_boneyard_formula_pr() {
- _arguments \
- '--dry-run[print what would be done rather than doing it]' \
- '--local[perform only local operations(i.e. don''t push or create PR)]' \
- ':formula:__brew_formulae'
-}
-
# brew bottle [--verbose] [--no-rebuild] [--keep-old] [--skip-relocation] [--root-url=root_url]
# brew bottle --merge [--no-commit] [--keep-old] [--write]
# TODO missing argument docs
diff --git a/docs/External-Commands.md b/docs/External-Commands.md
index 7cc7380a0..e1178ceda 100644
--- a/docs/External-Commands.md
+++ b/docs/External-Commands.md
@@ -31,6 +31,12 @@ A shell script for a command named `extcmd` should be named `brew-extcmd`. This
Note that the script itself can use any suitable shebang (`#!`) line, so an external “shell script” can be written for sh, bash, Ruby, or anything else.
+## Providing `--help`
+
+All internal and external Homebrew commands can provide styled `--help` output by using lines starting with `#:` (a comment then `:` character in both Bash and Ruby) which are then output by `--help`.
+
+For example, see the [header of `brew services`](https://github.com/Homebrew/homebrew-services/blob/a5115e47b05e8d2a632ba7775599e698b240e5a2/cmd/brew-services.rb#L1-L31) which is output with `brew services --help`.
+
## User-submitted commands
These commands have been contributed by Homebrew users but are not included in the main Homebrew repository, nor are they installed by the installer script. You can install them manually, as outlined above.
diff --git a/docs/FAQ.md b/docs/FAQ.md
index 563a59ba0..4fe11530e 100644
--- a/docs/FAQ.md
+++ b/docs/FAQ.md
@@ -174,11 +174,11 @@ If it’s been a while, bump it with a “bump” comment. Sometimes we miss req
Yes! It’s easy! Just `brew edit <formula>`. You don’t have to submit modifications back to `homebrew/core`, just edit the formula as you personally need it and `brew install`. As a bonus `brew update` will merge your changes with upstream so you can still keep the formula up-to-date **with** your personal modifications!
## Can I make new formulae?
-Yes! It’s easy! Just `brew create URL`. Homebrew will then open the
-formula in `EDITOR` so you can edit it, but it probably already
-installs; try it: `brew install <formula>`. If you encounter any issues,
-run the command with the `-d` switch like so: `brew install -d <formula>`,
-which drops you into a debugging shell.
+Yes! It’s easy! Just `brew create URL`. Homebrew will then open the formula in
+`EDITOR` so you can edit it, but it probably already installs; try it: `brew
+install <formula>`. If you encounter any issues, run the command with the
+`--debug` switch like so: `brew install --debug <formula>`, which drops you
+into a debugging shell.
If you want your new formula to be part of `homebrew/core` or want
to learn more about writing formulae, then please read the [Formula Cookbook](Formula-Cookbook.md).
diff --git a/docs/Formula-Cookbook.md b/docs/Formula-Cookbook.md
index aa3e5f23d..38874ddb0 100644
--- a/docs/Formula-Cookbook.md
+++ b/docs/Formula-Cookbook.md
@@ -90,7 +90,7 @@ Try to summarize from the [`homepage`](http://www.rubydoc.info/github/Homebrew/b
### Check the build system
```sh
-brew install -i foo
+brew install --interactive foo
```
You’re now at a new prompt with the tarball extracted to a temporary sandbox.
diff --git a/docs/Interesting-Taps-&-Forks.md b/docs/Interesting-Taps-&-Forks.md
index 317551c68..54f6de25e 100644
--- a/docs/Interesting-Taps-&-Forks.md
+++ b/docs/Interesting-Taps-&-Forks.md
@@ -1,37 +1,19 @@
# Interesting Taps & Forks
A _tap_ is homebrew-speak for a Git repository containing extra formulae.
-Homebrew has the capability to add (and remove) multiple taps to your local installation with the `brew tap` and `brew untap` commands. Type `man brew` in your Terminal. The main repository <https://github.com/Homebrew/homebrew-core>, often called `homebrew/core`, is always built-in.
+Homebrew has the capability to add (and remove) multiple taps to your local installation with the `brew tap` and `brew untap` commands. Type `man brew` in your Terminal. The main repository [https://github.com/Homebrew/homebrew-core](https://github.com/Homebrew/homebrew-core), often called `homebrew/core`, is always built-in.
## Main taps
* [homebrew/apache](https://github.com/Homebrew/homebrew-apache): A tap for Apache modules, extending macOS's built-in Apache. These brews may require unconventional additional setup, as explained in the caveats.
-* [homebrew/boneyard](https://github.com/Homebrew/homebrew-boneyard): Formulae from other official taps, primarily `homebrew/core` are not deleted, they are moved here.
-
-* [homebrew/bundle](https://github.com/Homebrew/homebrew-bundle): Bundler for non-Ruby dependencies from Homebrew.
-
-* [homebrew/completions](https://github.com/Homebrew/homebrew-completions): Shell completion formulae.
-
-* [homebrew/dupes](https://github.com/Homebrew/homebrew-dupes): Need GDB or a newer Tk? System duplicates go here.
-
-* [homebrew/emacs](https://github.com/Homebrew/homebrew-emacs): A tap for Emacs packages.
-
-* [homebrew/games](https://github.com/Homebrew/homebrew-games): Game or gaming-emulation related formulae.
-
* [homebrew/nginx](https://github.com/Homebrew/homebrew-nginx): Feature rich Nginx tap for modules.
* [homebrew/php](https://github.com/Homebrew/homebrew-php): Repository for php-related formulae.
-* [homebrew/python](https://github.com/Homebrew/homebrew-python): A few Python formulae that do not build well with `pip` alone.
-
* [homebrew/science](https://github.com/Homebrew/homebrew-science): A collection of scientific libraries and tools.
-* [homebrew/services](https://github.com/Homebrew/homebrew-services): A tool to start Homebrew formulae's plists with `launchctl`.
-
-* [homebrew/x11](https://github.com/Homebrew/homebrew-x11): Formulae with hard X11 dependencies.
-
-`brew search` looks in these main taps as well as in [homebrew/core](https://github.com/Homebrew/homebrew-core). So don't worry about missing stuff. We will add other taps to the search as they become well maintained and popular.
+`brew search` looks in these taps as well as in [homebrew/core](https://github.com/Homebrew/homebrew-core) so don't worry about missing stuff.
You can be added as a maintainer for one of the Homebrew organization taps and aid the project! If you are interested write to our list: homebrew-discuss@googlegroups.com. We want your help!
@@ -47,6 +29,8 @@ You can be added as a maintainer for one of the Homebrew organization taps and a
* [titanous/gnuradio](https://github.com/titanous/homebrew-gnuradio): GNU Radio and friends running on macOS.
+* [dunn/emacs](https://github.com/dunn/homebrew-emacs): A tap for Emacs packages.
+
## Interesting forks
* [mistydemeo/tigerbrew](https://github.com/mistydemeo/tigerbrew): Experimental Tiger PowerPC version
diff --git a/docs/Manpage.md b/docs/Manpage.md
index 8401248ae..23e338213 100644
--- a/docs/Manpage.md
+++ b/docs/Manpage.md
@@ -4,7 +4,7 @@ brew(1) -- The missing package manager for macOS
## SYNOPSIS
`brew` `--version`<br>
-`brew` <var>command</var> [`--verbose`|`-v`] [<var>options</var>] [<var>formula</var>] ...
+`brew` `command` [`--verbose`|`-v`] [`options`] [`formula`] ...
## DESCRIPTION
@@ -17,11 +17,11 @@ For the full command list, see the [COMMANDS][] section.
With `--verbose` or `-v`, many commands print extra debugging information. Note that these flags should only appear after a command.
- * `install` <var>formula</var>:
- Install <var>formula</var>.
+ * `install` `formula`:
+ Install `formula`.
- * `uninstall` <var>formula</var>:
- Uninstall <var>formula</var>.
+ * `uninstall` `formula`:
+ Uninstall `formula`.
* `update`:
Fetch the newest version of Homebrew from GitHub using `git`(1).
@@ -29,10 +29,10 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `list`:
List all installed formulae.
- * `search` (<var>text</var>|`/`<var>text</var>`/`):
- Perform a substring search of formula names for <var>text</var>. If <var>text</var> is
+ * `search` (`text`|`/``text``/`):
+ Perform a substring search of formula names for `text`. If `text` is
surrounded with slashes, then it is interpreted as a regular expression.
- The search for <var>text</var> is extended online to some popular taps.
+ The search for `text` is extended online to some popular taps.
If no search term is given, all locally available formulae are listed.
## COMMANDS
@@ -47,14 +47,14 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `analytics` `regenerate-uuid`:
Regenerate UUID used in Homebrew's analytics.
- * `cat` <var>formula</var>:
- Display the source to <var>formula</var>.
+ * `cat` `formula`:
+ Display the source to `formula`.
- * `cleanup` [`--prune=`<var>days</var>] [`--dry-run`] [`-s`] [<var>formulae</var>]:
+ * `cleanup` [`--prune=``days`] [`--dry-run`] [`-s`] [`formulae`]:
For all installed or specific formulae, remove any older versions from the
cellar. In addition, old downloads from the Homebrew download-cache are deleted.
- If `--prune=`<var>days</var> is specified, remove all cache files older than <var>days</var>.
+ If `--prune=``days` is specified, remove all cache files older than `days`.
If `--dry-run` or `-n` is passed, show what would be removed, but do not
actually remove anything.
@@ -63,8 +63,8 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
versions of formulae. Note downloads for any installed formulae will still not be
deleted. If you want to delete those too: `rm -rf $(brew --cache)`
- * `command` <var>cmd</var>:
- Display the path to the file which is used when invoking `brew` <var>cmd</var>.
+ * `command` `cmd`:
+ Display the path to the file which is used when invoking `brew` `cmd`.
* `commands` [`--quiet` [`--include-aliases`]]:
Show a list of built-in and external commands.
@@ -77,16 +77,16 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
a bug report, you will likely be asked for this information if you do not
provide it.
- * `deps` [`--1`] [`-n`] [`--union`] [`--full-name`] [`--installed`] [`--include-build`] [`--include-optional`] [`--skip-recommended`] <var>formulae</var>:
- Show dependencies for <var>formulae</var>. When given multiple formula arguments,
- show the intersection of dependencies for <var>formulae</var>.
+ * `deps` [`--1`] [`-n`] [`--union`] [`--full-name`] [`--installed`] [`--include-build`] [`--include-optional`] [`--skip-recommended`] `formulae`:
+ Show dependencies for `formulae`. When given multiple formula arguments,
+ show the intersection of dependencies for `formulae`.
If `--1` is passed, only show dependencies one level down, instead of
recursing.
If `-n` is passed, show dependencies in topological order.
- If `--union` is passed, show the union of dependencies for <var>formulae</var>,
+ If `--union` is passed, show the union of dependencies for `formulae`,
instead of the intersection.
If `--full-name` is passed, list dependencies by their full name.
@@ -95,43 +95,43 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
currently installed.
By default, `deps` shows required and recommended dependencies for
- <var>formulae</var>. To include the `:build` type dependencies, pass `--include-build`.
+ `formulae`. To include the `:build` type dependencies, pass `--include-build`.
Similarly, pass `--include-optional` to include `:optional` dependencies.
To skip `:recommended` type dependencies, pass `--skip-recommended`.
- * `deps` `--tree` [<var>filters</var>] (<var>formulae</var>|`--installed`):
+ * `deps` `--tree` [`filters`] (`formulae`|`--installed`):
Show dependencies as a tree. When given multiple formula arguments, output
individual trees for every formula.
If `--installed` is passed, output a tree for every installed formula.
- The <var>filters</var> placeholder is any combination of options `--include-build`,
+ The `filters` placeholder is any combination of options `--include-build`,
`--include-optional`, and `--skip-recommended` as documented above.
- * `deps` [<var>filters</var>] (`--installed`|`--all`):
+ * `deps` [`filters`] (`--installed`|`--all`):
Show dependencies for installed or all available formulae. Every line of
output starts with the formula name, followed by a colon and all direct
dependencies of that formula.
- The <var>filters</var> placeholder is any combination of options `--include-build`,
+ The `filters` placeholder is any combination of options `--include-build`,
`--include-optional`, and `--skip-recommended` as documented above.
- * `desc` <var>formula</var>:
- Display <var>formula</var>'s name and one-line description.
+ * `desc` `formula`:
+ Display `formula`'s name and one-line description.
- * `desc` [`-s`|`-n`|`-d`] (<var>text</var>|`/`<var>text</var>`/`):
+ * `desc` [`-s`|`-n`|`-d`] (`text`|`/``text``/`):
Search both name and description (`-s`), just the names (`-n`), or just the
- descriptions (`-d`) for <var>text</var>. If <var>text</var> is flanked by slashes, it is interpreted
+ descriptions (`-d`) for `text`. If `text` is flanked by slashes, it is interpreted
as a regular expression. Formula descriptions are cached; the cache is created on
the first search, making that search slower than subsequent ones.
- * `diy` [`--name=`<var>name</var>] [`--version=`<var>version</var>]:
+ * `diy` [`--name=``name`] [`--version=``version`]:
Automatically determine the installation prefix for non-Homebrew software.
Using the output from this command, you can install your own software into
the Cellar and then link it into Homebrew's prefix with `brew link`.
- The options `--name=`<var>name</var> and `--version=`<var>version</var> each take an argument
+ The options `--name=``name` and `--version=``version` each take an argument
and allow you to explicitly set the name and version of the package you are
installing.
@@ -139,8 +139,8 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
Check your system for potential problems. Doctor exits with a non-zero status
if any problems are found.
- * `fetch` [`--force`] [`--retry`] [`-v`] [`--devel`|`--HEAD`] [`--deps`] [`--build-from-source`|`--force-bottle`] <var>formulae</var>:
- Download the source packages for the given <var>formulae</var>.
+ * `fetch` [`--force`] [`--retry`] [`-v`] [`--devel`|`--HEAD`] [`--deps`] [`--build-from-source`|`--force-bottle`] `formulae`:
+ Download the source packages for the given `formulae`.
For tarballs, also print SHA-256 checksums.
If `--HEAD` or `--devel` is passed, fetch that version instead of the
@@ -149,24 +149,24 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `-v` is passed, do a verbose VCS checkout, if the URL represents a VCS.
This is useful for seeing if an existing VCS cache has been updated.
- If `--force` is passed, remove a previously cached version and re-fetch.
+ If `--force` (or `-f`) is passed, remove a previously cached version and re-fetch.
If `--retry` is passed, retry if a download fails or re-download if the
checksum of a previously cached version no longer matches.
- If `--deps` is passed, also download dependencies for any listed <var>formulae</var>.
+ If `--deps` is passed, also download dependencies for any listed `formulae`.
- If `--build-from-source` is passed, download the source rather than a
+ If `--build-from-source` (or `-s`) is passed, download the source rather than a
bottle.
If `--force-bottle` is passed, download a bottle if it exists for the
current or newest version of macOS, even if it would not be used during
installation.
- * `gist-logs` [`--new-issue`|`-n`] <var>formula</var>:
- Upload logs for a failed build of <var>formula</var> to a new Gist.
+ * `gist-logs` [`--new-issue`|`-n`] `formula`:
+ Upload logs for a failed build of `formula` to a new Gist.
- <var>formula</var> is usually the name of the formula to install, but it can be specified
+ `formula` is usually the name of the formula to install, but it can be specified
in several different ways. See [SPECIFYING FORMULAE][].
If `--new-issue` is passed, automatically create a new issue in the appropriate
@@ -177,20 +177,20 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `home`:
Open Homebrew's own homepage in a browser.
- * `home` <var>formula</var>:
- Open <var>formula</var>'s homepage in a browser.
+ * `home` `formula`:
+ Open `formula`'s homepage in a browser.
- * `info` <var>formula</var>:
- Display information about <var>formula</var>.
+ * `info` `formula`:
+ Display information about `formula`.
- * `info` `--github` <var>formula</var>:
- Open a browser to the GitHub History page for formula <var>formula</var>.
+ * `info` `--github` `formula`:
+ Open a browser to the GitHub History page for formula `formula`.
- To view formula history locally: `brew log -p <var>formula</var>`
+ To view formula history locally: `brew log -p `formula``
- * `info` `--json=`<var>version</var> (`--all`|`--installed`|<var>formulae</var>):
- Print a JSON representation of <var>formulae</var>. Currently the only accepted value
- for <var>version</var> is `v1`.
+ * `info` `--json=``version` (`--all`|`--installed`|`formulae`):
+ Print a JSON representation of `formulae`. Currently the only accepted value
+ for `version` is `v1`.
Pass `--all` to get information on all formulae, or `--installed` to get
information on all installed formulae.
@@ -198,13 +198,13 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
See the docs for examples of using the JSON output:
<http://docs.brew.sh/Querying-Brew.html>
- * `install` [`--debug`] [`--env=`(`std`|`super`)] [`--ignore-dependencies`|`--only-dependencies`] [`--cc=`<var>compiler</var>] [`--build-from-source`|`--force-bottle`] [`--devel`|`--HEAD`] [`--keep-tmp`] [`--build-bottle`] <var>formula</var>:
- Install <var>formula</var>.
+ * `install` [`--debug`] [`--env=`(`std`|`super`)] [`--ignore-dependencies`|`--only-dependencies`] [`--cc=``compiler`] [`--build-from-source`|`--force-bottle`] [`--devel`|`--HEAD`] [`--keep-tmp`] [`--build-bottle`] `formula`:
+ Install `formula`.
- <var>formula</var> is usually the name of the formula to install, but it can be specified
+ `formula` is usually the name of the formula to install, but it can be specified
in several different ways. See [SPECIFYING FORMULAE][].
- If `--debug` is passed and brewing fails, open an interactive debugging
+ If `--debug` (or `-d`) is passed and brewing fails, open an interactive debugging
session with access to IRB or a shell inside the temporary build directory.
If `--env=std` is passed, use the standard build environment instead of superenv.
@@ -219,26 +219,26 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--only-dependencies` is passed, install the dependencies with specified
options but do not install the specified formula.
- If `--cc=`<var>compiler</var> is passed, attempt to compile using <var>compiler</var>.
- <var>compiler</var> should be the name of the compiler's executable, for instance
+ If `--cc=``compiler` is passed, attempt to compile using `compiler`.
+ `compiler` should be the name of the compiler's executable, for instance
`gcc-4.2` for Apple's GCC 4.2, or `gcc-4.9` for a Homebrew-provided GCC
4.9.
- If `--build-from-source` or `-s` is passed, compile the specified <var>formula</var> from
+ If `--build-from-source` (or `-s`) is passed, compile the specified `formula` from
source even if a bottle is provided. Dependencies will still be installed
from bottles if they are available.
If `HOMEBREW_BUILD_FROM_SOURCE` is set, regardless of whether `--build-from-source` was
- passed, then both <var>formula</var> and the dependencies installed as part of this process
+ passed, then both `formula` and the dependencies installed as part of this process
are built from source even if bottles are available.
If `--force-bottle` is passed, install from a bottle if it exists for the
current or newest version of macOS, even if it would not normally be used
for installation.
- If `--devel` is passed, and <var>formula</var> defines it, install the development version.
+ If `--devel` is passed, and `formula` defines it, install the development version.
- If `--HEAD` is passed, and <var>formula</var> defines it, install the HEAD version,
+ If `--HEAD` is passed, and `formula` defines it, install the HEAD version,
aka master, trunk, unstable.
If `--keep-tmp` is passed, the temporary files created during installation
@@ -247,12 +247,13 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--build-bottle` is passed, prepare the formula for eventual bottling
during installation.
- * `install` `--interactive` [`--git`] <var>formula</var>:
- Download and patch <var>formula</var>, then open a shell. This allows the user to
- run `./configure --help` and otherwise determine how to turn the software
- package into a Homebrew formula.
+ * `install` `--interactive` [`--git`] `formula`:
+ If `--interactive` (or `-i`) is passed, download and patch `formula`, then
+ open a shell. This allows the user to run `./configure --help` and
+ otherwise determine how to turn the software package into a Homebrew
+ formula.
- If `--git` is passed, Homebrew will create a Git repository, useful for
+ If `--git` (or `-g`) is passed, Homebrew will create a Git repository, useful for
creating patches to the software.
* `irb` [`--examples`]:
@@ -263,8 +264,8 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `leaves`:
Show installed formulae that are not dependencies of another installed formula.
- * `ln`, `link` [`--overwrite`] [`--dry-run`] [`--force`] <var>formula</var>:
- Symlink all of <var>formula</var>'s installed files into the Homebrew prefix. This
+ * `ln`, `link` [`--overwrite`] [`--dry-run`] [`--force`] `formula`:
+ Symlink all of `formula`'s installed files into the Homebrew prefix. This
is done automatically when you install formulae but can be useful for DIY
installations.
@@ -275,9 +276,9 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
be linked or which would be deleted by `brew link --overwrite`, but will not
actually link or delete any files.
- If `--force` is passed, Homebrew will allow keg-only formulae to be linked.
+ If `--force` (or `-f`) is passed, Homebrew will allow keg-only formulae to be linked.
- * `linkapps` [`--local`] [<var>formulae</var>]:
+ * `linkapps` [`--local`] [`formulae`]:
Find installed formulae that provide `.app`-style macOS apps and symlink them
into `/Applications`, allowing for easier access (deprecated).
@@ -286,7 +287,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
bundles that can be relocated. Instead, please consider using `brew cask` and
migrate formulae using `.app`s to casks.
- If no <var>formulae</var> are provided, all of them will have their apps symlinked.
+ If no `formulae` are provided, all of them will have their apps symlinked.
If provided, `--local` will symlink them into the user's `~/Applications`
directory instead of the system directory.
@@ -299,38 +300,38 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `list`, `ls` `--unbrewed`:
List all files in the Homebrew prefix not installed by Homebrew.
- * `list`, `ls` [`--versions` [`--multiple`]] [`--pinned`] [<var>formulae</var>]:
- List the installed files for <var>formulae</var>. Combined with `--verbose`, recursively
- list the contents of all subdirectories in each <var>formula</var>'s keg.
+ * `list`, `ls` [`--versions` [`--multiple`]] [`--pinned`] [`formulae`]:
+ List the installed files for `formulae`. Combined with `--verbose`, recursively
+ list the contents of all subdirectories in each `formula`'s keg.
If `--versions` is passed, show the version number for installed formulae,
- or only the specified formulae if <var>formulae</var> are given. With `--multiple`,
+ or only the specified formulae if `formulae` are given. With `--multiple`,
only show formulae with multiple versions installed.
If `--pinned` is passed, show the versions of pinned formulae, or only the
- specified (pinned) formulae if <var>formulae</var> are given.
+ specified (pinned) formulae if `formulae` are given.
See also `pin`, `unpin`.
- * `log` [<var>git-log-options</var>] <var>formula</var> ...:
+ * `log` [`git-log-options`] `formula` ...:
Show the git log for the given formulae. Options that `git-log`(1)
recognizes can be passed before the formula list.
- * `migrate` [`--force`] <var>formulae</var>:
- Migrate renamed packages to new name, where <var>formulae</var> are old names of
+ * `migrate` [`--force`] `formulae`:
+ Migrate renamed packages to new name, where `formulae` are old names of
packages.
- If `--force` is passed, then treat installed <var>formulae</var> and passed <var>formulae</var>
+ If `--force` (or `-f`) is passed, then treat installed `formulae` and passed `formulae`
like if they are from same taps and migrate them anyway.
- * `missing` [`--hide=`<var>hidden</var>] [<var>formulae</var>]:
- Check the given <var>formulae</var> for missing dependencies. If no <var>formulae</var> are
+ * `missing` [`--hide=``hidden`] [`formulae`]:
+ Check the given `formulae` for missing dependencies. If no `formulae` are
given, check all installed brews.
- If `--hide=`<var>hidden</var> is passed, act as if none of <var>hidden</var> are installed.
- <var>hidden</var> should be a comma-separated list of formulae.
+ If `--hide=``hidden` is passed, act as if none of `hidden` are installed.
+ `hidden` should be a comma-separated list of formulae.
- * `options` [`--compact`] (`--all`|`--installed`|<var>formulae</var>):
- Display install options specific to <var>formulae</var>.
+ * `options` [`--compact`] (`--all`|`--installed`|`formulae`):
+ Display install options specific to `formulae`.
If `--compact` is passed, show all options on a single line separated by
spaces.
@@ -339,7 +340,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--installed` is passed, show options for all installed formulae.
- * `outdated` [`--quiet`|`--verbose`|`--json=`<var>version</var>] [`--fetch-HEAD`]:
+ * `outdated` [`--quiet`|`--verbose`|`--json=``version`] [`--fetch-HEAD`]:
Show formulae that have an updated version available.
By default, version information is displayed in interactive shells, and
@@ -348,9 +349,9 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--quiet` is passed, list only the names of outdated brews (takes
precedence over `--verbose`).
- If `--verbose` is passed, display detailed version information.
+ If `--verbose` (or `-v`) is passed, display detailed version information.
- If `--json=`<var>version</var> is passed, the output will be in JSON format. The only
+ If `--json=``version` is passed, the output will be in JSON format. The only
valid version is `v1`.
If `--fetch-HEAD` is passed, fetch the upstream repository to detect if
@@ -358,12 +359,12 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
repository's HEAD will be checked for updates when a new stable or devel
version has been released.
- * `pin` <var>formulae</var>:
- Pin the specified <var>formulae</var>, preventing them from being upgraded when
+ * `pin` `formulae`:
+ Pin the specified `formulae`, preventing them from being upgraded when
issuing the `brew upgrade` command. See also `unpin`.
- * `postinstall` <var>formula</var>:
- Rerun the post-install steps for <var>formula</var>.
+ * `postinstall` `formula`:
+ Rerun the post-install steps for `formula`.
* `prune` [`--dry-run`]:
Remove dead symlinks from the Homebrew prefix. This is generally not
@@ -374,23 +375,23 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--dry-run` or `-n` is passed, show what would be removed, but do not
actually remove anything.
- * `reinstall` <var>formula</var>:
- Uninstall and then install <var>formula</var>.
+ * `reinstall` `formula`:
+ Uninstall and then install `formula`.
* `search`, `-S`:
Display all locally available formulae for brewing (including tapped ones).
No online search is performed if called without arguments.
- * `search` [`--desc`] (<var>text</var>|`/`<var>text</var>`/`):
- Perform a substring search of formula names for <var>text</var>. If <var>text</var> is
+ * `search` [`--desc`] (`text`|`/``text``/`):
+ Perform a substring search of formula names for `text`. If `text` is
surrounded with slashes, then it is interpreted as a regular expression.
- The search for <var>text</var> is extended online to some popular taps.
+ The search for `text` is extended online to some popular taps.
- If `--desc` is passed, browse available packages matching <var>text</var> including a
+ If `--desc` is passed, browse available packages matching `text` including a
description for each.
- * `search` (`--debian`|`--fedora`|`--fink`|`--macports`|`--opensuse`|`--ubuntu`) <var>text</var>:
- Search for <var>text</var> in the given package manager's list.
+ * `search` (`--debian`|`--fedora`|`--fink`|`--macports`|`--opensuse`|`--ubuntu`) `text`:
+ Search for `text` in the given package manager's list.
* `sh` [`--env=std`]:
Start a Homebrew build environment shell. Uses our years-battle-hardened
@@ -401,10 +402,10 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--env=std` is passed, use the standard `PATH` instead of superenv's.
- * `style` [`--fix`] [`--display-cop-names`] [<var>files</var>|<var>taps</var>|<var>formulae</var>]:
+ * `style` [`--fix`] [`--display-cop-names`] [`files`|`taps`|`formulae`]:
Check formulae or files for conformance to Homebrew style guidelines.
- <var>formulae</var> and <var>files</var> may not be combined. If both are omitted, style will run
+ `formulae` and `files` may not be combined. If both are omitted, style will run
style checks on the whole Homebrew `Library`, including core code and all
formulae.
@@ -416,20 +417,20 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
Exits with a non-zero status if any style violations are found.
- * `switch` <var>name</var> <var>version</var>:
- Symlink all of the specific <var>version</var> of <var>name</var>'s install to Homebrew prefix.
+ * `switch` `name` `version`:
+ Symlink all of the specific `version` of `name`'s install to Homebrew prefix.
* `tap`:
List all installed taps.
- * `tap` [`--full`] <var>user</var>`/`<var>repo</var> [<var>URL</var>]:
+ * `tap` [`--full`] `user``/``repo` [`URL`]:
Tap a formula repository.
- With <var>URL</var> unspecified, taps a formula repository from GitHub using HTTPS.
+ With `URL` unspecified, taps a formula repository from GitHub using HTTPS.
Since so many taps are hosted on GitHub, this command is a shortcut for
- `tap <var>user</var>/<var>repo</var> https://github.com/<var>user</var>/homebrew-<var>repo</var>`.
+ `tap `user`/`repo` https://github.com/`user`/homebrew-`repo``.
- With <var>URL</var> specified, taps a formula repository from anywhere, using
+ With `URL` specified, taps a formula repository from anywhere, using
any transport protocol that `git` handles. The one-argument form of `tap`
simplifies but also limits. This two-argument command makes no
assumptions, so taps can be cloned from places other than GitHub and
@@ -440,8 +441,8 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
to a full copy, you can retap passing `--full` without first untapping.
`tap` is re-runnable and exits successfully if there's nothing to do.
- However, retapping with a different <var>URL</var> will cause an exception, so first
- `untap` if you need to modify the <var>URL</var>.
+ However, retapping with a different `URL` will cause an exception, so first
+ `untap` if you need to modify the `URL`.
* `tap` `--repair`:
Migrate tapped formulae from symlink-based to directory-based structure.
@@ -455,45 +456,45 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `tap-info`:
Display a brief summary of all installed taps.
- * `tap-info` (`--installed`|<var>taps</var>):
- Display detailed information about one or more <var>taps</var>.
+ * `tap-info` (`--installed`|`taps`):
+ Display detailed information about one or more `taps`.
Pass `--installed` to display information on all installed taps.
- * `tap-info` `--json=`<var>version</var> (`--installed`|<var>taps</var>):
- Print a JSON representation of <var>taps</var>. Currently the only accepted value
- for <var>version</var> is `v1`.
+ * `tap-info` `--json=``version` (`--installed`|`taps`):
+ Print a JSON representation of `taps`. Currently the only accepted value
+ for `version` is `v1`.
Pass `--installed` to get information on installed taps.
See the docs for examples of using the JSON output:
<http://docs.brew.sh/Querying-Brew.html>
- * `tap-pin` <var>tap</var>:
- Pin <var>tap</var>, prioritizing its formulae over core when formula names are supplied
+ * `tap-pin` `tap`:
+ Pin `tap`, prioritizing its formulae over core when formula names are supplied
by the user. See also `tap-unpin`.
- * `tap-unpin` <var>tap</var>:
- Unpin <var>tap</var> so its formulae are no longer prioritized. See also `tap-pin`.
+ * `tap-unpin` `tap`:
+ Unpin `tap` so its formulae are no longer prioritized. See also `tap-pin`.
- * `uninstall`, `rm`, `remove` [`--force`] [`--ignore-dependencies`] <var>formula</var>:
- Uninstall <var>formula</var>.
+ * `uninstall`, `rm`, `remove` [`--force`] [`--ignore-dependencies`] `formula`:
+ Uninstall `formula`.
- If `--force` is passed, and there are multiple versions of <var>formula</var>
+ If `--force` (or `-f`) is passed, and there are multiple versions of `formula`
installed, delete all installed versions.
If `--ignore-dependencies` is passed, uninstalling won't fail, even if
- formulae depending on <var>formula</var> would still be installed.
+ formulae depending on `formula` would still be installed.
- * `unlink` [`--dry-run`] <var>formula</var>:
- Remove symlinks for <var>formula</var> from the Homebrew prefix. This can be useful
+ * `unlink` [`--dry-run`] `formula`:
+ Remove symlinks for `formula` from the Homebrew prefix. This can be useful
for temporarily disabling a formula:
- `brew unlink <var>formula</var> && <var>commands</var> && brew link <var>formula</var>`
+ `brew unlink `formula` && `commands` && brew link `formula``
If `--dry-run` or `-n` is passed, Homebrew will list all files which would
be unlinked, but will not actually unlink or delete any files.
- * `unlinkapps` [`--local`] [`--dry-run`] [<var>formulae</var>]:
+ * `unlinkapps` [`--local`] [`--dry-run`] [`formulae`]:
Remove symlinks created by `brew linkapps` from `/Applications` (deprecated).
Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using
@@ -501,7 +502,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
bundles that can be relocated. Instead, please consider using `brew cask` and
migrate formulae using `.app`s to casks.
- If no <var>formulae</var> are provided, all linked apps will be removed.
+ If no `formulae` are provided, all linked apps will be removed.
If provided, `--local` will remove symlinks from the user's `~/Applications`
directory instead of the system directory.
@@ -509,22 +510,22 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--dry-run` or `-n` is passed, Homebrew will list all symlinks which
would be removed, but will not actually delete any files.
- * `unpack` [`--git`|`--patch`] [`--destdir=`<var>path</var>] <var>formulae</var>:
- Unpack the source files for <var>formulae</var> into subdirectories of the current
- working directory. If `--destdir=`<var>path</var> is given, the subdirectories will
- be created in the directory named by <var>path</var> instead.
+ * `unpack` [`--git`|`--patch`] [`--destdir=``path`] `formulae`:
+ Unpack the source files for `formulae` into subdirectories of the current
+ working directory. If `--destdir=``path` is given, the subdirectories will
+ be created in the directory named by `path` instead.
- If `--patch` is passed, patches for <var>formulae</var> will be applied to the
+ If `--patch` is passed, patches for `formulae` will be applied to the
unpacked source.
- If `--git` is passed, a Git repository will be initialized in the unpacked
+ If `--git` (or `-g`) is passed, a Git repository will be initialized in the unpacked
source. This is useful for creating patches for the software.
- * `unpin` <var>formulae</var>:
- Unpin <var>formulae</var>, allowing them to be upgraded by `brew upgrade`. See also
+ * `unpin` `formulae`:
+ Unpin `formulae`, allowing them to be upgraded by `brew upgrade`. See also
`pin`.
- * `untap` <var>tap</var>:
+ * `untap` `tap`:
Remove a tapped repository.
* `update` [`--merge`] [`--force`]:
@@ -534,54 +535,54 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--merge` is specified then `git merge` is used to include updates
(rather than `git rebase`).
- If `--force` is specified then always do a slower, full update check even
+ If `--force` (or `-f`) is specified then always do a slower, full update check even
if unnecessary.
- * `upgrade` [<var>install-options</var>] [`--cleanup`] [`--fetch-HEAD`] [<var>formulae</var>]:
+ * `upgrade` [`install-options`] [`--cleanup`] [`--fetch-HEAD`] [`formulae`]:
Upgrade outdated, unpinned brews.
Options for the `install` command are also valid here.
- If `--cleanup` is specified then remove previously installed <var>formula</var> version(s).
+ If `--cleanup` is specified then remove previously installed `formula` version(s).
If `--fetch-HEAD` is passed, fetch the upstream repository to detect if
the HEAD installation of the formula is outdated. Otherwise, the
repository's HEAD will be checked for updates when a new stable or devel
version has been released.
- If <var>formulae</var> are given, upgrade only the specified brews (but do so even
+ If `formulae` are given, upgrade only the specified brews (but do so even
if they are pinned; see `pin`, `unpin`).
- * `uses` [`--installed`] [`--recursive`] [`--include-build`] [`--include-optional`] [`--skip-recommended`] [`--devel`|`--HEAD`] <var>formulae</var>:
- Show the formulae that specify <var>formulae</var> as a dependency. When given
+ * `uses` [`--installed`] [`--recursive`] [`--include-build`] [`--include-optional`] [`--skip-recommended`] [`--devel`|`--HEAD`] `formulae`:
+ Show the formulae that specify `formulae` as a dependency. When given
multiple formula arguments, show the intersection of formulae that use
- <var>formulae</var>.
+ `formulae`.
Use `--recursive` to resolve more than one level of dependencies.
If `--installed` is passed, only list installed formulae.
- By default, `uses` shows all formulae that specify <var>formulae</var> as a required
+ By default, `uses` shows all formulae that specify `formulae` as a required
or recommended dependency. To include the `:build` type dependencies, pass
`--include-build`. Similarly, pass `--include-optional` to include `:optional`
dependencies. To skip `:recommended` type dependencies, pass `--skip-recommended`.
- By default, `uses` shows usages of <var>formulae</var> by stable builds. To find
- cases where <var>formulae</var> is used by development or HEAD build, pass
+ By default, `uses` shows usages of `formulae` by stable builds. To find
+ cases where `formulae` is used by development or HEAD build, pass
`--devel` or `--HEAD`.
* `--cache`:
Display Homebrew's download cache. See also `HOMEBREW_CACHE`.
- * `--cache` <var>formula</var>:
- Display the file or directory used to cache <var>formula</var>.
+ * `--cache` `formula`:
+ Display the file or directory used to cache `formula`.
* `--cellar`:
Display Homebrew's Cellar path. *Default:* `$(brew --prefix)/Cellar`, or if
that directory doesn't exist, `$(brew --repository)/Cellar`.
- * `--cellar` <var>formula</var>:
- Display the location in the cellar where <var>formula</var> would be installed,
+ * `--cellar` `formula`:
+ Display the location in the cellar where `formula` would be installed,
without any sort of versioned directory as the last path.
* `--env`:
@@ -590,26 +591,26 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `--prefix`:
Display Homebrew's install path. *Default:* `/usr/local`
- * `--prefix` <var>formula</var>:
- Display the location in the cellar where <var>formula</var> is or would be installed.
+ * `--prefix` `formula`:
+ Display the location in the cellar where `formula` is or would be installed.
* `--repository`:
Display where Homebrew's `.git` directory is located. For standard installs,
the `prefix` and `repository` are the same directory.
- * `--repository` <var>user</var>`/`<var>repo</var>:
- Display where tap <var>user</var>`/`<var>repo</var>'s directory is located.
+ * `--repository` `user``/``repo`:
+ Display where tap `user``/``repo`'s directory is located.
* `--version`:
Print the version number of Homebrew to standard output and exit.
## DEVELOPER COMMANDS
- * `audit` [`--strict`] [`--fix`] [`--online`] [`--new-formula`] [`--display-cop-names`] [`--display-filename`] [<var>formulae</var>]:
- Check <var>formulae</var> for Homebrew coding style violations. This should be
+ * `audit` [`--strict`] [`--fix`] [`--online`] [`--new-formula`] [`--display-cop-names`] [`--display-filename`] [`formulae`]:
+ Check `formulae` for Homebrew coding style violations. This should be
run before submitting a new formula.
- If no <var>formulae</var> are provided, all of them are checked.
+ If no `formulae` are provided, all of them are checked.
If `--strict` is passed, additional checks are run, including RuboCop
style checks.
@@ -633,7 +634,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
`audit` exits with a non-zero status if any errors are found. This is useful,
for instance, for implementing pre-commit hooks.
- * `bottle` [`--verbose`] [`--no-rebuild`|`--keep-old`] [`--skip-relocation`] [`--root-url=`<var>URL</var>] [`--force-core-tap`] <var>formulae</var>:
+ * `bottle` [`--verbose`] [`--no-rebuild`|`--keep-old`] [`--skip-relocation`] [`--root-url=``URL`] [`--force-core-tap`] `formulae`:
Generate a bottle (binary package) from a formula installed with
`--build-bottle`.
@@ -641,33 +642,33 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
generated DSL. Passing `--keep-old` will attempt to keep it at its
original value, while `--no-rebuild` will remove it.
- If `--verbose` is passed, print the bottling commands and any warnings
+ If `--verbose` (or `-v`) is passed, print the bottling commands and any warnings
encountered.
If `--skip-relocation` is passed, do not check if the bottle can be marked
as relocatable.
- If `--root-url` is passed, use the specified <var>URL</var> as the root of the
+ If `--root-url` is passed, use the specified `URL` as the root of the
bottle's URL instead of Homebrew's default.
- If `--force-core-tap` is passed, build a bottle even if <var>formula</var> is not
+ If `--force-core-tap` is passed, build a bottle even if `formula` is not
in homebrew/core or any installed taps.
- * `bottle` `--merge` [`--keep-old`] [`--write` [`--no-commit`]] <var>formulae</var>:
+ * `bottle` `--merge` [`--keep-old`] [`--write` [`--no-commit`]] `formulae`:
Generate a bottle from a formula and print the new DSL merged into the
existing formula.
If `--write` is passed, write the changes to the formula file. A new
commit will then be generated unless `--no-commit` is passed.
- * `bump-formula-pr` [`--devel`] [`--dry-run` [`--write`]] [`--audit`|`--strict`] [`--mirror=`<var>URL</var>] [`--version=`<var>version</var>] [`--message=`<var>message</var>] (`--url=`<var>URL</var> `--sha256=`<var>sha-256</var>|`--tag=`<var>tag</var> `--revision=`<var>revision</var>) <var>formula</var>:
+ * `bump-formula-pr` [`--devel`] [`--dry-run` [`--write`]] [`--audit`|`--strict`] [`--mirror=``URL`] [`--version=``version`] [`--message=``message`] (`--url=``URL` `--sha256=``sha-256`|`--tag=``tag` `--revision=``revision`) `formula`:
Creates a pull request to update the formula with a new URL or a new tag.
- If a <var>URL</var> is specified, the <var>sha-256</var> checksum of the new download must
- also be specified. A best effort to determine the <var>sha-256</var> and <var>formula</var>
+ If a `URL` is specified, the `sha-256` checksum of the new download must
+ also be specified. A best effort to determine the `sha-256` and `formula`
name will be made if either or both values are not supplied by the user.
- If a <var>tag</var> is specified, the git commit <var>revision</var> corresponding to that
+ If a `tag` is specified, the git commit `revision` corresponding to that
tag must also be specified.
If `--devel` is passed, bump the development rather than stable version.
@@ -682,13 +683,13 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--strict` is passed, run `brew audit --strict` before opening the PR.
- If `--mirror=`<var>URL</var> is passed, use the value as a mirror URL.
+ If `--mirror=``URL` is passed, use the value as a mirror URL.
- If `--version=`<var>version</var> is passed, use the value to override the value
+ If `--version=``version` is passed, use the value to override the value
parsed from the URL or tag. Note that `--version=0` can be used to delete
an existing `version` override from a formula if it has become redundant.
- If `--message=`<var>message</var> is passed, append <var>message</var> to the default PR
+ If `--message=``message` is passed, append `message` to the default PR
message.
Note that this command cannot be used to transition a formula from a
@@ -696,8 +697,8 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
specification, nor vice versa. It must use whichever style specification
the preexisting formula already uses.
- * `create` <var>URL</var> [`--autotools`|`--cmake`|`--meson`] [`--no-fetch`] [`--set-name` <var>name</var>] [`--set-version` <var>version</var>] [`--tap` <var>user</var>`/`<var>repo</var>]:
- Generate a formula for the downloadable file at <var>URL</var> and open it in the editor.
+ * `create` `URL` [`--autotools`|`--cmake`|`--meson`] [`--no-fetch`] [`--set-name` `name`] [`--set-version` `version`] [`--tap` `user``/``repo`]:
+ Generate a formula for the downloadable file at `URL` and open it in the editor.
Homebrew will attempt to automatically derive the formula name
and version, but if it fails, you'll have to make your own template. The `wget`
formula serves as a simple example. For the complete API have a look at
@@ -707,7 +708,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--cmake` is passed, create a basic template for a CMake-style build.
If `--meson` is passed, create a basic template for a Meson-style build.
- If `--no-fetch` is passed, Homebrew will not download <var>URL</var> to the cache and
+ If `--no-fetch` is passed, Homebrew will not download `URL` to the cache and
will thus not add the SHA256 to the formula for you.
The options `--set-name` and `--set-version` each take an argument and allow
@@ -719,13 +720,13 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `edit`:
Open all of Homebrew for editing.
- * `edit` <var>formula</var>:
- Open <var>formula</var> in the editor.
+ * `edit` `formula`:
+ Open `formula` in the editor.
- * `formula` <var>formula</var>:
- Display the path where <var>formula</var> is located.
+ * `formula` `formula`:
+ Display the path where `formula` is located.
- * `linkage` [`--test`] [`--reverse`] <var>formula</var>:
+ * `linkage` [`--test`] [`--reverse`] `formula`:
Checks the library links of an installed formula.
Only works on installed formulae. An error is raised if it is run on
@@ -746,12 +747,12 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
Additionally, the date used in new manpages will match those in the existing
manpages (to allow comparison without factoring in the date).
- * `pull` [`--bottle`] [`--bump`] [`--clean`] [`--ignore-whitespace`] [`--resolve`] [`--branch-okay`] [`--no-pbcopy`] [`--no-publish`] [`--warn-on-publish-failure`] <var>patch-source</var> [<var>patch-source</var>]:
+ * `pull` [`--bottle`] [`--bump`] [`--clean`] [`--ignore-whitespace`] [`--resolve`] [`--branch-okay`] [`--no-pbcopy`] [`--no-publish`] [`--warn-on-publish-failure`] `patch-source` [`patch-source`]:
Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
Optionally, installs the formulae changed by the patch.
- Each <var>patch-source</var> may be one of:
+ Each `patch-source` may be one of:
~ The ID number of a PR (pull request) in the homebrew/core GitHub
repository
@@ -790,18 +791,18 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--warn-on-publish-failure` was passed, do not exit if there's a
failure publishing bottles on Bintray.
- * `release-notes` [`--markdown`] [<var>previous_tag</var>] [<var>end_ref</var>]:
+ * `release-notes` [`--markdown`] [`previous_tag`] [`end_ref`]:
Output the merged pull requests on Homebrew/brew between two Git refs.
- If no <var>previous_tag</var> is provided it defaults to the newest tag.
- If no <var>end_ref</var> is provided it defaults to `origin/master`.
+ If no `previous_tag` is provided it defaults to the newest tag.
+ If no `end_ref` is provided it defaults to `origin/master`.
If `--markdown` is passed, output as a Markdown list.
- * `tap-new` <var>user</var>`/`<var>repo</var>:
+ * `tap-new` `user``/``repo`:
Generate the template files for a new tap.
- * `test` [`--devel`|`--HEAD`] [`--debug`] [`--keep-tmp`] <var>formula</var>:
- Most formulae provide a test method. `brew test` <var>formula</var> runs this
+ * `test` [`--devel`|`--HEAD`] [`--debug`] [`--keep-tmp`] `formula`:
+ Most formulae provide a test method. `brew test` `formula` runs this
test method. There is no standard output or return code, but it should
generally indicate to the user if something is wrong with the installed
formula.
@@ -809,7 +810,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
To test the development or head version of a formula, use `--devel` or
`--HEAD`.
- If `--debug` is passed and the test fails, an interactive debugger will be
+ If `--debug` (or `-d`) is passed and the test fails, an interactive debugger will be
launched with access to IRB or a shell inside the temporary test directory.
If `--keep-tmp` is passed, the temporary files created for the test are
@@ -817,12 +818,12 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
Example: `brew install jruby && brew test jruby`
- * `tests` [`--verbose`] [`--coverage`] [`--generic`] [`--no-compat`] [`--only=`<var>test_script</var>[`:`<var>line_number</var>]] [`--seed` <var>seed</var>] [`--online`] [`--official-cmd-taps`]:
+ * `tests` [`--verbose`] [`--coverage`] [`--generic`] [`--no-compat`] [`--only=``test_script`[`:``line_number`]] [`--seed` `seed`] [`--online`] [`--official-cmd-taps`]:
Run Homebrew's unit and integration tests. If provided,
- `--only=`<var>test_script</var> runs only <var>test_script</var>_spec.rb, and `--seed`
+ `--only=``test_script` runs only `test_script`_spec.rb, and `--seed`
randomizes tests with the provided value instead of a random seed.
- If `--verbose` is passed, print the command that runs the tests.
+ If `--verbose` (or `-v`) is passed, print the command that runs the tests.
If `--coverage` is passed, also generate code coverage reports.
@@ -836,14 +837,14 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
If `--official-cmd-taps` is passed, include tests that use any of the
taps for official external commands.
- * `update-test` [`--commit=`<var>commit</var>] [`--before=`<var>date</var>] [`--to-tag`] [`--keep-tmp`]:
+ * `update-test` [`--commit=``commit`] [`--before=``date`] [`--to-tag`] [`--keep-tmp`]:
Runs a test of `brew update` with a new repository clone.
If no arguments are passed, use `origin/master` as the start commit.
- If `--commit=`<var>commit</var> is passed, use <var>commit</var> as the start commit.
+ If `--commit=``commit` is passed, use `commit` as the start commit.
- If `--before=`<var>date</var> is passed, use the commit at <var>date</var> as the
+ If `--before=``date` is passed, use the commit at `date` as the
start commit.
If `--to-tag` is passed, set `HOMEBREW_UPDATE_TO_TAG` to test updating
@@ -869,8 +870,8 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
## CUSTOM EXTERNAL COMMANDS
Homebrew, like `git`(1), supports external commands. These are executable
-scripts that reside somewhere in the `PATH`, named `brew-`<var>cmdname</var> or
-`brew-`<var>cmdname</var>`.rb`, which can be invoked like `brew` <var>cmdname</var>. This allows you
+scripts that reside somewhere in the `PATH`, named `brew-``cmdname` or
+`brew-``cmdname``.rb`, which can be invoked like `brew` `cmdname`. This allows you
to create your own commands without modifying Homebrew's internals.
Instructions for creating your own commands can be found in the docs:
@@ -878,7 +879,7 @@ Instructions for creating your own commands can be found in the docs:
## SPECIFYING FORMULAE
-Many Homebrew commands accept one or more <var>formula</var> arguments. These arguments
+Many Homebrew commands accept one or more `formula` arguments. These arguments
can take several different forms:
* The name of a formula:
@@ -1053,11 +1054,11 @@ to read proxy parameters from environment variables.
For the majority of cases setting `http_proxy` is enough. You can set this in
your shell profile, or you can use it before a brew command:
- http_proxy=http://<var>host</var>:<var>port</var> brew install foo
+ http_proxy=http://`host`:`port` brew install foo
If your proxy requires authentication:
- http_proxy=http://<var>user</var>:<var>password</var>@<var>host</var>:<var>port</var> brew install foo
+ http_proxy=http://`user`:`password`@`host`:`port` brew install foo
## SEE ALSO
diff --git a/manpages/brew-cask.1 b/manpages/brew-cask.1
index 8a7b557c0..e45824927 100644
--- a/manpages/brew-cask.1
+++ b/manpages/brew-cask.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW\-CASK" "1" "March 2017" "Homebrew" "brew-cask"
+.TH "BREW\-CASK" "1" "April 2017" "Homebrew" "brew-cask"
.
.SH "NAME"
\fBbrew\-cask\fR \- a friendly binary installer for macOS
diff --git a/manpages/brew.1 b/manpages/brew.1
index 9a1775233..6c30b60cf 100644
--- a/manpages/brew.1
+++ b/manpages/brew.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "March 2017" "Homebrew" "brew"
+.TH "BREW" "1" "April 2017" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for macOS
@@ -159,7 +159,7 @@ If \fB\-\-HEAD\fR or \fB\-\-devel\fR is passed, fetch that version instead of th
If \fB\-v\fR is passed, do a verbose VCS checkout, if the URL represents a VCS\. This is useful for seeing if an existing VCS cache has been updated\.
.
.IP
-If \fB\-\-force\fR is passed, remove a previously cached version and re\-fetch\.
+If \fB\-\-force\fR (or \fB\-f\fR) is passed, remove a previously cached version and re\-fetch\.
.
.IP
If \fB\-\-retry\fR is passed, retry if a download fails or re\-download if the checksum of a previously cached version no longer matches\.
@@ -168,7 +168,7 @@ If \fB\-\-retry\fR is passed, retry if a download fails or re\-download if the c
If \fB\-\-deps\fR is passed, also download dependencies for any listed \fIformulae\fR\.
.
.IP
-If \fB\-\-build\-from\-source\fR is passed, download the source rather than a bottle\.
+If \fB\-\-build\-from\-source\fR (or \fB\-s\fR) is passed, download the source rather than a bottle\.
.
.IP
If \fB\-\-force\-bottle\fR is passed, download a bottle if it exists for the current or newest version of macOS, even if it would not be used during installation\.
@@ -223,7 +223,7 @@ Install \fIformula\fR\.
\fIformula\fR is usually the name of the formula to install, but it can be specified in several different ways\. See \fISPECIFYING FORMULAE\fR\.
.
.IP
-If \fB\-\-debug\fR is passed and brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory\.
+If \fB\-\-debug\fR (or \fB\-d\fR) is passed and brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory\.
.
.IP
If \fB\-\-env=std\fR is passed, use the standard build environment instead of superenv\.
@@ -241,7 +241,7 @@ If \fB\-\-only\-dependencies\fR is passed, install the dependencies with specifi
If \fB\-\-cc=\fR\fIcompiler\fR is passed, attempt to compile using \fIcompiler\fR\. \fIcompiler\fR should be the name of the compiler\'s executable, for instance \fBgcc\-4\.2\fR for Apple\'s GCC 4\.2, or \fBgcc\-4\.9\fR for a Homebrew\-provided GCC 4\.9\.
.
.IP
-If \fB\-\-build\-from\-source\fR or \fB\-s\fR is passed, compile the specified \fIformula\fR from source even if a bottle is provided\. Dependencies will still be installed from bottles if they are available\.
+If \fB\-\-build\-from\-source\fR (or \fB\-s\fR) is passed, compile the specified \fIformula\fR from source even if a bottle is provided\. Dependencies will still be installed from bottles if they are available\.
.
.IP
If \fBHOMEBREW_BUILD_FROM_SOURCE\fR is set, regardless of whether \fB\-\-build\-from\-source\fR was passed, then both \fIformula\fR and the dependencies installed as part of this process are built from source even if bottles are available\.
@@ -263,10 +263,10 @@ If \fB\-\-build\-bottle\fR is passed, prepare the formula for eventual bottling
.
.TP
\fBinstall\fR \fB\-\-interactive\fR [\fB\-\-git\fR] \fIformula\fR
-Download and patch \fIformula\fR, then open a shell\. This allows the user to run \fB\./configure \-\-help\fR and otherwise determine how to turn the software package into a Homebrew formula\.
+If \fB\-\-interactive\fR (or \fB\-i\fR) is passed, download and patch \fIformula\fR, then open a shell\. This allows the user to run \fB\./configure \-\-help\fR and otherwise determine how to turn the software package into a Homebrew formula\.
.
.IP
-If \fB\-\-git\fR is passed, Homebrew will create a Git repository, useful for creating patches to the software\.
+If \fB\-\-git\fR (or \fB\-g\fR) is passed, Homebrew will create a Git repository, useful for creating patches to the software\.
.
.TP
\fBirb\fR [\fB\-\-examples\fR]
@@ -290,7 +290,7 @@ If \fB\-\-overwrite\fR is passed, Homebrew will delete files which already exist
If \fB\-\-dry\-run\fR or \fB\-n\fR is passed, Homebrew will list all files which would be linked or which would be deleted by \fBbrew link \-\-overwrite\fR, but will not actually link or delete any files\.
.
.IP
-If \fB\-\-force\fR is passed, Homebrew will allow keg\-only formulae to be linked\.
+If \fB\-\-force\fR (or \fB\-f\fR) is passed, Homebrew will allow keg\-only formulae to be linked\.
.
.TP
\fBlinkapps\fR [\fB\-\-local\fR] [\fIformulae\fR]
@@ -332,7 +332,7 @@ Show the git log for the given formulae\. Options that \fBgit\-log\fR(1) recogni
Migrate renamed packages to new name, where \fIformulae\fR are old names of packages\.
.
.IP
-If \fB\-\-force\fR is passed, then treat installed \fIformulae\fR and passed \fIformulae\fR like if they are from same taps and migrate them anyway\.
+If \fB\-\-force\fR (or \fB\-f\fR) is passed, then treat installed \fIformulae\fR and passed \fIformulae\fR like if they are from same taps and migrate them anyway\.
.
.TP
\fBmissing\fR [\fB\-\-hide=\fR\fIhidden\fR] [\fIformulae\fR]
@@ -365,7 +365,7 @@ By default, version information is displayed in interactive shells, and suppress
If \fB\-\-quiet\fR is passed, list only the names of outdated brews (takes precedence over \fB\-\-verbose\fR)\.
.
.IP
-If \fB\-\-verbose\fR is passed, display detailed version information\.
+If \fB\-\-verbose\fR (or \fB\-v\fR) is passed, display detailed version information\.
.
.IP
If \fB\-\-json=\fR\fIversion\fR is passed, the output will be in JSON format\. The only valid version is \fBv1\fR\.
@@ -500,7 +500,7 @@ Unpin \fItap\fR so its formulae are no longer prioritized\. See also \fBtap\-pin
Uninstall \fIformula\fR\.
.
.IP
-If \fB\-\-force\fR is passed, and there are multiple versions of \fIformula\fR installed, delete all installed versions\.
+If \fB\-\-force\fR (or \fB\-f\fR) is passed, and there are multiple versions of \fIformula\fR installed, delete all installed versions\.
.
.IP
If \fB\-\-ignore\-dependencies\fR is passed, uninstalling won\'t fail, even if formulae depending on \fIformula\fR would still be installed\.
@@ -536,7 +536,7 @@ Unpack the source files for \fIformulae\fR into subdirectories of the current wo
If \fB\-\-patch\fR is passed, patches for \fIformulae\fR will be applied to the unpacked source\.
.
.IP
-If \fB\-\-git\fR is passed, a Git repository will be initialized in the unpacked source\. This is useful for creating patches for the software\.
+If \fB\-\-git\fR (or \fB\-g\fR) is passed, a Git repository will be initialized in the unpacked source\. This is useful for creating patches for the software\.
.
.TP
\fBunpin\fR \fIformulae\fR
@@ -554,7 +554,7 @@ Fetch the newest version of Homebrew and all formulae from GitHub using \fBgit\f
If \fB\-\-merge\fR is specified then \fBgit merge\fR is used to include updates (rather than \fBgit rebase\fR)\.
.
.IP
-If \fB\-\-force\fR is specified then always do a slower, full update check even if unnecessary\.
+If \fB\-\-force\fR (or \fB\-f\fR) is specified then always do a slower, full update check even if unnecessary\.
.
.TP
\fBupgrade\fR [\fIinstall\-options\fR] [\fB\-\-cleanup\fR] [\fB\-\-fetch\-HEAD\fR] [\fIformulae\fR]
@@ -666,7 +666,7 @@ Generate a bottle (binary package) from a formula installed with \fB\-\-build\-b
If the formula specifies a rebuild version, it will be incremented in the generated DSL\. Passing \fB\-\-keep\-old\fR will attempt to keep it at its original value, while \fB\-\-no\-rebuild\fR will remove it\.
.
.IP
-If \fB\-\-verbose\fR is passed, print the bottling commands and any warnings encountered\.
+If \fB\-\-verbose\fR (or \fB\-v\fR) is passed, print the bottling commands and any warnings encountered\.
.
.IP
If \fB\-\-skip\-relocation\fR is passed, do not check if the bottle can be marked as relocatable\.
@@ -836,7 +836,7 @@ Most formulae provide a test method\. \fBbrew test\fR \fIformula\fR runs this te
To test the development or head version of a formula, use \fB\-\-devel\fR or \fB\-\-HEAD\fR\.
.
.IP
-If \fB\-\-debug\fR is passed and the test fails, an interactive debugger will be launched with access to IRB or a shell inside the temporary test directory\.
+If \fB\-\-debug\fR (or \fB\-d\fR) is passed and the test fails, an interactive debugger will be launched with access to IRB or a shell inside the temporary test directory\.
.
.IP
If \fB\-\-keep\-tmp\fR is passed, the temporary files created for the test are not deleted\.
@@ -849,7 +849,7 @@ Example: \fBbrew install jruby && brew test jruby\fR
Run Homebrew\'s unit and integration tests\. If provided, \fB\-\-only=\fR\fItest_script\fR runs only \fItest_script\fR_spec\.rb, and \fB\-\-seed\fR randomizes tests with the provided value instead of a random seed\.
.
.IP
-If \fB\-\-verbose\fR is passed, print the command that runs the tests\.
+If \fB\-\-verbose\fR (or \fB\-v\fR) is passed, print the command that runs the tests\.
.
.IP
If \fB\-\-coverage\fR is passed, also generate code coverage reports\.