language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | Homebrew | brew | 0165a810f72f6ac4dd4385c31e749fc786a04c58.json | search: handle tap aliases | Library/Homebrew/cmd/search.rb | @@ -137,13 +137,14 @@ def search_tap(user, repo, rx)
end
def search_formulae(rx)
- aliases = Formula.aliases
+ aliases = Formula.alias_full_names
results = (Formula.full_names+aliases).grep(rx).sort
+ result_names = results.map { |name| name.split("/")[-1] }.uniq
results.map do |name|
... | false |
Other | Homebrew | brew | 002f8f2eb79af9db832133ca785abf6097582e3a.json | audit: handle tap aliases | Library/Homebrew/cmd/audit.rb | @@ -210,7 +210,8 @@ def audit_class
end
end
- @@aliases ||= Formula.aliases
+ # core aliases + tap alias names + tap alias full name
+ @@aliases ||= Formula.aliases + Formula.tap_aliases
def audit_formula_name
return unless @strict
@@ -220,7 +221,7 @@ def audit_formula_name
name = formula.na... | false |
Other | Homebrew | brew | 2df6ad1beda5f29f6eaf6807ec4a53f59bb20260.json | Formula#to_hash: add bottle info
Closes Homebrew/homebrew#43848.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/formula.rb | @@ -1120,6 +1120,28 @@ def to_hash
{ "option" => opt.flag, "description" => opt.description }
end
+ hsh["bottle"] = {}
+ %w[stable devel].each do |spec_sym|
+ next unless spec = send(spec_sym)
+ next unless (bottle_spec = spec.bottle_specification).checksums.any?
+ bottle_info = {
+ ... | false |
Other | Homebrew | brew | 81bd5c40d0719d3d64dc94e163ded2cc2f57b3e6.json | Formula: add tap alias
Closes Homebrew/homebrew#43851.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/formula.rb | @@ -1011,9 +1011,22 @@ def self.installed
end.compact
end
+ # an array of all core aliases
+ # @private
+ def self.core_aliases
+ @core_aliases ||= Dir["#{HOMEBREW_LIBRARY}/Aliases/*"].map { |f| File.basename f }.sort
+ end
+
+ # an array of all tap aliases
+ # @private
+ def self.tap_aliases
+ @... | false |
Other | Homebrew | brew | 4613c9ecf5fbb0023fe44cde5c1ce1664b602b74.json | Tap: add alias method | Library/Homebrew/tap.rb | @@ -96,6 +96,18 @@ def formula_names
formula_files.map { |f| "#{name}/#{f.basename(".rb")}" }
end
+ # an array of all alias files of this {Tap}.
+ # @private
+ def alias_files
+ Pathname.glob("#{path}/Aliases/*").select(&:file?)
+ end
+
+ # an array of all aliases of this {Tap}.
+ # @private
+ def a... | false |
Other | Homebrew | brew | 5f68fff92b8b3389ca023f913f1e6d83282a3eab.json | support alias for tap | Library/Homebrew/formulary.rb | @@ -148,7 +148,15 @@ def initialize(tapped_name)
@tap = Tap.new user, repo.sub(/^homebrew-/, "")
name = @tap.formula_renames.fetch(name, name)
path = @tap.formula_files.detect { |file| file.basename(".rb").to_s == name }
- path ||= @tap.path/"#{name}.rb"
+
+ unless path
+ if (possi... | false |
Other | Homebrew | brew | 3bc2ff8e201b3f64c8431b5dc1eb5a49c05b864d.json | Accept "gcc" for --cc=gcc-5 even if not installed | Library/Homebrew/extend/ENV/shared.rb | @@ -248,7 +248,7 @@ def gcc_version_formula(name)
gcc_version_name = "gcc#{version.delete(".")}"
gcc = Formulary.factory("gcc")
- if gcc.opt_bin.join(name).exist?
+ if gcc.version_suffix == version
gcc
else
Formulary.factory(gcc_version_name) | false |
Other | Homebrew | brew | 7ce0a2dedbb580501557168cacf14e27525cd2ad.json | test-bot: check ARGV.include?("--skip-homebrew") once | Library/Homebrew/cmd/test-bot.rb | @@ -184,7 +184,7 @@ def initialize(argument, options={})
@steps = []
@tap = options[:tap]
@repository = Homebrew.homebrew_git_repo @tap
- @skip_homebrew = ARGV.include?("--skip-homebrew") || options[:skip_homebrew]
+ @skip_homebrew = options[:skip_homebrew]
url_match = argument.m... | false |
Other | Homebrew | brew | e52a12a8b5f52ed80d6717214a53cedac347d8b8.json | test-bot: fix syntax error | Library/Homebrew/cmd/test-bot.rb | @@ -870,8 +870,8 @@ def test_bot
ARGV.named.each do |argument|
test_error = false
begin
- test = Test.new(argument, :tap => tap, :skip_homebrew = skip_homebrew)
- skip_homebrew ||= true
+ test = Test.new(argument, :tap => tap, :skip_homebrew => skip_homebrew)
+ ... | false |
Other | Homebrew | brew | 96be0c2724072a0e20a8b0631abd90094cf69d1c.json | test-bot: skip some unnecessary tests. | Library/Homebrew/cmd/test-bot.rb | @@ -175,15 +175,16 @@ def fix_encoding(str)
class Test
attr_reader :log_root, :category, :name, :steps
- def initialize(argument, tap = nil)
+ def initialize(argument, options={})
@hash = nil
@url = nil
@formulae = []
@added_formulae = []
@modified_formula = []
... | false |
Other | Homebrew | brew | fe204fdf4b5e7c10f88cf19e099b5bbedd67c600.json | bottle: fix output for absolute symlinks
Closes Homebrew/homebrew#43816.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/cmd/bottle.rb | @@ -76,15 +76,12 @@ def print_filename(string, filename)
Utils.popen_read("strings", "-t", "x", "-", file.to_s) do |io|
until io.eof?
str = io.readline.chomp
-
next if ignores.any? { |i| i =~ str }
-
next unless str.include? string
-
offset, match = str.split(... | false |
Other | Homebrew | brew | 5241932b45d8d0897cb1af0f9c6dccf6c2250d29.json | keg_relocate: fix absolute symlink | Library/Homebrew/keg_relocate.rb | @@ -16,6 +16,15 @@ def fix_install_names(options = {})
end
end
end
+
+ symlink_files.each do |file|
+ link = file.readlink
+ # Don't fix relative symlinks
+ next unless link.absolute?
+ if link.to_s.start_with?(HOMEBREW_CELLAR.to_s) || link.to_s.start_with?(HOMEBREW_PREFIX.to... | false |
Other | Homebrew | brew | 5997812ed23164cf3f52fe328ec665fe8cf70622.json | Revert "python_requirement: fix ENV for python3"
This reverts commit 85271644b0083cbc0fd6fea71120d1ad859fbc2a.
Alex noticed that setting PYTHONPATH causes weirdness if we depend_on
something which may be optionally built --with-python3; PYTHONPATH
unexpectedly contains python3 modules in the depending formula if
the ... | Library/Homebrew/requirements/python_requirement.rb | @@ -24,7 +24,9 @@ class PythonRequirement < Requirement
ENV.prepend_path "PATH", Formula["python"].opt_bin
end
- ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{short_version}/site-packages"
+ if python_binary == "python"
+ ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{short_version}/... | false |
Other | Homebrew | brew | 0357673f213046b3bd29109be2e14c978e2aca3d.json | config: fix ruby path for ruby 1.8 | Library/Homebrew/cmd/config.rb | @@ -87,7 +87,7 @@ def describe_python
def describe_ruby
ruby = which "ruby"
return "N/A" if ruby.nil?
- ruby_binary = Utils.popen_read ruby, "-e", \
+ ruby_binary = Utils.popen_read ruby, "-rrbconfig", "-e", \
'include RbConfig;print"#{CONFIG["bindir"]}/#{CONFIG["ruby_install_name"]}#{CONFIG["... | false |
Other | Homebrew | brew | 43ba72fb5768427b78d1a044488c5fce1539c419.json | descriptions: use each instead of map | Library/Homebrew/descriptions.rb | @@ -27,7 +27,7 @@ def self.save_cache
# save it for future use.
def self.generate_cache
@cache = {}
- Formula.map do |f|
+ Formula.each do |f|
@cache[f.full_name] = f.desc
end
self.save_cache | false |
Other | Homebrew | brew | 65996b5887ac6e4b669e9460b8e2a4fbc7171984.json | use json to cache descriptions
We need to use `atomic_write` when saving the cache. And it seems that
CSV module doesn't support dump, so let's use JSON instead. | Library/Homebrew/descriptions.rb | @@ -1,9 +1,8 @@
require "formula"
require "formula_versions"
-require "csv"
class Descriptions
- CACHE_FILE = HOMEBREW_CACHE + "desc_cache"
+ CACHE_FILE = HOMEBREW_CACHE + "desc_cache.json"
def self.cache
@cache || self.load_cache
@@ -13,21 +12,15 @@ def self.cache
# return nil.
def self.load_cac... | false |
Other | Homebrew | brew | c5536e1e08a13352cf241a2c3f7b2aa75a8e31d6.json | Descriptions.cache_formulae: secure formulae loading | Library/Homebrew/descriptions.rb | @@ -1,4 +1,5 @@
require "formula"
+require "formula_versions"
require "csv"
class Descriptions
@@ -92,7 +93,13 @@ def self.update_cache(report)
# cache. Save the updated cache to disk, unless explicitly told not to.
def self.cache_formulae(formula_names, options = { :save => true })
if self.cache
- ... | false |
Other | Homebrew | brew | 63246fbc6c725d0bc78641a015538a6147ba4058.json | config: show all installed JDK
Closes Homebrew/homebrew#43730.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/cmd/config.rb | @@ -1,5 +1,6 @@
require "hardware"
require "software_spec"
+require "rexml/document"
module Homebrew
def config
@@ -118,14 +119,13 @@ def describe_system_ruby
end
def describe_java
- if which("java").nil?
- "N/A"
- elsif !quiet_system "/usr/libexec/java_home", "--failfast"
- "N/A"
- e... | false |
Other | Homebrew | brew | 657f4ca2ce6230d2e770f501b496b1cbb2cede00.json | rubocop: allow consistent trailing commas.
Makes diffs nicer. Could maybe be changed to `comma` to be stricter. | Library/.rubocop.yml | @@ -123,3 +123,7 @@ Style/PerlBackrefs:
# this is required for Ruby 1.8
Style/DotPosition:
EnforcedStyle: trailing
+
+# makes diffs nicer
+Style/TrailingComma:
+ EnforcedStyleForMultiline: consistent_comma | false |
Other | Homebrew | brew | c8efb058267b3500ee5c40ebf58de3feea8841a5.json | doctor: use Utils.git_available? instead of git? | Library/Homebrew/cmd/doctor.rb | @@ -59,14 +59,6 @@ def find_relative_paths(*relative_paths)
def inject_file_list(list, str)
list.inject(str) { |s, f| s << " #{f}\n" }
end
-
- # Git will always be on PATH because of the wrapper script in
- # Library/ENV/scm, so we check if there is a *real*
- # git here to avoid multiple warnings.
- ... | true |
Other | Homebrew | brew | c8efb058267b3500ee5c40ebf58de3feea8841a5.json | doctor: use Utils.git_available? instead of git? | Library/Homebrew/utils/git.rb | @@ -1,7 +1,8 @@
module Utils
def self.git_available?
return @git if instance_variable_defined?(:@git)
- git = which("git")
+ # check git in original path in case it's the wrapper script of Library/ENV/scm
+ git = which("git", ORIGINAL_PATHS.join(File::PATH_SEPARATOR))
# git isn't installed by old... | true |
Other | Homebrew | brew | 31ddce85e7d37eac032e0dd80a6f45cd2ff1d4f8.json | Homebrew.git_*: check git available | Library/Homebrew/utils.rb | @@ -150,27 +150,32 @@ def self.system(cmd, *args)
end
def self.git_origin
+ return unless Utils.git_available?
HOMEBREW_REPOSITORY.cd { `git config --get remote.origin.url 2>/dev/null`.chuzzle }
end
def self.git_head
+ return unless Utils.git_available?
HOMEBREW_REPOSITORY.cd { `git rev-... | false |
Other | Homebrew | brew | 4529df1246a8db82ee07c4945f62b801ba6bf655.json | git_available?: cache the result | Library/Homebrew/utils/git.rb | @@ -1,11 +1,12 @@
module Utils
def self.git_available?
+ return @git if instance_variable_defined?(:@git)
git = which("git")
# git isn't installed by older Xcodes
- return false if git.nil?
+ return @git = false if git.nil?
# /usr/bin/git is a popup stub when Xcode/CLT aren't installed, so b... | false |
Other | Homebrew | brew | edbb3a9e53358a720c390df23839cf8f4abb1b10.json | Use system tar for bottle TOC inspection
Closes Homebrew/homebrew#43717.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com> | Library/Homebrew/bottles.rb | @@ -39,7 +39,7 @@ def bottle_tag
end
def bottle_receipt_path(bottle_file)
- Utils.popen_read("tar", "-tzf", bottle_file, "*/*/INSTALL_RECEIPT.json").chomp
+ Utils.popen_read("/usr/bin/tar", "-tzf", bottle_file, "*/*/INSTALL_RECEIPT.json").chomp
end
def bottle_resolve_formula_names(bottle_file) | false |
Other | Homebrew | brew | 48ba192a3bac609c1bdd7355d4749d624b973c46.json | formula_support: add Pre El Capitan keg_only | Library/Homebrew/formula_support.rb | @@ -15,6 +15,8 @@ def valid?
MacOS.version < :mountain_lion
when :provided_pre_mavericks
MacOS.version < :mavericks
+ when :provided_pre_el_capitan
+ MacOS.version < :el_capitan
when :provided_until_xcode43
MacOS::Xcode.version < "4.3"
when :provided_until_xcode5
@@ -34,12 +3... | false |
Other | Homebrew | brew | 837437416840d4c4f132b7e4ba2ea0fa2f861668.json | Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Contributions/brew_bash_completion.sh | @@ -195,6 +195,18 @@ _brew_deps ()
__brew_complete_formulae
}
+_brew_desc ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --*)
+ __brewcomp "--search --name --description"
+ return
+ ;;
+ esac
+ __brew_complete_formulae
+}
+
_brew_doctor () {
local cur=... | true |
Other | Homebrew | brew | 837437416840d4c4f132b7e4ba2ea0fa2f861668.json | Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Contributions/brew_zsh_completion.zsh | @@ -40,6 +40,7 @@ _1st_arguments=(
'config:show homebrew and system configuration'
'create:create a new formula'
'deps:list dependencies and dependants of a formula'
+ 'desc:display a description of a formula'
'doctor:audits your installation for common issues'
'edit:edit a formula'
'fetch:download f... | true |
Other | Homebrew | brew | 837437416840d4c4f132b7e4ba2ea0fa2f861668.json | Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/desc.rb | @@ -0,0 +1,40 @@
+require "descriptions"
+require "cmd/search"
+
+module Homebrew
+ def desc
+ if ARGV.options_only.empty?
+ if ARGV.named.empty?
+ raise FormulaUnspecifiedError
+ exit
+ end
+ results = Descriptions.named(ARGV.formulae.map(&:full_name))
+ else
+ if ARGV.options_... | true |
Other | Homebrew | brew | 837437416840d4c4f132b7e4ba2ea0fa2f861668.json | Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/search.rb | @@ -3,6 +3,7 @@
require "utils"
require "thread"
require "official_taps"
+require 'descriptions'
module Homebrew
SEARCH_ERROR_QUEUE = Queue.new
@@ -23,11 +24,7 @@ def search
elsif ARGV.include? "--desc"
query = ARGV.next
rx = query_regexp(query)
- Formula.each do |formula|
- if f... | true |
Other | Homebrew | brew | 837437416840d4c4f132b7e4ba2ea0fa2f861668.json | Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/tap.rb | @@ -1,4 +1,5 @@
require "tap"
+require "descriptions"
module Homebrew
def tap
@@ -41,6 +42,7 @@ def install_tap(user, repo, clone_target = nil)
formula_count = tap.formula_files.size
puts "Tapped #{formula_count} formula#{plural(formula_count, "e")} (#{tap.path.abv})"
+ Descriptions.cache_formulae... | true |
Other | Homebrew | brew | 837437416840d4c4f132b7e4ba2ea0fa2f861668.json | Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/untap.rb | @@ -1,4 +1,5 @@
require "cmd/tap" # for tap_args
+require "descriptions"
module Homebrew
def untap
@@ -13,6 +14,7 @@ def untap
tap.unpin if tap.pinned?
formula_count = tap.formula_files.size
+ Descriptions.uncache_formulae(tap.formula_names)
tap.path.rmtree
tap.path.dirname.rmd... | true |
Other | Homebrew | brew | 837437416840d4c4f132b7e4ba2ea0fa2f861668.json | Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/update.rb | @@ -2,6 +2,7 @@
require "formula_versions"
require "migrator"
require "formulary"
+require "descriptions"
module Homebrew
def update
@@ -100,6 +101,7 @@ def update
puts "Updated Homebrew from #{master_updater.initial_revision[0, 8]} to #{master_updater.current_revision[0, 8]}."
report.dump
e... | true |
Other | Homebrew | brew | 837437416840d4c4f132b7e4ba2ea0fa2f861668.json | Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/descriptions.rb | @@ -0,0 +1,151 @@
+require "formula"
+require "csv"
+
+class Descriptions
+ CACHE_FILE = HOMEBREW_CACHE + "desc_cache"
+
+ def self.cache
+ @cache || self.load_cache
+ end
+
+ # If the cache file exists, load it into, and return, a hash; otherwise,
+ # return nil.
+ def self.load_cache
+ if CACHE_FILE.exist... | true |
Other | Homebrew | brew | 837437416840d4c4f132b7e4ba2ea0fa2f861668.json | Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/manpages/brew.1.md | @@ -126,6 +126,16 @@ Note that these flags should only appear after a command.
type dependencies, pass `--skip-build`. Similarly, pass `--skip-optional`
to skip `:optional` dependencies.
+ * `desc` <formula>:
+ Display <formula>'s name and one-line description.
+
+ * `desc [-s|-n|-d] <pattern>`:
+ S... | true |
Other | Homebrew | brew | 837437416840d4c4f132b7e4ba2ea0fa2f861668.json | Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/utils.rb | @@ -255,8 +255,8 @@ def puts_columns(items, star_items = [])
# determine the best width to display for different console sizes
console_width = `/bin/stty size`.chomp.split(" ").last.to_i
console_width = 80 if console_width <= 0
- longest = items.sort_by(&:length).last
- optimal_col_width = (console... | true |
Other | Homebrew | brew | 837437416840d4c4f132b7e4ba2ea0fa2f861668.json | Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | share/man/man1/brew.1 | @@ -128,6 +128,12 @@ If \fB\-\-installed\fR is passed, show dependencies for all installed formulae\.
By default, \fBdeps\fR shows dependencies for \fIformulae\fR\. To skip the \fB:build\fR type dependencies, pass \fB\-\-skip\-build\fR\. Similarly, pass \fB\-\-skip\-optional\fR to skip \fB:optional\fR dependencies\.
... | true |
Other | Homebrew | brew | a3505b29c66a43f54554d03e8d63adb0c002ba88.json | update rename documentation
Update commit format for formula renames
Closes Homebrew/homebrew#43644.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | share/doc/homebrew/Rename-A-Formula.md | @@ -5,7 +5,7 @@ you need:
1. Rename formula file and its class to new formula. New name must meet all the rules of naming. Fix any test failures that may occur due to the stricter requirements for new formula than existing formula (e.g. brew audit --strict must pass for that formula).
-2. Create a pull request to ... | false |
Other | Homebrew | brew | ff0f6598ce6057a36c222e2ec374d4ae37e2258a.json | Formulary: allow loading formula from contents | Library/Homebrew/formulary.rb | @@ -15,22 +15,26 @@ def self.formula_class_get(path)
FORMULAE.fetch(path)
end
- def self.load_formula(name, path)
+ def self.load_formula(name, path, contents, namespace)
mod = Module.new
- const_set("FormulaNamespace#{Digest::MD5.hexdigest(path.to_s)}", mod)
- contents = path.open("r") { |f| set... | false |
Other | Homebrew | brew | cbb91c5516ac6d2a673670edf5b7d509abe6df56.json | exceptions: handle HOMEBREW_NO_GITHUB_API case.
Closes Homebrew/homebrew#43618. | Library/Homebrew/exceptions.rb | @@ -245,7 +245,7 @@ def dump
end
end
puts
- unless RUBY_VERSION < "1.8.7" || issues.empty?
+ if RUBY_VERSION >= "1.8.7" && issues && issues.any?
puts "These open issues may also help:"
puts issues.map { |i| "#{i["title"]} #{i["html_url"]}" }.join("\n")
end | false |
Other | Homebrew | brew | 881d68d35556097ef62031b7e5728e445d74d558.json | tap-readme: create README in tap path. | Library/Homebrew/cmd/tap-readme.rb | @@ -25,7 +25,7 @@ def tap_readme
EOS
puts template if ARGV.verbose?
- path = Pathname.new("./README.md")
+ path = HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-#{name}/README.md"
raise "#{path} already exists" if path.exist?
path.write template
end | false |
Other | Homebrew | brew | f279a1397733c81a580bd21ebef9815fb290a8a5.json | formula_installer: fix syntax warning
Library/Homebrew/formula_installer.rb:636: warning: shadowing outer local variable - conflict_file
Library/Homebrew/formula_installer.rb:636: warning: shadowing outer local variable - backup_file
Closes Homebrew/homebrew#43602.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/formula_installer.rb | @@ -583,7 +583,7 @@ def link(keg)
keg.remove_linked_keg_record
end
- link_overwrite_backup = {} # dict: conflict file -> backup file
+ link_overwrite_backup = {} # Hash: conflict file -> backup file
backup_dir = HOMEBREW_CACHE/"Backup"
begin
@@ -623,9 +623,9 @@ def link(keg)
@show... | false |
Other | Homebrew | brew | db2552828b9008d848e55b5e9e1442521d7ce593.json | test_integration_cmds: fix syntax warning
Library/Homebrew/test/test_integration_cmds.rb:68: warning: ambiguous first argument; put parentheses or even spaces | Library/Homebrew/test/test_integration_cmds.rb | @@ -65,7 +65,7 @@ def test_cellar_formula
end
def test_env
- assert_match /CMAKE_PREFIX_PATH="#{HOMEBREW_PREFIX}[:"]/,
+ assert_match %r{CMAKE_PREFIX_PATH="#{HOMEBREW_PREFIX}[:"]},
cmd("--env")
end
| false |
Other | Homebrew | brew | b38498d9dc72f3be61465d72f180e2c024832748.json | outdated: fix syntax warning
Library/Homebrew/cmd/outdated.rb:27: warning: shadowing outer local variable - dir | Library/Homebrew/cmd/outdated.rb | @@ -24,8 +24,8 @@ def outdated_brews(formulae)
end
end
- f.rack.subdirs.each do |dir|
- keg = Keg.new dir
+ f.rack.subdirs.each do |keg_dir|
+ keg = Keg.new keg_dir
version = keg.version
all_versions << version
older_version = f.pkg_version <= version | false |
Other | Homebrew | brew | 5eab79e70f6887869d3b38adcd74296218de9269.json | manpage: add unlink --dry-run | Library/Homebrew/manpages/brew.1.md | @@ -429,11 +429,14 @@ Note that these flags should only appear after a command.
Example: `brew install jruby && brew test jruby`
- * `unlink` <formula>:
+ * `unlink [--dry-run]` <formula>:
Remove symlinks for <formula> from the Homebrew prefix. This can be useful
for temporarily disabling a formula... | true |
Other | Homebrew | brew | 5eab79e70f6887869d3b38adcd74296218de9269.json | manpage: add unlink --dry-run | share/doc/homebrew/brew.1.html | @@ -378,10 +378,13 @@ <h2 id="COMMANDS">COMMANDS</h2>
launched with access to IRB or a shell inside the temporary test directory.</p>
<p>Example: <code>brew install jruby && brew test jruby</code></p></li>
-<li><p><code>unlink</code> <var>formula</var>:
+<li><p><code>unlink [--dry-run]</code> <var>formula</... | true |
Other | Homebrew | brew | 5eab79e70f6887869d3b38adcd74296218de9269.json | manpage: add unlink --dry-run | share/man/man1/brew.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "August 2015" "Homebrew" "brew"
+.TH "BREW" "1" "September 2015" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for OS X
@@ -409,7 +409,10 @@ If \fB\-\-debug\fR is passed and t... | true |
Other | Homebrew | brew | 8830e401a9332abd6d75261a7116851a2a9c135b.json | formula_installer: check has_apple_developer_tools? once
Closes Homebrew/homebrew#43534.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/formula_installer.rb | @@ -162,7 +162,7 @@ def install
unless ignore_deps?
deps = compute_dependencies
- check_dependencies_bottled(deps) if pour_bottle?
+ check_dependencies_bottled(deps) if pour_bottle? && !MacOS.has_apple_developer_tools?
install_dependencies(deps)
end
@@ -248,10 +248,7 @@ def compute... | false |
Other | Homebrew | brew | b505c65b78fdb481c1c40f7a1655663aabf56548.json | xcode: update 10.11 clang expectation | Library/Homebrew/os/mac/xcode.rb | @@ -165,7 +165,7 @@ def installed?
def latest_version
case MacOS.version
- when "10.11" then "700.0.65"
+ when "10.11" then "700.0.72"
when "10.10" then "602.0.53"
when "10.9" then "600.0.57"
when "10.8" then "503.0.40" | false |
Other | Homebrew | brew | a29832484c8ccceeb5437d4793d3a6c186cb304c.json | fix style problems in migrator
Closes Homebrew/homebrew#43473.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/migrator.rb | @@ -44,37 +44,70 @@ def initialize(formula, tap)
end
end
+ # instance of new name formula
attr_reader :formula
- attr_reader :oldname, :oldpath, :old_pin_record, :old_opt_record
- attr_reader :old_linked_keg_record, :oldkeg, :old_tabs, :old_tap
- attr_reader :newname, :newpath, :new_pin_record
+
+ # o... | true |
Other | Homebrew | brew | a29832484c8ccceeb5437d4793d3a6c186cb304c.json | fix style problems in migrator
Closes Homebrew/homebrew#43473.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/test/test_migrator.rb | @@ -117,10 +117,6 @@ def test_backup_cellar
assert_predicate @old_keg_record/"bin", :directory?
end
- def test_oldkeg_linked
- assert_predicate @migrator, :oldkeg_linked?
- end
-
def test_repin
@new_keg_record.join("bin").mkpath
expected_relative = @new_keg_record.relative_path_from HOMEBREW... | true |
Other | Homebrew | brew | 9bd3e1eeab2b0942746b56e810764c0821666579.json | tips-n-tricks: add homebrew-mode to editor plugins | share/doc/homebrew/Tips-N'-Tricks.md | @@ -120,10 +120,21 @@ export HOMEBREW_NO_EMOJI=1
This sets the HOMEBREW_NO_EMOJI environment variable, causing homebrew to hide all emoji.
-## Sublime text: Syntax for formulae including the diff
+## Editor plugins
-In Sublime Text 2/3, you can use Package Control to install [Homebrew-formula-syntax](https://git... | false |
Other | Homebrew | brew | 190902e98fcde1c9601bf9a674caf0796ed9e46b.json | tap: ensure git is installed
Closes Homebrew/homebrew#43463.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/cmd/tap.rb | @@ -19,6 +19,9 @@ def tap
end
def install_tap(user, repo, clone_target = nil)
+ # ensure git is installed
+ Utils.ensure_git_installed!
+
tap = Tap.new user, repo
return false if tap.installed?
ohai "Tapping #{tap}" | false |
Other | Homebrew | brew | 03f7e19ca68ffbb1976633bd4138753fd3f76898.json | update: ensure git is installed | Library/Homebrew/cmd/update.rb | @@ -12,6 +12,9 @@ def update
EOS
end
+ # ensure git is installed
+ Utils.ensure_git_installed!
+
# ensure GIT_CONFIG is unset as we need to operate on .git/config
ENV.delete("GIT_CONFIG")
| false |
Other | Homebrew | brew | 8d5c445daa7520c75f7b3c2a132eda2ec86e0727.json | homebrew_version_string: check git available | Library/Homebrew/utils.rb | @@ -162,8 +162,7 @@ def self.git_last_commit_date
end
def self.homebrew_version_string
- pretty_revision = git_short_head
- if pretty_revision
+ if Utils.git_available? && (pretty_revision = git_short_head)
last_commit = git_last_commit_date
"#{HOMEBREW_VERSION} (git revision #{pretty_rev... | false |
Other | Homebrew | brew | 71f794260b8ea0312b5a733095e2856c9a4719bb.json | add git utils
Two methods:
* `Utils.git_available?` checks whether git is installed.
* `Utils.ensure_git_installed!` installs git for users who don't install
Xcode or CLT. | Library/Homebrew/utils.rb | @@ -5,6 +5,7 @@
require "utils/inreplace"
require "utils/popen"
require "utils/fork"
+require "utils/git"
require "open-uri"
class Tty | true |
Other | Homebrew | brew | 71f794260b8ea0312b5a733095e2856c9a4719bb.json | add git utils
Two methods:
* `Utils.git_available?` checks whether git is installed.
* `Utils.ensure_git_installed!` installs git for users who don't install
Xcode or CLT. | Library/Homebrew/utils/git.rb | @@ -0,0 +1,23 @@
+module Utils
+ def self.git_available?
+ git = which("git")
+ # git isn't installed by older Xcodes
+ return false if git.nil?
+ # /usr/bin/git is a popup stub when Xcode/CLT aren't installed, so bail out
+ return false if git == "/usr/bin/git" && !OS::Mac.has_apple_developer_tools?
+ ... | true |
Other | Homebrew | brew | 370df177c46e9f13415b2da99b868fe56546764c.json | python_requirement: fix ENV for python3
Closes Homebrew/homebrew#43453. | Library/Homebrew/requirements/python_requirement.rb | @@ -24,9 +24,7 @@ class PythonRequirement < Requirement
ENV.prepend_path "PATH", Formula["python"].opt_bin
end
- if python_binary == "python"
- ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{short_version}/site-packages"
- end
+ ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{short_... | false |
Other | Homebrew | brew | 79ea14b73867f52a6016c97ca8e38f5c7f7672e9.json | cmd/search: fix filtering of aliases in results
By directly modifying the results array with
`results[i] = "#{name} (installed)"`, it appeared on successive
iterations that the canonical name was no longer in the array, so
aliases were not removed.
See https://github.com/Homebrew/homebrew/commit/9efe5b554ce9cf6626d97... | Library/Homebrew/cmd/search.rb | @@ -143,15 +143,16 @@ def search_formulae(rx)
aliases = Formula.aliases
results = (Formula.full_names+aliases).grep(rx).sort
- results.each_with_index do |name, i|
+ results.map do |name|
canonical_name = Formulary.canonical_name(name)
- # Remove aliases from results when the full name was... | false |
Other | Homebrew | brew | 0f6d3b2923a41bd48f58cf202db96d19c8b98868.json | tap_migrations: fix the sorting | Library/Homebrew/tap_migrations.rb | @@ -67,8 +67,8 @@
"freerdp" => "homebrew/x11",
"fsv" => "homebrew/boneyard",
"fuse-zip" => "homebrew/fuse",
- "fuse4x-kext" => "homebrew/fuse",
"fuse4x" => "homebrew/fuse",
+ "fuse4x-kext" => "homebrew/fuse",
"gant" => "homebrew/boneyard",
"gcsfuse" => "homebrew/fuse",
"geany" => "homebrew/x11",
... | false |
Other | Homebrew | brew | 9520449823e4ffe7028d2e2b36ff1d3a9add9a60.json | sandbox: allow writing to /dev/zero
Closes Homebrew/homebrew#43344. | Library/Homebrew/sandbox.rb | @@ -136,6 +136,7 @@ class SandboxProfile
(literal "/dev/ptmx")
(literal "/dev/dtracehelper")
(literal "/dev/null")
+ (literal "/dev/zero")
(regex #"^/dev/fd/[0-9]+$")
(regex #"^/dev/ttys?[0-9]*$")
) | false |
Other | Homebrew | brew | fc445d97d36d7d38d83853c0f9d4abaa27b343fa.json | outdated: update error for different taps
Closes Homebrew/homebrew#43269.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/outdated.rb | @@ -18,8 +18,10 @@ def outdated_brews(formulae)
all_versions = []
older_or_same_tap_versions = []
- if f.oldname && !f.rack.exist? && (HOMEBREW_CELLAR/f.oldname).exist?
- raise Migrator::MigrationNeededError.new(f)
+ if f.oldname && !f.rack.exist? && (dir = HOMEBREW_CELLAR/f.oldname).ex... | false |
Other | Homebrew | brew | c992749986a949e84b62dcc4070751652d355b31.json | doctor: add system curl <10.7 check
Closes Homebrew/homebrew#43283.
Closes Homebrew/homebrew#43298.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com> | Library/Homebrew/cmd/doctor.rb | @@ -653,13 +653,23 @@ def check_user_path_3
end
end
+ def check_for_bad_curl
+ if MacOS.version <= "10.6" && !Formula["curl"].installed? then <<-EOS.undent
+ The system curl on 10.6 and below is often incapable of supporting
+ modern secure connections & will fail on fetching formulae.
+ We... | false |
Other | Homebrew | brew | 94bb92b4c1c27ad32be784975b03a337cd61695d.json | doctor: add check for SSL_CERT_DIR
Closes Homebrew/homebrew#43154.
Closes Homebrew/homebrew#43277.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com> | Library/Homebrew/cmd/doctor.rb | @@ -664,6 +664,17 @@ def check_user_curlrc
end
end
+ def check_for_unsupported_curl_vars
+ # Support for SSL_CERT_DIR seemed to be removed in the 10.10.5 update.
+ if MacOS.version >= :yosemite && !ENV["SSL_CERT_DIR"].nil? then <<-EOS.undent
+ SSL_CERT_DIR support was removed from Apple's curl.
+ ... | false |
Other | Homebrew | brew | 09c810c7f428b838b9b327d1c92f87ebc6e76447.json | add link_overwrite DSL
Sometimes we accidentally install files outside prefix. After we fix that,
users will get nasty link conflict error. So we create a whitelist here to
allow overwriting certain files. e.g.
link_overwrite "bin/foo", "lib/bar"
link_overwrite "share/man/man1/baz-*"
During FormulaInstaller#link,... | Library/Homebrew/formula.rb | @@ -11,6 +11,7 @@
require "pkg_version"
require "tap"
require "formula_renames"
+require "keg"
# A formula provides instructions and metadata for Homebrew to install a piece
# of software. Every Homebrew formula is a {Formula}.
@@ -330,7 +331,6 @@ def installed_prefix
# The currently installed version for thi... | true |
Other | Homebrew | brew | 09c810c7f428b838b9b327d1c92f87ebc6e76447.json | add link_overwrite DSL
Sometimes we accidentally install files outside prefix. After we fix that,
users will get nasty link conflict error. So we create a whitelist here to
allow overwriting certain files. e.g.
link_overwrite "bin/foo", "lib/bar"
link_overwrite "share/man/man1/baz-*"
During FormulaInstaller#link,... | Library/Homebrew/formula_installer.rb | @@ -589,9 +589,20 @@ def link(keg)
keg.remove_linked_keg_record
end
+ link_overwrite_backup = {} # dict: conflict file -> backup file
+ backup_dir = HOMEBREW_CACHE/"Backup"
+
begin
keg.link
rescue Keg::ConflictError => e
+ conflict_file = e.dst
+ if formula.link_overwrite?... | true |
Other | Homebrew | brew | 3d1f9e0a9c6185b470630c29e44714ac2d050371.json | exceptions: change 10.9 Xcode URL | Library/Homebrew/exceptions.rb | @@ -279,7 +279,7 @@ def initialize(formulae)
elsif MacOS.version == "10.9"
xcode_text = <<-EOS.undent
To continue, you must install Xcode from:
- https://developer.apple.com/xcode/downloads/
+ https://developer.apple.com/downloads/
or the CLT by running:... | false |
Other | Homebrew | brew | ff8520e61be2b1ad36b676abfb426d5b95a71043.json | exceptions: use xcode frontpage | Library/Homebrew/exceptions.rb | @@ -279,7 +279,7 @@ def initialize(formulae)
elsif MacOS.version == "10.9"
xcode_text = <<-EOS.undent
To continue, you must install Xcode from:
- https://developer.apple.com/downloads/
+ https://developer.apple.com/xcode/downloads/
or the CLT by running:... | false |
Other | Homebrew | brew | 56795ec1ed4f32d770afb50f65fc7e4e007e42f9.json | Call check_xcode check for CLT, too | Library/Homebrew/cmd/install.rb | @@ -159,7 +159,7 @@ def check_cellar
def perform_preinstall_checks
check_ppc
check_writable_install_location
- check_xcode if MacOS::Xcode.installed?
+ check_xcode if MacOS.has_apple_developer_tools?
check_cellar
end
| false |
Other | Homebrew | brew | 91e598cf3f88591f2146218eaa2ecc2a3a261e31.json | Install: add BuildToolsError and BuildFlagsError
Add these new errors, and guards in formula installation and
cmd/{,un,re}install to match, move can_build? to the MacOS module,
flatten conditions, remove redundant can_build? check
reinstate removed (doctor) check | Library/Homebrew/cmd/install.rb | @@ -38,6 +38,14 @@ def install
end
end
+ # if the user's flags will prevent bottle only-installations when no
+ # developer tools are available, we need to stop them early on
+ if !MacOS.can_build?
+ bf = ARGV.collect_build_flags
+
+ raise BuildFlagsError.new(bf) if !bf.em... | true |
Other | Homebrew | brew | 91e598cf3f88591f2146218eaa2ecc2a3a261e31.json | Install: add BuildToolsError and BuildFlagsError
Add these new errors, and guards in formula installation and
cmd/{,un,re}install to match, move can_build? to the MacOS module,
flatten conditions, remove redundant can_build? check
reinstate removed (doctor) check | Library/Homebrew/cmd/reinstall.rb | @@ -2,6 +2,14 @@
module Homebrew
def reinstall
+ if !MacOS.can_build?
+ bf = ARGV.collect_build_flags
+
+ if !bf.empty?
+ raise BuildFlagsError.new(bf)
+ end
+ end
+
ARGV.resolved_formulae.each { |f| reinstall_formula(f) }
end
| true |
Other | Homebrew | brew | 91e598cf3f88591f2146218eaa2ecc2a3a261e31.json | Install: add BuildToolsError and BuildFlagsError
Add these new errors, and guards in formula installation and
cmd/{,un,re}install to match, move can_build? to the MacOS module,
flatten conditions, remove redundant can_build? check
reinstate removed (doctor) check | Library/Homebrew/cmd/upgrade.rb | @@ -3,6 +3,14 @@
module Homebrew
def upgrade
+ if !MacOS.can_build?
+ bf = ARGV.collect_build_flags
+
+ if !bf.empty?
+ raise BuildFlagsError.new(bf)
+ end
+ end
+
Homebrew.perform_preinstall_checks
if ARGV.named.empty? | true |
Other | Homebrew | brew | 91e598cf3f88591f2146218eaa2ecc2a3a261e31.json | Install: add BuildToolsError and BuildFlagsError
Add these new errors, and guards in formula installation and
cmd/{,un,re}install to match, move can_build? to the MacOS module,
flatten conditions, remove redundant can_build? check
reinstate removed (doctor) check | Library/Homebrew/exceptions.rb | @@ -226,6 +226,100 @@ def dump
end
end
+# raised by FormulaInstaller.check_dependencies_bottled and
+# FormulaInstaller.install if the formula or its dependencies are not bottled
+# and are being installed on a system without necessary build tools
+class BuildToolsError < RuntimeError
+ def initialize(formulae)
... | true |
Other | Homebrew | brew | 91e598cf3f88591f2146218eaa2ecc2a3a261e31.json | Install: add BuildToolsError and BuildFlagsError
Add these new errors, and guards in formula installation and
cmd/{,un,re}install to match, move can_build? to the MacOS module,
flatten conditions, remove redundant can_build? check
reinstate removed (doctor) check | Library/Homebrew/extend/ARGV.rb | @@ -200,6 +200,19 @@ def env
value "env"
end
+ # collect any supplied build flags into an array for reporting
+ def collect_build_flags
+ build_flags = []
+
+ build_flags << '--HEAD' if build_head?
+ build_flags << '--universal' if build_universal?
+ build_flags << '--32-bit' if build_32_bit?
+ ... | true |
Other | Homebrew | brew | 91e598cf3f88591f2146218eaa2ecc2a3a261e31.json | Install: add BuildToolsError and BuildFlagsError
Add these new errors, and guards in formula installation and
cmd/{,un,re}install to match, move can_build? to the MacOS module,
flatten conditions, remove redundant can_build? check
reinstate removed (doctor) check | Library/Homebrew/formula_installer.rb | @@ -147,6 +147,10 @@ def install
check_conflicts
+ if !pour_bottle? && !MacOS.can_build?
+ raise BuildToolsError.new([formula])
+ end
+
if !ignore_deps?
deps = compute_dependencies
check_dependencies_bottled(deps) if pour_bottle? | true |
Other | Homebrew | brew | 91e598cf3f88591f2146218eaa2ecc2a3a261e31.json | Install: add BuildToolsError and BuildFlagsError
Add these new errors, and guards in formula installation and
cmd/{,un,re}install to match, move can_build? to the MacOS module,
flatten conditions, remove redundant can_build? check
reinstate removed (doctor) check | Library/Homebrew/os/mac.rb | @@ -52,6 +52,10 @@ def otool
end
end
+ def can_build?
+ Xcode.installed? || CLT.installed?
+ end
+
def active_developer_dir
@active_developer_dir ||= Utils.popen_read("/usr/bin/xcode-select", "-print-path").strip
end | true |
Other | Homebrew | brew | dcc394c3f748946eefd9b80da003cd5f1abb5fb7.json | add cctools requirement | Library/Homebrew/requirements/cctools_requirement.rb | @@ -0,0 +1,8 @@
+class CctoolsRequirement < Requirement
+ fatal true
+ default_formula 'cctools'
+
+ satisfy do
+ MacOS::XCode.installed? || MacOS::CLT.installed?
+ end
+end | false |
Other | Homebrew | brew | dcfac4f5714c8d37e38b62b2c735b29d3805c28e.json | add install_relocation_tools stub | Library/Homebrew/formula_installer.rb | @@ -166,6 +166,7 @@ def install
if pour_bottle?(:warn => true)
begin
+ install_relocation_tools if formula.bottle.needs_relocation?
pour
rescue => e
raise if ARGV.homebrew_developer?
@@ -326,6 +327,11 @@ def install_dependencies(deps)
@show_header = true unless deps.em... | false |
Other | Homebrew | brew | ab10ab42fa2f85f5b7abce733a02ea7a47e98683.json | BottleSpecification: add does_not_need_relocation field
Toggled with does_not_need_relocation method in bottle block.
Also declare needs_relocation? accessors in software/bottle specs. | Library/Homebrew/software_spec.rb | @@ -245,6 +245,10 @@ def compatible_cellar?
@spec.compatible_cellar?
end
+ def needs_relocation?
+ @spec.needs_relocation?
+ end
+
def stage
resource.downloader.stage
end
@@ -270,6 +274,7 @@ def initialize
@prefix = DEFAULT_PREFIX
@cellar = DEFAULT_CELLAR
@collector = BottleColl... | false |
Other | Homebrew | brew | 329358c33c4aa317cb4be6802eddd2a6b8c800fc.json | manpage: add doc for tap --list-official and --list-pinned | Library/Homebrew/manpages/brew.1.md | @@ -390,6 +390,12 @@ Note that these flags should only appear after a command.
* `tap --repair`:
Migrate tapped formulae from symlink-based to directory-based structure.
+ * `tap --list-official`:
+ List all official taps.
+
+ * `tap --list-pinned`:
+ List all pinned taps.
+
* `tap-info` <tap>:
... | true |
Other | Homebrew | brew | 329358c33c4aa317cb4be6802eddd2a6b8c800fc.json | manpage: add doc for tap --list-official and --list-pinned | share/man/man1/brew.1 | @@ -373,6 +373,12 @@ By default, the repository is cloned as a shallow copy (\fB\-\-depth=1\fR), but
\fBtap \-\-repair\fR: Migrate tapped formulae from symlink\-based to directory\-based structure\.
.
.IP "\(bu" 4
+\fBtap \-\-list\-official\fR: List all official taps\.
+.
+.IP "\(bu" 4
+\fBtap \-\-list\-pinned\fR: L... | true |
Other | Homebrew | brew | ac713863731b792e45776e990131f8774f5a7f65.json | test-bot: tap TapDependency recursively
Closes Homebrew/homebrew#43145.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/cmd/test-bot.rb | @@ -409,12 +409,16 @@ def formula(formula_name)
reqs |= formula.devel.requirements.to_a
end
+ begin
+ formula.recursive_dependencies
+ rescue TapFormulaUnavailableError => e
+ raise if e.tap.installed?
+ safe_system "brew", "tap", e.tap.name
+ retry
+ end
+
... | false |
Other | Homebrew | brew | 212d0b82fd33d6520d2639ee6c994eb224623b5a.json | xcode: update 10.11 clang | Library/Homebrew/os/mac/xcode.rb | @@ -163,7 +163,7 @@ def installed?
def latest_version
case MacOS.version
- when "10.11" then "700.0.59.1"
+ when "10.11" then "700.0.65"
when "10.10" then "602.0.53"
when "10.9" then "600.0.57"
when "10.8" then "503.0.40" | false |
Other | Homebrew | brew | e4480cf6bf80e8de737581f8b3ce3068334747c4.json | update: add formula renames to report | Library/Homebrew/cmd/update.rb | @@ -62,27 +62,18 @@ def update
tabs.each(&:write)
end if load_tap_migrations
- # Migrate installed renamed formulae from main Homebrew repository.
- if load_formula_renames
- report.select_formula(:D).each do |oldname|
- newname = FORMULA_RENAMES[oldname]
- next unless newname
- ... | false |
Other | Homebrew | brew | 72a11b7d1166d14b82e1124920a0c80586e7c057.json | test_migrator: fix lock file leak
Closes Homebrew/homebrew#43025.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/test/test_migrator.rb | @@ -93,6 +93,8 @@ def teardown
rmtree HOMEBREW_PREFIX/"opt" if (HOMEBREW_PREFIX/"opt").directory?
# What to do with pin?
@new_f.unpin
+
+ FormulaLock::LOCKDIR.children.each(&:unlink)
end
def test_move_cellar | false |
Other | Homebrew | brew | a380ec636eb02e1412ee6657449b9a159182c9da.json | enable sandbox on test-bot
Closes Homebrew/homebrew#43014.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/cmd/test-bot.rb | @@ -710,6 +710,7 @@ def test_bot
end
ENV["HOMEBREW_DEVELOPER"] = "1"
+ ENV["HOMEBREW_SANDBOX"] = "1"
ENV["HOMEBREW_NO_EMOJI"] = "1"
if ARGV.include?("--ci-master") || ARGV.include?("--ci-pr") \
|| ARGV.include?("--ci-testing") | false |
Other | Homebrew | brew | dc4feaf56b5ba36c579277ea8fbc2f983f2bcdf0.json | test_keg: add tests for oldname optlink
Closes Homebrew/homebrew#42998.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/test/test_keg.rb | @@ -48,6 +48,36 @@ def test_unlinking_keg
refute_predicate @dst, :symlink?
end
+ def test_oldname_opt_record
+ assert_nil @keg.oldname_opt_record
+ oldname_opt_record = HOMEBREW_PREFIX/"opt/oldfoo"
+ oldname_opt_record.make_relative_symlink(HOMEBREW_CELLAR/"foo/1.0")
+ assert_equal oldname_opt_re... | false |
Other | Homebrew | brew | 0bf2f92f467b4b4cca889a9e53299772bd1641f9.json | outdated: remove unnecessary nested if | Library/Homebrew/cmd/outdated.rb | @@ -18,10 +18,8 @@ def outdated_brews(formulae)
all_versions = []
older_or_same_tap_versions = []
- if f.oldname && !f.rack.exist?
- if Pathname.new("#{HOMEBREW_CELLAR}/#{f.oldname}").exist?
- raise Migrator::MigrationNeededError.new(f)
- end
+ if f.oldname && !f.rack.ex... | false |
Other | Homebrew | brew | 8a766c476808d0c1afd29c55a6f950d074196833.json | Formulary.to_rack: follow the symlink | Library/Homebrew/formulary.rb | @@ -198,12 +198,11 @@ def self.from_rack(rack, spec = nil)
def self.to_rack(ref)
# First, check whether the rack with the given name exists.
if (rack = HOMEBREW_CELLAR/File.basename(ref, ".rb")).directory?
- return rack
+ return rack.resolved_path
end
# Second, use canonical name to l... | false |
Other | Homebrew | brew | 3a535ed36b346694ab9f2143ef5f28e314318520.json | make path instead of symlink for lib/R
Moves us towards being able to support formulae that install R bindings,
like nonpareil in homebrew-science.
Some discussion in Homebrew/homebrew-science#2559.
Closes Homebrew/homebrew#42539. | Library/Homebrew/keg.rb | @@ -300,6 +300,7 @@ def link(mode = OpenStruct.new)
when /^perl5/ then :mkpath
when "php" then :mkpath
when /^python[23]\.\d/ then :mkpath
+ when /^R/ then :mkpath
when /^ruby/ then :mkpath
# Everything else is symlinked to the cellar
else :link | false |
Other | Homebrew | brew | 541459791351a69b7b70047ee5e0c2c05797de92.json | cleanup: avoid duplicated logic
Closes Homebrew/homebrew#42900.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/cmd/cleanup.rb | @@ -31,12 +31,8 @@ def cleanup_logs
end
def cleanup_cellar
- Formula.racks.each do |rack|
- begin
- cleanup_formula Formulary.from_rack(rack)
- rescue FormulaUnavailableError, TapFormulaAmbiguityError
- # Don't complain about directories from DIY installs
- end
+ Formula.insta... | false |
Other | Homebrew | brew | d5535bf564e70ab1c0199a5c18fa842e8b499209.json | doc: use relative links | share/doc/homebrew/Acceptable-Formulae.md | @@ -6,7 +6,7 @@ own!
### We try hard to avoid dupes in Homebrew/homebrew
Stuff that comes with OS X or libraries that are provided by
-[RubyGems, CPAN or PyPi](https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Gems,-Eggs-and-Perl-Modules.md)
+[RubyGems, CPAN or PyPi](Gems,-Eggs-and-Perl-Modules.md... | true |
Other | Homebrew | brew | d5535bf564e70ab1c0199a5c18fa842e8b499209.json | doc: use relative links | share/doc/homebrew/FAQ.md | @@ -174,7 +174,7 @@ creating a separate user account especially for use of Homebrew.
### Why isn’t a particular command documented?
-If it’s not in `man brew`, it’s probably an external command. These are documented [here](https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/External-Commands.md).
+... | true |
Other | Homebrew | brew | d5535bf564e70ab1c0199a5c18fa842e8b499209.json | doc: use relative links | share/doc/homebrew/Python-for-Formula-Authors.md | @@ -77,7 +77,7 @@ The first line copies all of the executables to bin. The second line writes stub
All Python dependencies of applications that are not packaged by Homebrew (and those dependencies' Python dependencies, recursively) **should** be unconditionally downloaded as `Resource`s and installed into the applic... | true |
Other | Homebrew | brew | 83ab0acfc0fae4968309d2ce248ec7478436c476.json | test-bot: remove custom $HOME on --cleanup. | Library/Homebrew/cmd/test-bot.rb | @@ -608,6 +608,10 @@ def cleanup_after
git "stash", "pop"
test "brew", "cleanup", "--prune=7"
git "gc", "--auto"
+ if ARGV.include? "--local"
+ FileUtils.rm_rf ENV["HOMEBREW_HOME"]
+ FileUtils.rm_rf ENV["HOMEBREW_LOGS"]
+ end
end
FileUtils.rm_rf... | false |
Other | Homebrew | brew | 15c3fb32b26228b4cef2bb33863e8072ab270a41.json | cleanup: remove SCM directories recursively. | Library/Homebrew/cmd/cleanup.rb | @@ -73,7 +73,7 @@ def cleanup_cache
if path.file?
cleanup_path(path) { path.unlink }
elsif path.directory? && path.to_s.include?("--")
- cleanup_path(path) { path.rmdir }
+ cleanup_path(path) { FileUtils.rm_rf path }
end
next
end | false |
Other | Homebrew | brew | 04b350dce5d0ac7e87ab4b5882dd1a5f19f39a9d.json | cleanup: do cleanup even without a Cellar. | Library/Homebrew/cmd/cleanup.rb | @@ -4,10 +4,6 @@
module Homebrew
def cleanup
- # individual cleanup_ methods should also check for the existence of the
- # appropriate directories before assuming they exist
- return unless HOMEBREW_CELLAR.directory?
-
if ARGV.named.empty?
cleanup_cellar
cleanup_cache
@@ -35,6 +31,7 @... | false |
Other | Homebrew | brew | e49a0434014464488de356550ffaa6028666faf5.json | cleanup: remove more on --force or --prune.
Remove more logs, use the prune time period and remove version control
checkouts when --force or --prune is used. | Library/Homebrew/cmd/cleanup.rb | @@ -23,9 +23,14 @@ def cleanup
def cleanup_logs
return unless HOMEBREW_LOGS.directory?
- time = Time.now - 2 * 7 * 24 * 60 * 60 # two weeks
+ prune = ARGV.value "prune"
+ if prune
+ time = Time.now - 60 * 60 * 24 * prune.to_i
+ else
+ time = Time.now - 60 * 60 * 24 * 7 * 2 # two weeks
+ ... | false |
Other | Homebrew | brew | 0d4da4234a1ee776114408f118cd1d683360a2cf.json | audit: enforce https on [*.]archive.org
Also:
* one minor regexp tweak
Closes Homebrew/homebrew#42761.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/audit.rb | @@ -439,7 +439,8 @@ def audit_homepage
%r{^http://[^/.]+\.tools\.ietf\.org},
%r{^http://www\.gnu\.org/},
%r{^http://code\.google\.com/},
- %r{^http://bitbucket\.org/}
+ %r{^http://bitbucket\.org/},
+ %r{^http://(?:[^/]*\.)?archive\.org}
problem "Please use ht... | false |
Other | Homebrew | brew | c405a2349140626d924818ff764f232ef94eaadb.json | doc: fix internal link | share/doc/homebrew/Installation.md | @@ -3,7 +3,7 @@ The suggested and easiest way to install Homebrew is on the
[homepage](http://brew.sh).
The standard script installs Homebrew to `/usr/local` so that
-[you don’t need sudo](FAQ.md#wiki-sudo) when you `brew install`. It is a
+[you don’t need sudo](FAQ.md#why-does-homebrew-say-sudo-is-bad-) when you `... | false |
Other | Homebrew | brew | f64661fb18e3147bb0ab70c3741e5403ad1e600a.json | doc: fix internal links | share/doc/homebrew/Homebrew-0.9.3.md | @@ -17,8 +17,8 @@ Because we are working with a practically virgin environment, we are essentially
So:
-* We no longer worry about MacPorts/Fink being installed<sup>[†](#_†)</sup>
-* We no longer worry about system duplicates<sup>[†](#_†)</sup>
+* We no longer worry about MacPorts/Fink being installed<sup>[0](#_0)... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.