diff options
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/deps.rb | 21 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/info.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/style.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/uses.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/vendor-install.sh | 31 |
5 files changed, 28 insertions, 31 deletions
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/info.rb b/Library/Homebrew/cmd/info.rb index 83bb712ab..a78159a15 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -164,7 +164,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/style.rb b/Library/Homebrew/cmd/style.rb index 27047dfd0..89484d67d 100644 --- a/Library/Homebrew/cmd/style.rb +++ b/Library/Homebrew/cmd/style.rb @@ -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/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" ]] |
