aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/--env.rb10
-rw-r--r--Library/Homebrew/cmd/deps.rb21
-rw-r--r--Library/Homebrew/cmd/desc.rb11
-rw-r--r--Library/Homebrew/cmd/doctor.rb3
-rw-r--r--Library/Homebrew/cmd/fetch.rb7
-rw-r--r--Library/Homebrew/cmd/gist-logs.rb2
-rw-r--r--Library/Homebrew/cmd/info.rb7
-rw-r--r--Library/Homebrew/cmd/install.rb7
-rw-r--r--Library/Homebrew/cmd/linkapps.rb15
-rw-r--r--Library/Homebrew/cmd/list.rb2
-rw-r--r--Library/Homebrew/cmd/outdated.rb4
-rw-r--r--Library/Homebrew/cmd/pin.rb3
-rw-r--r--Library/Homebrew/cmd/readall.rb8
-rw-r--r--Library/Homebrew/cmd/reinstall.rb4
-rw-r--r--Library/Homebrew/cmd/style.rb23
-rw-r--r--Library/Homebrew/cmd/uninstall.rb10
-rw-r--r--Library/Homebrew/cmd/unlinkapps.rb15
-rw-r--r--Library/Homebrew/cmd/unpack.rb2
-rw-r--r--Library/Homebrew/cmd/update-report.rb2
-rw-r--r--Library/Homebrew/cmd/upgrade.rb34
-rw-r--r--Library/Homebrew/cmd/uses.rb4
-rw-r--r--Library/Homebrew/cmd/vendor-install.sh31
22 files changed, 108 insertions, 117 deletions
diff --git a/Library/Homebrew/cmd/--env.rb b/Library/Homebrew/cmd/--env.rb
index 90beee89c..e0a2b9f19 100644
--- a/Library/Homebrew/cmd/--env.rb
+++ b/Library/Homebrew/cmd/--env.rb
@@ -1,5 +1,11 @@
-#: * `--env`:
-#: Show a summary of the Homebrew build environment.
+#: * `--env` [`--shell=`(<shell>|`auto`)|`--plain`]:
+#: Show a summary of the Homebrew build environment as a plain list.
+#:
+#: Pass `--shell=`<shell> to generate a list of environment variables for the
+#: specified shell, or `--shell=auto` to detect the current shell.
+#:
+#: If the command's output is sent through a pipe and no shell is specified,
+#: the list is formatted for export to `bash`(1) unless `--plain` is passed.
require "extend/ENV"
require "build_environment"
diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb
index ae758e143..0627e84bd 100644
--- a/Library/Homebrew/cmd/deps.rb
+++ b/Library/Homebrew/cmd/deps.rb
@@ -94,26 +94,14 @@ module Homebrew
if ARGV.include?("--include-requirements")
deps
else
- deps.map do |dep|
- if dep.is_a? Dependency
- dep
- elsif dep.default_formula?
- dep.to_dependency
- end
- end.compact
+ deps.select { |dep| dep.is_a? Dependency }
end
end
def dep_display_name(dep)
str = if dep.is_a? Requirement
if ARGV.include?("--include-requirements")
- if dep.default_formula?
- ":#{dep.display_s} (#{dep_display_name(dep.to_dependency)})"
- else
- ":#{dep.display_s}"
- end
- elsif dep.default_formula?
- dep_display_name(dep.to_dependency)
+ ":#{dep.display_s}"
else
# This shouldn't happen, but we'll put something here to help debugging
"::#{dep.name}"
@@ -207,7 +195,7 @@ module Homebrew
max = dependables.length - 1
@dep_stack.push f.name
dependables.each_with_index do |dep, i|
- next if !ARGV.include?("--include-requirements") && dep.is_a?(Requirement) && !dep.default_formula?
+ next if !ARGV.include?("--include-requirements") && dep.is_a?(Requirement)
tree_lines = if i == max
"└──"
else
@@ -223,9 +211,6 @@ module Homebrew
else
"│ "
end
- if dep.is_a?(Requirement) && dep.default_formula?
- recursive_deps_tree(Formulary.factory(dep.to_dependency.name), prefix + prefix_addition, true)
- end
if dep.is_a? Dependency
recursive_deps_tree(Formulary.factory(dep.name), prefix + prefix_addition, true)
end
diff --git a/Library/Homebrew/cmd/desc.rb b/Library/Homebrew/cmd/desc.rb
index 53291602e..ccb7e9925 100644
--- a/Library/Homebrew/cmd/desc.rb
+++ b/Library/Homebrew/cmd/desc.rb
@@ -1,11 +1,12 @@
#: * `desc` <formula>:
#: Display <formula>'s name and one-line description.
#:
-#: * `desc` [`-s`|`-n`|`-d`] (<text>|`/`<text>`/`):
-#: Search both name and description (`-s`), just the names (`-n`), or just the
-#: 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.
+#: * `desc` [`--search`|`--name`|`--description`] (<text>|`/`<text>`/`):
+#: Search both name and description (`--search` or `-s`), just the names
+#: (`--name` or `-n`), or just the descriptions (`--description` or `-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.
require "descriptions"
require "cmd/search"
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 5ff8aa4eb..4e439fa0a 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -6,7 +6,8 @@
#: an issue; just ignore this.
# Undocumented options:
-# -D activates debugging and profiling of the audit methods (not the same as --debug)
+# `-D` activates debugging and profiling of the audit methods (not the same as `--debug`)
+# `--list-checks` lists all audit methods
require "diagnostic"
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb
index 411753992..f150d8f16 100644
--- a/Library/Homebrew/cmd/fetch.rb
+++ b/Library/Homebrew/cmd/fetch.rb
@@ -63,7 +63,12 @@ module Homebrew
next if fetched_bottle
fetch_formula(f)
- f.resources.each { |r| fetch_resource(r) }
+
+ f.resources.each do |r|
+ fetch_resource(r)
+ r.patches.each { |p| fetch_patch(p) if p.external? }
+ end
+
f.patchlist.each { |p| fetch_patch(p) if p.external? }
end
end
diff --git a/Library/Homebrew/cmd/gist-logs.rb b/Library/Homebrew/cmd/gist-logs.rb
index 9c0302813..630361ca2 100644
--- a/Library/Homebrew/cmd/gist-logs.rb
+++ b/Library/Homebrew/cmd/gist-logs.rb
@@ -4,6 +4,8 @@
#: <formula> is usually the name of the formula to install, but it can be specified
#: in several different ways. See [SPECIFYING FORMULAE](#specifying-formulae).
#:
+#: If `--with-hostname` is passed, include the hostname in the Gist.
+#:
#: If `--new-issue` is passed, automatically create a new issue in the appropriate
#: GitHub repository as well as creating the Gist.
#:
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index 83bb712ab..1eb9fe9fe 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -1,8 +1,11 @@
+#: * `info`:
+#: Display brief statistics for your Homebrew installation.
+#:
#: * `info` <formula>:
#: Display information about <formula>.
#:
#: * `info` `--github` <formula>:
-#: Open a browser to the GitHub History page for formula <formula>.
+#: Open a browser to the GitHub History page for <formula>.
#:
#: To view formula history locally: `brew log -p <formula>`
#:
@@ -164,7 +167,7 @@ module Homebrew
end
end
- unless f.options.empty?
+ if !f.options.empty? || f.head || f.devel
ohai "Options"
Homebrew.dump_options_for_formula f
end
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index 575dbc4b3..e1e4712ea 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -1,4 +1,4 @@
-#: * `install` [`--debug`] [`--env=`(`std`|`super`)] [`--ignore-dependencies`|`--only-dependencies`] [`--cc=`<compiler>] [`--build-from-source`|`--force-bottle`] [`--devel`|`--HEAD`] [`--keep-tmp`] [`--build-bottle`] <formula> [<options> ...]:
+#: * `install` [`--debug`] [`--env=`(`std`|`super`)] [`--ignore-dependencies`|`--only-dependencies`] [`--cc=`<compiler>] [`--build-from-source`|`--force-bottle`] [`--devel`|`--HEAD`] [`--keep-tmp`] [`--build-bottle`] [`--force`] [`--verbose`] <formula> [<options> ...]:
#: Install <formula>.
#:
#: <formula> is usually the name of the formula to install, but it can be specified
@@ -47,6 +47,11 @@
#: If `--build-bottle` is passed, prepare the formula for eventual bottling
#: during installation.
#:
+#: If `--force` (or `-f`) is passed, install without checking for previously
+#: installed keg-only or non-migrated versions
+#:
+#: If `--verbose` (or `-v`) is passed, print the verification and postinstall steps.
+#:
#: Installation options specific to <formula> may be appended to the command,
#: and can be listed with `brew options` <formula>.
#:
diff --git a/Library/Homebrew/cmd/linkapps.rb b/Library/Homebrew/cmd/linkapps.rb
index e8d482529..1bec67a04 100644
--- a/Library/Homebrew/cmd/linkapps.rb
+++ b/Library/Homebrew/cmd/linkapps.rb
@@ -1,3 +1,4 @@
+#: @hide_from_man_page
#: * `linkapps` [`--local`] [<formulae>]:
#: Find installed formulae that provide `.app`-style macOS apps and symlink them
#: into `/Applications`, allowing for easier access (deprecated).
@@ -6,11 +7,6 @@
#: either aliases or symlinks and Homebrew formulae do not build "proper" `.app`
#: bundles that can be relocated. Instead, please consider using `brew cask` and
#: migrate formulae using `.app`s to casks.
-#:
-#: If no <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.
require "keg"
require "formula"
@@ -19,14 +15,7 @@ module Homebrew
module_function
def linkapps
- opoo <<~EOS
- `brew linkapps` has been deprecated and will eventually be removed!
-
- Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using
- either aliases or symlinks and Homebrew formulae do not build "proper" `.app`
- bundles that can be relocated. Instead, please consider using `brew cask` and
- migrate formulae using `.app`s to casks.
- EOS
+ odeprecated "'brew linkapps'"
target_dir = linkapps_target(local: ARGV.include?("--local"))
diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb
index 1f90a3ac3..482100ba2 100644
--- a/Library/Homebrew/cmd/list.rb
+++ b/Library/Homebrew/cmd/list.rb
@@ -6,7 +6,7 @@
#: * `list`, `ls` `--unbrewed`:
#: List all files in the Homebrew prefix not installed by Homebrew.
#:
-#: * `list`, `ls` [`--versions` [`--multiple`]] [`--pinned`] [<formulae>]:
+#: * `list`, `ls` [`--verbose`] [`--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.
#:
diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb
index f163212e1..97367ca1e 100644
--- a/Library/Homebrew/cmd/outdated.rb
+++ b/Library/Homebrew/cmd/outdated.rb
@@ -9,8 +9,8 @@
#:
#: 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`.
+#: If `--json=`<version> is passed, the output will be in JSON format.
+#: Currently the only accepted value for <version> is `v1`.
#:
#: If `--fetch-HEAD` is passed, fetch the upstream repository to detect if
#: the HEAD installation of the formula is outdated. Otherwise, the
diff --git a/Library/Homebrew/cmd/pin.rb b/Library/Homebrew/cmd/pin.rb
index 5a14f853c..9935d1636 100644
--- a/Library/Homebrew/cmd/pin.rb
+++ b/Library/Homebrew/cmd/pin.rb
@@ -1,7 +1,6 @@
#: * `pin` <formulae>:
#: Pin the specified <formulae>, preventing them from being upgraded when
-#: issuing the `brew upgrade <formulae>` command (but can still be upgraded
-#: as dependencies for other formulae). See also `unpin`.
+#: issuing the `brew upgrade <formulae>` command. See also `unpin`.
require "formula"
diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb
index 3bde16e7e..0a581c383 100644
--- a/Library/Homebrew/cmd/readall.rb
+++ b/Library/Homebrew/cmd/readall.rb
@@ -1,9 +1,13 @@
-#: * `readall` [tap]:
-#: Import all formulae from specified taps (defaults to all installed taps).
+#: * `readall` [`--aliases`] [`--syntax`] [<taps>]:
+#: Import all formulae from specified <taps> (defaults to all installed taps).
#:
#: This can be useful for debugging issues across all formulae when making
#: significant changes to `formula.rb`, testing the performance of loading
#: all formulae or to determine if any current formulae have Ruby issues.
+#:
+#: If `--aliases` is passed, also verify any alias symlinks in each tap.
+#:
+#: If `--syntax` is passed, also syntax-check all of Homebrew's Ruby files.
require "readall"
diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb
index a4629025a..7c62d8092 100644
--- a/Library/Homebrew/cmd/reinstall.rb
+++ b/Library/Homebrew/cmd/reinstall.rb
@@ -39,10 +39,10 @@ module Homebrew
fi.build_bottle = ARGV.build_bottle? || (!f.bottled? && f.build.bottle?)
fi.interactive = ARGV.interactive?
fi.git = ARGV.git?
- fi.link_keg = keg_was_linked if keg_had_linked_opt
+ fi.link_keg ||= keg_was_linked if keg_had_linked_opt
fi.prelude
- oh1 "Reinstalling #{f.full_name} #{options.to_a.join " "}"
+ oh1 "Reinstalling #{Formatter.identifier(f.full_name)} #{options.to_a.join " "}"
fi.install
fi.finish
diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb
index 27047dfd0..1f0d385de 100644
--- a/Library/Homebrew/cmd/style.rb
+++ b/Library/Homebrew/cmd/style.rb
@@ -1,19 +1,19 @@
-#: * `style` [`--fix`] [`--display-cop-names`] [`--only-cops=`[COP1,COP2..]|`--except-cops=`[COP1,COP2..]] [<files>|<taps>|<formulae>]:
+#: * `style` [`--fix`] [`--display-cop-names`] [`--only-cops=`<cops>|`--except-cops=`<cops>] [<files>|<taps>|<formulae>]:
#: Check formulae or files for conformance to Homebrew style guidelines.
#:
-#: <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.
+#: Lists of <files>, <taps> and <formulae> may not be combined. If none are
+#: provided, `style` will run style checks on the whole Homebrew library,
+#: including core code and all formulae.
#:
-#: If `--fix` is passed, style violations will be automatically fixed using
-#: RuboCop's `--auto-correct` feature.
+#: If `--fix` is passed, automatically fix style violations using RuboCop's
+#: auto-correct feature.
#:
-#: If `--display-cop-names` is passed, the RuboCop cop name for each violation
-#: is included in the output.
+#: If `--display-cop-names` is passed, include the RuboCop cop name for each
+#: violation in the output.
#:
-#: If `--only-cops` is passed, only the given Rubocop cop(s)' violations would be checked.
-#:
-#: If `--except-cops` is passed, the given Rubocop cop(s)' checks would be skipped.
+#: Passing `--only-cops=`<cops> will check for violations of only the listed
+#: RuboCop <cops>, while `--except-cops=`<cops> will skip checking the listed
+#: <cops>. For either option <cops> should be a comma-separated list of cop names.
#:
#: Exits with a non-zero status if any style violations are found.
@@ -70,7 +70,6 @@ module Homebrew
def check_style_impl(files, output_type, options = {})
fix = options[:fix]
- Homebrew.install_gem_setup_path! "parser", HOMEBREW_RUBOCOP_PARSER_VERSION, "ruby-parse"
Homebrew.install_gem_setup_path! "rubocop", HOMEBREW_RUBOCOP_VERSION
require "rubocop"
require_relative "../rubocops"
diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb
index f95b6c7bb..af0efaf62 100644
--- a/Library/Homebrew/cmd/uninstall.rb
+++ b/Library/Homebrew/cmd/uninstall.rb
@@ -46,6 +46,16 @@ module Homebrew
rm_pin rack
else
kegs.each do |keg|
+ begin
+ f = Formulary.from_rack(rack)
+ if f.pinned?
+ onoe "#{f.full_name} is pinned. You must unpin it to uninstall."
+ next
+ end
+ rescue
+ nil
+ end
+
keg.lock do
puts "Uninstalling #{keg}... (#{keg.abv})"
keg.unlink
diff --git a/Library/Homebrew/cmd/unlinkapps.rb b/Library/Homebrew/cmd/unlinkapps.rb
index 7f401aaeb..721e4d639 100644
--- a/Library/Homebrew/cmd/unlinkapps.rb
+++ b/Library/Homebrew/cmd/unlinkapps.rb
@@ -1,3 +1,4 @@
+#: @hide_from_man_page
#: * `unlinkapps` [`--local`] [`--dry-run`] [<formulae>]:
#: Remove symlinks created by `brew linkapps` from `/Applications` (deprecated).
#:
@@ -5,14 +6,6 @@
#: either aliases or symlinks and Homebrew formulae do not build "proper" `.app`
#: bundles that can be relocated. Instead, please consider using `brew cask` and
#: migrate formulae using `.app`s to casks.
-#:
-#: If no <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.
-#:
-#: If `--dry-run` or `-n` is passed, Homebrew will list all symlinks which
-#: would be removed, but will not actually delete any files.
require "cmd/linkapps"
@@ -20,11 +13,7 @@ module Homebrew
module_function
def unlinkapps
- opoo <<~EOS
- `brew unlinkapps` has been deprecated and will eventually be removed!
-
- Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using either aliases or symlinks and Homebrew formulae do not build "proper" `.app` bundles that can be relocated. Instead, please consider using `brew cask` and migrate formulae using `.app`s to casks.
- EOS
+ odeprecated "'brew unlinkapps'"
target_dir = linkapps_target(local: ARGV.include?("--local"))
diff --git a/Library/Homebrew/cmd/unpack.rb b/Library/Homebrew/cmd/unpack.rb
index 51c2b59f0..aee4ea2eb 100644
--- a/Library/Homebrew/cmd/unpack.rb
+++ b/Library/Homebrew/cmd/unpack.rb
@@ -36,7 +36,7 @@ module Homebrew
rm_rf stage_dir
end
- oh1 "Unpacking #{f.full_name} to: #{stage_dir}"
+ oh1 "Unpacking #{Formatter.identifier(f.full_name)} to: #{stage_dir}"
ENV["VERBOSE"] = "1" # show messages about tar
f.brew do
diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb
index 98823a152..055c55a84 100644
--- a/Library/Homebrew/cmd/update-report.rb
+++ b/Library/Homebrew/cmd/update-report.rb
@@ -1,5 +1,5 @@
#: @hide_from_man_page
-#: * `update_report`:
+#: * `update_report` [`--preinstall`]:
#: The Ruby implementation of `brew update`. Never called manually.
require "formula_versions"
diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb
index 1c9c89d76..debd5eea2 100644
--- a/Library/Homebrew/cmd/upgrade.rb
+++ b/Library/Homebrew/cmd/upgrade.rb
@@ -25,13 +25,7 @@ module Homebrew
Homebrew.perform_preinstall_checks
- if ARGV.include?("--all")
- opoo <<~EOS
- We decided to not change the behaviour of `brew upgrade` so
- `brew upgrade --all` is equivalent to `brew upgrade` without any other
- arguments (so the `--all` is a no-op and can be removed).
- EOS
- end
+ odeprecated "'brew upgrade --all'", "'brew upgrade'" if ARGV.include?("--all")
if ARGV.named.empty?
outdated = Formula.installed.select do |f|
@@ -56,11 +50,8 @@ module Homebrew
exit 1 if outdated.empty?
end
- unless upgrade_pinned?
- pinned = outdated.select(&:pinned?)
- outdated -= pinned
- end
-
+ pinned = outdated.select(&:pinned?)
+ outdated -= pinned
formulae_to_install = outdated.map(&:latest_formula)
if formulae_to_install.empty?
@@ -70,8 +61,8 @@ module Homebrew
puts formulae_to_install.map { |f| "#{f.full_specified_name} #{f.pkg_version}" } * ", "
end
- unless upgrade_pinned? || pinned.empty?
- oh1 "Not upgrading #{Formatter.pluralize(pinned.length, "pinned package")}:"
+ unless pinned.empty?
+ onoe "Not upgrading #{Formatter.pluralize(pinned.length, "pinned package")}:"
puts pinned.map { |f| "#{f.full_specified_name} #{f.pkg_version}" } * ", "
end
@@ -101,10 +92,6 @@ module Homebrew
end
end
- def upgrade_pinned?
- !ARGV.named.empty?
- end
-
def upgrade_formula(f)
if f.opt_prefix.directory?
keg = Keg.new(f.opt_prefix.resolved_path)
@@ -133,14 +120,14 @@ module Homebrew
fi.options = options
fi.build_bottle = ARGV.build_bottle? || (!f.bottled? && f.build.build_bottle?)
fi.installed_on_request = !ARGV.named.empty?
- fi.link_keg = keg_was_linked if keg_had_linked_opt
+ fi.link_keg ||= keg_was_linked if keg_had_linked_opt
if tab
fi.installed_as_dependency = tab.installed_as_dependency
fi.installed_on_request ||= tab.installed_on_request
end
fi.prelude
- oh1 "Upgrading #{f.full_specified_name} #{fi.options.to_a.join " "}"
+ oh1 "Upgrading #{Formatter.identifier(f.full_specified_name)} #{fi.options.to_a.join " "}"
# first we unlink the currently active keg for this formula otherwise it is
# possible for the existing build to interfere with the build we are about to
@@ -149,13 +136,6 @@ module Homebrew
fi.install
fi.finish
-
- # If the formula was pinned, and we were force-upgrading it, unpin and
- # pin it again to get a symlink pointing to the correct keg.
- if f.pinned?
- f.unpin
- f.pin
- end
rescue FormulaInstallationAlreadyAttemptedError
# We already attempted to upgrade f as part of the dependency tree of
# another formula. In that case, don't generate an error, just move on.
diff --git a/Library/Homebrew/cmd/uses.rb b/Library/Homebrew/cmd/uses.rb
index 1688899f9..d5c9210f6 100644
--- a/Library/Homebrew/cmd/uses.rb
+++ b/Library/Homebrew/cmd/uses.rb
@@ -113,9 +113,7 @@ module Homebrew
end
end
- reqs.any? do |req|
- req.name == ff.name || [ff.name, ff.full_name].include?(req.default_formula)
- end
+ reqs.any? { |req| req.name == ff.name }
rescue FormulaUnavailableError
# Silently ignore this case as we don't care about things used in
# taps that aren't currently tapped.
diff --git a/Library/Homebrew/cmd/vendor-install.sh b/Library/Homebrew/cmd/vendor-install.sh
index bf6fe0c59..3b91dae5c 100644
--- a/Library/Homebrew/cmd/vendor-install.sh
+++ b/Library/Homebrew/cmd/vendor-install.sh
@@ -8,26 +8,26 @@ source "$HOMEBREW_LIBRARY/Homebrew/utils/lock.sh"
VENDOR_DIR="$HOMEBREW_LIBRARY/Homebrew/vendor"
-# Built from https://github.com/Homebrew/homebrew-portable.
+# Built from https://github.com/Homebrew/homebrew-portable-ruby.
if [[ -n "$HOMEBREW_MACOS" ]]
then
if [[ "$HOMEBREW_PROCESSOR" = "Intel" ]]
then
- ruby_URL="https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz"
+ ruby_URL="https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz"
+ ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.3/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz"
ruby_SHA="34ce9e4c9c1be28db564d744165aa29291426f8a3d2ef806ba4f0b9175aedb2b"
- else
- ruby_URL=""
- ruby_SHA=""
fi
elif [[ -n "$HOMEBREW_LINUX" ]]
then
case "$HOMEBREW_PROCESSOR" in
armv7l)
- ruby_URL="https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.armv7l_linux.bottle.1.tar.gz"
+ ruby_URL="https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.3.3.armv7l_linux.bottle.1.tar.gz"
+ ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.3/portable-ruby-2.3.3.armv7l_linux.bottle.1.tar.gz"
ruby_SHA="d26affe6f6ac299557a9044b311b4066b554874fc828ebc323d2705d3f4a8249"
;;
x86_64)
- ruby_URL="https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.x86_64_linux.bottle.1.tar.gz"
+ ruby_URL="https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.3.3.x86_64_linux.bottle.1.tar.gz"
+ ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.3/portable-ruby-2.3.3.x86_64_linux.bottle.1.tar.gz"
ruby_SHA="33643b1ca6f860d6df01686636326785763e5e81cf0cef37d8a7ab96a6ca1fa1"
;;
esac
@@ -90,7 +90,20 @@ fetch() {
if [[ ! -f "$temporary_path" ]]
then
- odie "Download failed: $VENDOR_URL"
+ [[ -n "$HOMEBREW_QUIET" ]] || echo "==> Downloading $VENDOR_URL2" >&2
+ "$HOMEBREW_CURL" "${curl_args[@]}" "$VENDOR_URL2" -o "$temporary_path"
+ fi
+
+ if [[ ! -f "$temporary_path" ]]
+ then
+ odie <<EOS
+Failed to download $VENDOR_URL and $VENDOR_URL2!
+
+Do not file an issue on GitHub about this: you will need to figure out for
+yourself what issue with your internet connection restricts your access to
+both Bintray (used for Homebrew bottles/binary packages) and GitHub
+(used for Homebrew updates).
+EOS
fi
trap '' SIGINT
@@ -211,8 +224,10 @@ homebrew-vendor-install() {
[[ -n "$HOMEBREW_DEBUG" ]] && set -x
url_var="${VENDOR_NAME}_URL"
+ url2_var="${VENDOR_NAME}_URL2"
sha_var="${VENDOR_NAME}_SHA"
VENDOR_URL="${!url_var}"
+ VENDOR_URL2="${!url2_var}"
VENDOR_SHA="${!sha_var}"
if [[ -z "$VENDOR_URL" || -z "$VENDOR_SHA" ]]