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
b0f188c2f50427e14825b2cc30a81924618b17a2.json
formula_installer: fix quotation mismatch Closes Homebrew/homebrew#46176. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Library/Homebrew/formula_installer.rb
@@ -134,7 +134,7 @@ def check_install_sanity dep.installed? && !dep.keg_only? && !dep.linked_keg.directory? end raise CannotInstallFormulaError, - "You must `brew link #{unlinked_deps*" "}' before #{formula.full_name} can be installed" unless unlinked_deps.empty? + "You must `brew link #{unlinked_deps*" "}` before #{formula.full_name} can be installed" unless unlinked_deps.empty? end end @@ -158,7 +158,7 @@ def install # some other version is already installed *and* linked raise CannotInstallFormulaError, <<-EOS.undent #{formula.name}-#{formula.linked_keg.resolved_path.basename} already installed - To install this version, first `brew unlink #{formula.name}' + To install this version, first `brew unlink #{formula.name}` EOS end
false
Other
Homebrew
brew
aeb8aad1e046ad63886a77af3c3b234c83fae50c.json
brew: ensure full path for HOMEBREW_RUBY_PATH
bin/brew
@@ -31,7 +31,7 @@ if [ -z "$HOMEBREW_RUBY_PATH" ]; then if [ "$BREW_SYSTEM" = "darwin" ]; then export HOMEBREW_RUBY_PATH="/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby" else - export HOMEBREW_RUBY_PATH="ruby" + export HOMEBREW_RUBY_PATH="$(which ruby)" fi fi
false
Other
Homebrew
brew
6f5307fbd91670ac9395a4190a83e7d82211379d.json
keg_relocate: fix relocation of frameworks When fixing references to regular dylibs, it is sufficient to search for a file with the same base name, e.g., `libpoppler.56.dylib`. However, if the broken reference is to a framework, we also have to take into account preceding path components to find a suitable match. Framework references (according to the `dyld` man page) come in two flavors: - `XXX.framework/Versions/YYY/XXX` (with version) - `XXX.framework/XXX` (without version) The change here is to detect these patterns and to make sure that the fixed library reference has the same suffix as the broken one. Prior to this fix, a broken framework reference (if originating in a sister framework) to `QtXml.framework/Versions/5/QtXml` would have been rewritten to `<qt5-keg>/lib/QtXml.framework/QtXml`. In practice, this mostly works, but is technically incorrect and thus creates problems like in Homebrew/homebrew#42191. With this fix, the framework reference is correctly rewritten to `<qt5-keg>/lib/QtXml.framework/Versions/5/QtXml`. Closes Homebrew/homebrew#45494. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/keg_relocate.rb
@@ -130,7 +130,7 @@ def fixed_name(file, bad_name) "@loader_path/#{bad_name}" elsif file.mach_o_executable? && (lib + bad_name).exist? "#{lib}/#{bad_name}" - elsif (abs_name = find_dylib(Pathname.new(bad_name).basename)) && abs_name.exist? + elsif (abs_name = find_dylib(bad_name)) && abs_name.exist? abs_name.to_s else opoo "Could not fix #{bad_name} in #{file}" @@ -156,8 +156,22 @@ def dylib_id_for(file) opt_record.join(relative_dirname, basename).to_s end - def find_dylib(name) - lib.find { |pn| break pn if pn.basename == name } if lib.directory? + # Matches framework references like `XXX.framework/Versions/YYY/XXX` and + # `XXX.framework/XXX`, both with or without a slash-delimited prefix. + FRAMEWORK_RX = %r{(?:^|/)(([^/]+)\.framework/(?:Versions/[^/]+/)?\2)$}.freeze + + def find_dylib_suffix_from(bad_name) + if (framework = bad_name.match(FRAMEWORK_RX)) + framework[1] + else + File.basename(bad_name) + end + end + + def find_dylib(bad_name) + return unless lib.directory? + suffix = "/#{find_dylib_suffix_from(bad_name)}" + lib.find { |pn| break pn if pn.to_s.end_with?(suffix) } end def mach_o_files
false
Other
Homebrew
brew
11a421948d43210451a536fb40b8c10b838ff8c6.json
test-bot: remove email support.
Library/Homebrew/cmd/test-bot.rb
@@ -9,7 +9,6 @@ # --skip-setup: Don't check the local system is setup correctly. # --skip-homebrew: Don't check Homebrew's files and tests are all valid. # --junit: Generate a JUnit XML test results file. -# --email: Generate an email subject file. # --keep-old: Run brew bottle --keep-old to build new bottles for a single platform. # --HEAD: Run brew install with --HEAD # --local: Ask Homebrew to write verbose logs under ./logs/ and set HOME to ./home/ @@ -34,7 +33,6 @@ require "cmd/tap" module Homebrew - EMAIL_SUBJECT_FILE = "brew-test-bot.#{MacOS.cat}.email.txt" BYTES_IN_1_MEGABYTE = 1024*1024 def resolve_test_tap @@ -366,14 +364,6 @@ def brew_update raise "Cannot set @name: invalid command-line arguments!" end - if ENV["TRAVIS"] - puts "name: #{@name}" - puts "url: #{@url}" - puts "hash: #{@hash}" - puts "diff_start_sha1: #{diff_start_sha1}" - puts "diff_end_sha1: #{diff_end_sha1}" - end - @log_root = @brewbot_root + @name FileUtils.mkdir_p @log_root @@ -894,22 +884,14 @@ def sanitize_ARGV_and_ENV ARGV << "--junit" << "--local" end if ARGV.include? "--ci-master" - ARGV << "--email" << "--fast" + ARGV << "--fast" end if ARGV.include? "--local" ENV["HOMEBREW_HOME"] = ENV["HOME"] = "#{Dir.pwd}/home" mkdir_p ENV["HOME"] ENV["HOMEBREW_LOGS"] = "#{Dir.pwd}/logs" end - - if ARGV.include? "--email" - File.open EMAIL_SUBJECT_FILE, "w" do |file| - # The file should be written at the end but in case we don't get to that - # point ensure that we have something valid. - file.write "#{MacOS.version}: internal error." - end - end end def test_bot @@ -997,26 +979,6 @@ def test_bot xml_document.write(xml_file, pretty_print_indent) end end - - if ARGV.include? "--email" - failed_steps = [] - tests.each do |test| - test.steps.each do |step| - next if step.passed? - failed_steps << step.command_short - end - end - - if failed_steps.empty? - email_subject = "" - else - email_subject = "#{MacOS.version}: #{failed_steps.join ", "}." - end - - File.open EMAIL_SUBJECT_FILE, "w" do |file| - file.write email_subject - end - end ensure if ARGV.include? "--clean-cache" HOMEBREW_CACHE.children.each(&:rmtree)
false
Other
Homebrew
brew
3a68b915ebad687f0044d9bc1d81e0fa9ad40745.json
Stdenv: add note on possible future deprecation Closes Homebrew/homebrew#46043. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/extend/ENV/std.rb
@@ -1,6 +1,7 @@ require "hardware" require "extend/ENV/shared" +# TODO: deprecate compiling related codes after it's only used by brew test. # @private module Stdenv include SharedEnvExtension
false
Other
Homebrew
brew
14af3e35155c5a8c9035b24773dc5858cca6b01b.json
audit: add godep and sphinx-doc to build time deps Closes Homebrew/homebrew#46031. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/audit.rb
@@ -121,12 +121,14 @@ class FormulaAuditor boost-build bsdmake cmake + godep imake intltool libtool pkg-config scons smake + sphinx-doc swig ]
false
Other
Homebrew
brew
14fbc8c39e339bbcd2927bc18219c52fbb1898ff.json
improve brew info * Show pinned and keg-only as attributes, where pinned version is shown as well. * Use brackets instead of parentheses to distinguish formula attributes(e.g. keg-only) with spec attributes(e.g. bottled) * Don't show blank line for formula without homepage. * Don't show duplicated keg-only message which will be shown later in caveats. * Underline urls. * Remove unnecessary github_info return value check, which is always existed. Closes Homebrew/homebrew#46037. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/info.rb
@@ -105,18 +105,13 @@ def info_formula(f) specs << "HEAD" if f.head - puts "#{f.full_name}: #{specs*", "}#{" (pinned)" if f.pinned?}" + attrs = [] + attrs << "pinned at #{f.pinned_version}" if f.pinned? + attrs << "keg-only" if f.keg_only? + puts "#{f.full_name}: #{specs * ", "}#{" [#{attrs * ", "}]" if attrs.any?}" puts f.desc if f.desc - - puts f.homepage - - if f.keg_only? - puts - puts "This formula is keg-only." - puts f.keg_only_reason - puts - end + puts "#{Tty.em}#{f.homepage}#{Tty.reset}" if f.homepage conflicts = f.conflicts.map(&:name).sort! puts "Conflicts with: #{conflicts*", "}" unless conflicts.empty? @@ -132,8 +127,7 @@ def info_formula(f) puts "Not installed" end - history = github_info(f) - puts "From: #{history}" if history + puts "From: #{Tty.em}#{github_info(f)}#{Tty.reset}" unless f.deps.empty? ohai "Dependencies"
false
Other
Homebrew
brew
0abe554420fd8304537267e1267dbb3071136fc9.json
Update 10.11 pkgconfig files Closes Homebrew/homebrew#45970. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Library/ENV/pkgconfig/10.11/libcurl.pc
@@ -27,13 +27,13 @@ prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include -supported_protocols="DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP" -supported_features="SSL IPv6 libz AsynchDNS NTLM NTLM_WB GSS-API" +supported_protocols="DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP" +supported_features="Largefile Kerberos SPNEGO SSL IPv6 libz AsynchDNS NTLM NTLM_WB GSS-API UnixSockets" Name: libcurl URL: http://curl.haxx.se/ Description: Library to transfer files with ftp, http, etc. -Version: 7.37.1 +Version: 7.43.0 Libs: -L${libdir} -lcurl Libs.private: -lssl -lcrypto -Wl,-weak-lldap -Wl,-weak-lgssapi_krb5 -lresolv -lssl -lcrypto -lz -lz Cflags: -I${includedir}
true
Other
Homebrew
brew
0abe554420fd8304537267e1267dbb3071136fc9.json
Update 10.11 pkgconfig files Closes Homebrew/homebrew#45970. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Library/ENV/pkgconfig/10.11/libxml-2.0.pc
@@ -5,7 +5,7 @@ includedir=${prefix}/include modules=1 Name: libXML -Version: 2.9.0 +Version: 2.9.2 Description: libXML library version2. Requires: Libs: -L${libdir} -lxml2
true
Other
Homebrew
brew
0abe554420fd8304537267e1267dbb3071136fc9.json
Update 10.11 pkgconfig files Closes Homebrew/homebrew#45970. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Library/ENV/pkgconfig/10.11/sqlite3.pc
@@ -5,7 +5,7 @@ includedir=${prefix}/include Name: SQLite Description: SQL database engine -Version: 3.8.8 +Version: 3.8.10.2 Libs: -L${libdir} -lsqlite3 Libs.private: Cflags: -I${includedir}
true
Other
Homebrew
brew
0d74967ceb15fe954ca722c11de91326d072fa05.json
Formula.racks: exclude empty rack Fixes https://github.com/Homebrew/homebrew-bundle/issues/121 Closes Homebrew/homebrew#45879. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/formula.rb
@@ -1052,7 +1052,9 @@ def self.each # @private def self.racks @racks ||= if HOMEBREW_CELLAR.directory? - HOMEBREW_CELLAR.subdirs.reject(&:symlink?) + HOMEBREW_CELLAR.subdirs.reject do |rack| + rack.symlink? || rack.subdirs.empty? + end else [] end
false
Other
Homebrew
brew
4d772042f7e16933ec851edd649e613a3fbbfbbe.json
keg_relocate: remove options from Keg#dylib_id_for No longer used since commit 3b0cbe6a56d9133941482a9e2d033ad86cdb5e79. Closes Homebrew/homebrew#45835. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/bottle.rb
@@ -186,7 +186,7 @@ def bottle_formula(f) keg.lock do begin keg.relocate_install_names prefix, Keg::PREFIX_PLACEHOLDER, - cellar, Keg::CELLAR_PLACEHOLDER, :keg_only => f.keg_only? + cellar, Keg::CELLAR_PLACEHOLDER keg.relocate_text_files prefix, Keg::PREFIX_PLACEHOLDER, cellar, Keg::CELLAR_PLACEHOLDER @@ -223,7 +223,7 @@ def bottle_formula(f) ensure ignore_interrupts do keg.relocate_install_names Keg::PREFIX_PLACEHOLDER, prefix, - Keg::CELLAR_PLACEHOLDER, cellar, :keg_only => f.keg_only? + Keg::CELLAR_PLACEHOLDER, cellar end end end
true
Other
Homebrew
brew
4d772042f7e16933ec851edd649e613a3fbbfbbe.json
keg_relocate: remove options from Keg#dylib_id_for No longer used since commit 3b0cbe6a56d9133941482a9e2d033ad86cdb5e79. Closes Homebrew/homebrew#45835. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/formula_installer.rb
@@ -671,7 +671,7 @@ def install_plist end def fix_install_names(keg) - keg.fix_install_names(:keg_only => formula.keg_only?) + keg.fix_install_names rescue Exception => e onoe "Failed to fix install names" puts "The formula built, but you may encounter issues using it or linking other" @@ -720,7 +720,7 @@ def pour keg = Keg.new(formula.prefix) unless formula.bottle_specification.skip_relocation? keg.relocate_install_names Keg::PREFIX_PLACEHOLDER, HOMEBREW_PREFIX.to_s, - Keg::CELLAR_PLACEHOLDER, HOMEBREW_CELLAR.to_s, :keg_only => formula.keg_only? + Keg::CELLAR_PLACEHOLDER, HOMEBREW_CELLAR.to_s end keg.relocate_text_files Keg::PREFIX_PLACEHOLDER, HOMEBREW_PREFIX.to_s, Keg::CELLAR_PLACEHOLDER, HOMEBREW_CELLAR.to_s
true
Other
Homebrew
brew
4d772042f7e16933ec851edd649e613a3fbbfbbe.json
keg_relocate: remove options from Keg#dylib_id_for No longer used since commit 3b0cbe6a56d9133941482a9e2d033ad86cdb5e79. Closes Homebrew/homebrew#45835. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/keg_relocate.rb
@@ -2,10 +2,10 @@ class Keg PREFIX_PLACEHOLDER = "@@HOMEBREW_PREFIX@@".freeze CELLAR_PLACEHOLDER = "@@HOMEBREW_CELLAR@@".freeze - def fix_install_names(options = {}) + def fix_install_names mach_o_files.each do |file| file.ensure_writable do - change_dylib_id(dylib_id_for(file, options), file) if file.dylib? + change_dylib_id(dylib_id_for(file), file) if file.dylib? each_install_name_for(file) do |bad_name| # Don't fix absolute paths unless they are rooted in the build directory @@ -27,11 +27,11 @@ def fix_install_names(options = {}) end end - def relocate_install_names(old_prefix, new_prefix, old_cellar, new_cellar, options = {}) + def relocate_install_names(old_prefix, new_prefix, old_cellar, new_cellar) mach_o_files.each do |file| file.ensure_writable do if file.dylib? - id = dylib_id_for(file, options).sub(old_prefix, new_prefix) + id = dylib_id_for(file).sub(old_prefix, new_prefix) change_dylib_id(id, file) end @@ -148,7 +148,7 @@ def each_install_name_for(file, &block) dylibs.each(&block) end - def dylib_id_for(file, options) + def dylib_id_for(file) # The new dylib ID should have the same basename as the old dylib ID, not # the basename of the file itself. basename = File.basename(file.dylib_id)
true
Other
Homebrew
brew
8091b33f85c96a93d14de80ce3bfd9c32f8bb58c.json
ruby 1.8: address syntax warnings in Homebrew core Closes Homebrew/homebrew#45849. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/audit.rb
@@ -600,7 +600,7 @@ def audit_text problem "\"Formula.factory(name)\" is deprecated in favor of \"Formula[name]\"" end - if text =~ /system "npm", "install"/ && text !~ %r[opt_libexec}/npm/bin] + if text =~ /system "npm", "install"/ && text !~ %r[opt_libexec\}/npm/bin] need_npm = "\#{Formula[\"node\"].opt_libexec\}/npm/bin" problem <<-EOS.undent Please add ENV.prepend_path \"PATH\", \"#{need_npm}"\ to def install
true
Other
Homebrew
brew
8091b33f85c96a93d14de80ce3bfd9c32f8bb58c.json
ruby 1.8: address syntax warnings in Homebrew core Closes Homebrew/homebrew#45849. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/test/test_formula.rb
@@ -33,7 +33,7 @@ def test_any_version_installed? refute_predicate f, :any_version_installed? prefix = HOMEBREW_CELLAR+f.name+"0.1" prefix.mkpath - FileUtils.touch (prefix+Tab::FILENAME) + FileUtils.touch prefix+Tab::FILENAME assert_predicate f, :any_version_installed? ensure f.rack.rmtree
true
Other
Homebrew
brew
8091b33f85c96a93d14de80ce3bfd9c32f8bb58c.json
ruby 1.8: address syntax warnings in Homebrew core Closes Homebrew/homebrew#45849. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/test/test_migrator.rb
@@ -184,7 +184,7 @@ def test_migrate assert_predicate @new_keg_record, :exist? assert_predicate @old_keg_record.parent, :symlink? - refute_predicate (HOMEBREW_LIBRARY/"LinkedKegs/oldname"), :exist? + refute_predicate HOMEBREW_LIBRARY/"LinkedKegs/oldname", :exist? assert_equal @new_keg_record.realpath, (HOMEBREW_LIBRARY/"LinkedKegs/newname").realpath assert_equal @new_keg_record.realpath, @old_keg_record.realpath assert_equal @new_keg_record.realpath, (HOMEBREW_PREFIX/"opt/oldname").realpath
true
Other
Homebrew
brew
8091b33f85c96a93d14de80ce3bfd9c32f8bb58c.json
ruby 1.8: address syntax warnings in Homebrew core Closes Homebrew/homebrew#45849. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/test/test_pathname.rb
@@ -216,7 +216,7 @@ def test_install_symlink assert_predicate @dst+"bin", :directory? assert_predicate @dst+"bin/a.txt", :exist? assert_predicate @dst+"bin/b.txt", :exist? - assert_predicate (@dst+"bin").readlink, :relative? + assert_predicate((@dst+"bin").readlink, :relative?) end def test_install_relative_symlink
true
Other
Homebrew
brew
d21c8151d5be4bc9f7f16107201fc163b34a452c.json
rubocop: enforce comma instead of consistent_comma Ref https://github.com/Homebrew/homebrew/commit/b0c21eb9d49eee82263bd1256abb10a3faa6234c.
Library/.rubocop.yml
@@ -126,4 +126,4 @@ Style/DotPosition: # makes diffs nicer Style/TrailingComma: - EnforcedStyleForMultiline: consistent_comma + EnforcedStyleForMultiline: comma
false
Other
Homebrew
brew
0c20957f5bdf93737107e4502aaec498ac0e6ba8.json
test: enable sandbox by default. Closes Homebrew/homebrew#45843. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/cmd/test.rb
@@ -40,7 +40,7 @@ def test args << "--devel" end - if Sandbox.available? && ARGV.sandbox? + if Sandbox.available? && !ARGV.no_sandbox? if Sandbox.auto_disable? Sandbox.print_autodisable_warning else @@ -49,7 +49,7 @@ def test end Utils.safe_fork do - if Sandbox.available? && ARGV.sandbox? && !Sandbox.auto_disable? + if Sandbox.available? && !ARGV.no_sandbox? && !Sandbox.auto_disable? sandbox = Sandbox.new f.logs.mkpath sandbox.record_log(f.logs/"sandbox.test.log")
false
Other
Homebrew
brew
307ca85e0e110d9c84179aa50957693bdeaf5dec.json
ARGV: add explicit option for disabling sandbox.
Library/Homebrew/extend/ARGV.rb
@@ -132,6 +132,10 @@ def sandbox? include?("--sandbox") || !ENV["HOMEBREW_SANDBOX"].nil? end + def no_sandbox? + include?("--no-sandbox") || !ENV["HOMEBREW_NO_SANDBOX"].nil? + end + def ignore_deps? include? "--ignore-dependencies" end
false
Other
Homebrew
brew
65a7f7807c447a9b88e3a1b0deba498cf96009f4.json
Library/Homebrew/README: Fix broken link Closes Homebrew/homebrew#45852. Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
Library/Homebrew/README.md
@@ -3,6 +3,6 @@ This is the (partially) documented public API for Homebrew. The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private. -You may also find the [Formula Cookbook](Formula-Cookbook.md) and [Ruby Style Guide](https://github.com/styleguide/ruby) helpful in creating formulae. +You may also find the [Formula Cookbook](https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md) and [Ruby Style Guide](https://github.com/styleguide/ruby) helpful in creating formulae. Good luck!
false
Other
Homebrew
brew
e97610b9160a3c94e4caf94ff6f036a8c9b4a78a.json
add Tap#install and Tap#uninstall
Library/Homebrew/cmd/tap.rb
@@ -1,5 +1,4 @@ require "tap" -require "descriptions" module Homebrew def tap @@ -14,48 +13,22 @@ def tap puts Tap.select(&:pinned?).map(&:name) else user, repo = tap_args - clone_target = ARGV.named[1] - opoo "#{user}/#{repo} already tapped!" unless install_tap(user, repo, clone_target) + tap = Tap.fetch(user, repo) + tap.install(:clone_target => ARGV.named[1], :full_clone => ARGV.include?("--full")) end end + # @deprecated this method will be removed in the future, if no external commands use it. def install_tap(user, repo, clone_target = nil) - # ensure git is installed - Utils.ensure_git_installed! - - tap = Tap.fetch user, repo - return false if tap.installed? - ohai "Tapping #{tap}" - remote = clone_target || "https://github.com/#{tap.user}/homebrew-#{tap.repo}" - args = %W[clone #{remote} #{tap.path}] - args << "--depth=1" unless ARGV.include?("--full") - + opoo "Homebrew.install_tap is deprecated, use Tap#install." + tap = Tap.fetch(user, repo) begin - safe_system "git", *args - rescue Interrupt, ErrorDuringExecution - ignore_interrupts do - sleep 0.1 # wait for git to cleanup the top directory when interrupt happens. - tap.path.parent.rmdir_if_possible - end - raise - end - - formula_count = tap.formula_files.size - puts "Tapped #{formula_count} formula#{plural(formula_count, "e")} (#{tap.path.abv})" - Descriptions.cache_formulae(tap.formula_names) - - if !clone_target && tap.private? - puts <<-EOS.undent - It looks like you tapped a private repository. To avoid entering your - credentials each time you update, you can use git HTTP credential - caching or issue the following command: - - cd #{tap.path} - git remote set-url origin git@github.com:#{tap.user}/homebrew-#{tap.repo}.git - EOS + tap.install(:clone_target => clone_target, :full_clone => ARGV.include?("--full")) + rescue TapAlreadyTappedError + false + else + true end - - true end # Migrate tapped formulae from symlink-based to directory-based structure.
true
Other
Homebrew
brew
e97610b9160a3c94e4caf94ff6f036a8c9b4a78a.json
add Tap#install and Tap#uninstall
Library/Homebrew/cmd/untap.rb
@@ -1,23 +1,12 @@ require "cmd/tap" # for tap_args -require "descriptions" module Homebrew def untap raise "Usage is `brew untap <tap-name>`" if ARGV.empty? ARGV.named.each do |tapname| tap = Tap.fetch(*tap_args(tapname)) - - raise TapUnavailableError, tap.name unless tap.installed? - puts "Untapping #{tap}... (#{tap.path.abv})" - - tap.unpin if tap.pinned? - - formula_count = tap.formula_files.size - Descriptions.uncache_formulae(tap.formula_names) - tap.path.rmtree - tap.path.dirname.rmdir_if_possible - puts "Untapped #{formula_count} formula#{plural(formula_count, "e")}" + tap.uninstall end end end
true
Other
Homebrew
brew
e97610b9160a3c94e4caf94ff6f036a8c9b4a78a.json
add Tap#install and Tap#uninstall
Library/Homebrew/tap.rb
@@ -1,4 +1,5 @@ require "utils/json" +require "descriptions" # a {Tap} is used to extend the formulae provided by Homebrew core. # Usually, it's synced with a remote git repository. And it's likely @@ -89,6 +90,59 @@ def installed? @path.directory? end + # install this {Tap}. + # + # @param [Hash] options + # @option options [String] :clone_targe If passed, it will be used as the clone remote. + # @option options [Boolean] :full_clone If set as true, full clone will be used. + def install(options = {}) + raise TapAlreadyTappedError, name if installed? + + # ensure git is installed + Utils.ensure_git_installed! + ohai "Tapping #{name}" + remote = options[:clone_target] || "https://github.com/#{@user}/homebrew-#{@repo}" + args = %W[clone #{remote} #{@path}] + args << "--depth=1" unless options.fetch(:full_clone, false) + + begin + safe_system "git", *args + rescue Interrupt, ErrorDuringExecution + ignore_interrupts do + sleep 0.1 # wait for git to cleanup the top directory when interrupt happens. + @path.parent.rmdir_if_possible + end + raise + end + + formula_count = formula_files.size + puts "Tapped #{formula_count} formula#{plural(formula_count, "e")} (#{@path.abv})" + Descriptions.cache_formulae(formula_names) + + if !options[:clone_target] && private? + puts <<-EOS.undent + It looks like you tapped a private repository. To avoid entering your + credentials each time you update, you can use git HTTP credential + caching or issue the following command: + cd #{@path} + git remote set-url origin git@github.com:#{@user}/homebrew-#{@repo}.git + EOS + end + end + + # uninstall this {Tap}. + def uninstall + raise TapUnavailableError, name unless installed? + + puts "Untapping #{name}... (#{@path.abv})" + unpin if pinned? + formula_count = formula_files.size + Descriptions.uncache_formulae(formula_names) + @path.rmtree + @path.dirname.rmdir_if_possible + puts "Untapped #{formula_count} formula#{plural(formula_count, "e")}" + end + # True if the {#remote} of {Tap} is customized. def custom_remote? return true unless remote
true
Other
Homebrew
brew
4e196a23483799ce114169b8b07cb3e195c107d3.json
tap: add more document
Library/Homebrew/tap.rb
@@ -149,22 +149,27 @@ def command_files @command_files ||= Pathname.glob("#{path}/cmd/brew-*").select(&:executable?) end + # path to the pin record for this {Tap}. + # @private def pinned_symlink_path HOMEBREW_LIBRARY/"PinnedTaps/#{@name}" end + # True if this {Tap} has been pinned. def pinned? return @pinned if instance_variable_defined?(:@pinned) @pinned = pinned_symlink_path.directory? end + # pin this {Tap}. def pin raise TapUnavailableError, name unless installed? raise TapPinStatusError.new(name, true) if pinned? pinned_symlink_path.make_relative_symlink(@path) @pinned = true end + # unpin this {Tap}. def unpin raise TapUnavailableError, name unless installed? raise TapPinStatusError.new(name, false) unless pinned?
false
Other
Homebrew
brew
f59ad1c9e91b0d9d39287a51d1a3b009b622cec0.json
Revert "keg_relocate: fix relocation of frameworks" This reverts commit 14ce4027ae5b8aa994f4bdf0b8160bbc4994948b.
Library/Homebrew/keg_relocate.rb
@@ -2,10 +2,6 @@ class Keg PREFIX_PLACEHOLDER = "@@HOMEBREW_PREFIX@@".freeze CELLAR_PLACEHOLDER = "@@HOMEBREW_CELLAR@@".freeze - # Matches framework references like `XXX.framework/Versions/YYY/XXX` and - # `XXX.framework/XXX`, both with or without a slash-delimited prefix. - FRAMEWORK_RX = %r{(?:^|/)(?<suffix>(?<name>[^/]+)\.framework/(?:Versions/[^/]+/)?\k<name>)$}.freeze - def fix_install_names(options = {}) mach_o_files.each do |file| file.ensure_writable do @@ -134,7 +130,7 @@ def fixed_name(file, bad_name) "@loader_path/#{bad_name}" elsif file.mach_o_executable? && (lib + bad_name).exist? "#{lib}/#{bad_name}" - elsif (abs_name = find_dylib(bad_name)) && abs_name.exist? + elsif (abs_name = find_dylib(Pathname.new(bad_name).basename)) && abs_name.exist? abs_name.to_s else opoo "Could not fix #{bad_name} in #{file}" @@ -160,18 +156,8 @@ def dylib_id_for(file, options) opt_record.join(relative_dirname, basename).to_s end - def find_dylib_suffix_from(bad_name) - if (framework = bad_name.match(FRAMEWORK_RX)) - framework["suffix"] - else - File.basename(bad_name) - end - end - - def find_dylib(bad_name) - return unless lib.directory? - suffix = "/#{find_dylib_suffix_from(bad_name)}" - lib.find { |pn| break pn if pn.to_s.end_with?(suffix) } + def find_dylib(name) + lib.find { |pn| break pn if pn.basename == name } if lib.directory? end def mach_o_files
false
Other
Homebrew
brew
06634edab7f5dee0904cc779ef8c2c109815766c.json
keg_relocate: fix relocation of frameworks When fixing references to regular dylibs, it is sufficient to search for a file with the same base name, e.g., `libpoppler.56.dylib`. However, if the broken reference is to a framework, we also have to take into account preceding path components to find a suitable match. Framework references (according to the `dyld` man page) come in two flavors: - `XXX.framework/Versions/YYY/XXX` (with version) - `XXX.framework/XXX` (without version) The change here is to detect these patterns and to make sure that the fixed library reference has the same suffix as the broken one. Prior to this fix, a broken framework reference (if originating in a sister framework) to `QtXml.framework/Versions/5/QtXml` would have been rewritten to `<qt5-keg>/lib/QtXml.framework/QtXml`. In practice, this mostly works, but is technically incorrect and thus creates problems like in Homebrew/homebrew#42191. With this fix, the framework reference is correctly rewritten to `<qt5-keg>/lib/QtXml.framework/Versions/5/QtXml`. Closes Homebrew/homebrew#45494. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/keg_relocate.rb
@@ -2,6 +2,10 @@ class Keg PREFIX_PLACEHOLDER = "@@HOMEBREW_PREFIX@@".freeze CELLAR_PLACEHOLDER = "@@HOMEBREW_CELLAR@@".freeze + # Matches framework references like `XXX.framework/Versions/YYY/XXX` and + # `XXX.framework/XXX`, both with or without a slash-delimited prefix. + FRAMEWORK_RX = %r{(?:^|/)(?<suffix>(?<name>[^/]+)\.framework/(?:Versions/[^/]+/)?\k<name>)$}.freeze + def fix_install_names(options = {}) mach_o_files.each do |file| file.ensure_writable do @@ -130,7 +134,7 @@ def fixed_name(file, bad_name) "@loader_path/#{bad_name}" elsif file.mach_o_executable? && (lib + bad_name).exist? "#{lib}/#{bad_name}" - elsif (abs_name = find_dylib(Pathname.new(bad_name).basename)) && abs_name.exist? + elsif (abs_name = find_dylib(bad_name)) && abs_name.exist? abs_name.to_s else opoo "Could not fix #{bad_name} in #{file}" @@ -156,8 +160,18 @@ def dylib_id_for(file, options) opt_record.join(relative_dirname, basename).to_s end - def find_dylib(name) - lib.find { |pn| break pn if pn.basename == name } if lib.directory? + def find_dylib_suffix_from(bad_name) + if (framework = bad_name.match(FRAMEWORK_RX)) + framework["suffix"] + else + File.basename(bad_name) + end + end + + def find_dylib(bad_name) + return unless lib.directory? + suffix = "/#{find_dylib_suffix_from(bad_name)}" + lib.find { |pn| break pn if pn.to_s.end_with?(suffix) } end def mach_o_files
false
Other
Homebrew
brew
e4b4ad532f358d634b7b2582afe823f4f1f60c82.json
Tips-N'-Trick: add a tip to use switch. I find brew switch very helpful to activate a different version of an installed formula. This seems worth calling out in the documentation to elevate awareness. Closes Homebrew/homebrew#45694. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
share/doc/homebrew/Tips-N'-Tricks.md
@@ -27,6 +27,15 @@ This can be useful if a package can't build against the version of something you And of course, you can simply `brew link $FORMULA` again afterwards! +## Activate a previously installed version of a formula + +```sh +brew info $FORMULA +brew switch $FORMULA $VERSION +``` + +Use `brew info $FORMULA` to check what versions are installed but not currently activated, then `brew switch $FORMULA $VERSION` to activate the desired version. This can be useful if you would like to switch between versions of a formula. + ## Install into Homebrew without formulas ```sh
false
Other
Homebrew
brew
91dd4d56d426ed47c4e042f7b17d6560245fd60f.json
os/mac/hardware: reverse universal_archs entries. The order ought not to matter, but GCC can fail with -arch i386 -arch x86_64 (producing an error like "FATAL:Bad fx_size (0x8) in fix_to_relocation_info()") but succeed with -arch x86_64 -arch i386. Closes Homebrew/homebrew#45401. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/os/mac/hardware.rb
@@ -97,7 +97,11 @@ def universal_archs if MacOS.version <= :leopard && !MacOS.prefer_64_bit? [arch_32_bit].extend ArchitectureListExtension else - [arch_32_bit, arch_64_bit].extend ArchitectureListExtension + # Amazingly, this order (64, then 32) matters. It shouldn't, but it + # does. GCC (some versions? some systems?) can blow up if the other + # order is used. + # http://superuser.com/questions/740563/gcc-4-8-on-macos-fails-depending-on-arch-order + [arch_64_bit, arch_32_bit].extend ArchitectureListExtension end end
false
Other
Homebrew
brew
d7a479f55105f277ce96ad1b4385679c93618add.json
JavaRequirement: check satisfaction directly It made less sense to call a method `java_version` when it returns boolean value. Closes Homebrew/homebrew#45501. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/requirements/java_requirement.rb
@@ -5,7 +5,12 @@ class JavaRequirement < Requirement cask "java" download "http://www.oracle.com/technetwork/java/javase/downloads/index.html" - satisfy(:build_env => false) { java_version } + satisfy :build_env => false do + args = %w[--failfast] + args << "--version" << "#{@version}" if @version + @java_home = Utils.popen_read("/usr/libexec/java_home", *args).chomp + $?.success? + end env do java_home = Pathname.new(@java_home) @@ -24,13 +29,6 @@ def initialize(tags) super end - def java_version - args = %w[--failfast] - args << "--version" << "#{@version}" if @version - @java_home = Utils.popen_read("/usr/libexec/java_home", *args).chomp - $?.success? - end - def message version_string = " #{@version}" if @version
false
Other
Homebrew
brew
8acac5aa713a271edb23d88ef19140b3a39e969f.json
doctor: unify chown messages Closes Homebrew/homebrew#45398.
Library/Homebrew/cmd/doctor.rb
@@ -408,11 +408,12 @@ def __check_subdir_access(base) return if cant_read.empty? inject_file_list cant_read.sort, <<-EOS.undent - Some directories in #{target} aren't writable. - This can happen if you "sudo make install" software that isn't managed - by Homebrew. If a brew tries to add locale information to one of these - directories, then the install will fail during the link step. - You should probably `chown` them: + Some directories in #{target} aren't writable. + This can happen if you "sudo make install" software that isn't managed + by Homebrew. If a brew tries to add locale information to one of these + directories, then the install will fail during the link step. + + You should probably `sudo chown -R $(whoami)` them: EOS end @@ -427,7 +428,10 @@ def check_access_share_man def check_access_homebrew_repository unless HOMEBREW_REPOSITORY.writable_real? then <<-EOS.undent The #{HOMEBREW_REPOSITORY} is not writable. - You should probably `chown` #{HOMEBREW_REPOSITORY} + + You should probably change the ownership and permissions of #{HOMEBREW_REPOSITORY} + back to your user account. + sudo chown -R $(whoami) #{HOMEBREW_REPOSITORY} EOS end end @@ -467,7 +471,9 @@ def check_tmpdir_sticky_bit by Homebrew. If a formula tries to write a file to this directory, the install will fail during the link step. - You should probably `chown` #{dir} + You should probably change the ownership and permissions of #{dir} + back to your user account. + sudo chown -R $(whoami) #{dir} EOS end end @@ -481,7 +487,9 @@ def check_access_site_packages by Homebrew. If you install a formula with Python modules, the install will fail during the link step. - You should probably `chown` #{Language::Python.homebrew_site_packages} + You should probably change the ownership and permissions of #{Language::Python.homebrew_site_packages} + back to your user account. + sudo chown -R $(whoami) #{Language::Python.homebrew_site_packages} EOS end end @@ -491,7 +499,10 @@ def check_access_logs <<-EOS.undent #{HOMEBREW_LOGS} isn't writable. Homebrew writes debugging logs to this location. - You should probably `chown` #{HOMEBREW_LOGS} + + You should probably change the ownership and permissions of #{HOMEBREW_LOGS} + back to your user account. + sudo chown -R $(whoami) #{HOMEBREW_LOGS} EOS end end @@ -502,7 +513,10 @@ def check_access_cache #{HOMEBREW_CACHE} isn't writable. This can happen if you run `brew install` or `brew fetch` as another user. Homebrew caches downloaded files to this location. - You should probably `chown` #{HOMEBREW_CACHE} + + You should probably change the ownership and permissions of #{HOMEBREW_CACHE} + back to your user account. + sudo chown -R $(whoami) #{HOMEBREW_CACHE} EOS end end @@ -511,7 +525,10 @@ def check_access_cellar if HOMEBREW_CELLAR.exist? && !HOMEBREW_CELLAR.writable_real? <<-EOS.undent #{HOMEBREW_CELLAR} isn't writable. - You should `chown` #{HOMEBREW_CELLAR} + + You should probably change the ownership and permissions of #{HOMEBREW_CELLAR} + back to your user account. + sudo chown -R $(whoami) #{HOMEBREW_CELLAR} EOS end end @@ -521,7 +538,9 @@ def check_access_prefix_opt if opt.exist? && !opt.writable_real? <<-EOS.undent #{opt} isn't writable. - You should `chown` #{opt} + You should probably change the ownership and permissions of #{opt} + back to your user account. + sudo chown -R $(whoami) #{opt} EOS end end
false
Other
Homebrew
brew
a2e2553bd82ca130931072353a167be5d9e87a20.json
audit: flag any desc that starts with the formula name The previous version didn’t work with descs like: "TheFormula serves a web page"
Library/Homebrew/cmd/audit.rb
@@ -393,7 +393,7 @@ def audit_desc problem "Description shouldn't start with an indefinite article (#{$1})" end - if desc =~ /^#{formula.name} is\s/i + if desc =~ /^#{formula.name}\s/i problem "Description shouldn't include the formula name" end end
false
Other
Homebrew
brew
18bda1c9b18f53879263a7893f5359ba96b75bff.json
audit: uniformize the desc problems Closes Homebrew/homebrew#45492. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Library/Homebrew/cmd/audit.rb
@@ -390,7 +390,7 @@ def audit_desc end if desc =~ /^([Aa]n?)\s/ - problem "Please remove the indefinite article \"#{$1}\" from the beginning of the description" + problem "Description shouldn't start with an indefinite article (#{$1})" end if desc =~ /^#{formula.name} is\s/i
false
Other
Homebrew
brew
dd71d34bab1d52b0005a9dd837796aeb959627af.json
emacs_requirement: allow no version see Homebrew/homebrew-emacs#29 Closes Homebrew/homebrew#45426. Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
Library/Homebrew/requirements/emacs_requirement.rb
@@ -4,12 +4,12 @@ class EmacsRequirement < Requirement def initialize(tags) @version = tags.shift if /\d+\.*\d*/ === tags.first - raise "Specify a version for EmacsRequirement" unless @version super end satisfy :build_env => false do - next unless which "emacs" + next false unless which "emacs" + next true unless @version emacs_version = Utils.popen_read("emacs", "--batch", "--eval", "(princ emacs-version)") Version.new(emacs_version) >= Version.new(@version) end @@ -19,7 +19,11 @@ def initialize(tags) end def message - s = "Emacs #{@version} or later is required." + if @version + s = "Emacs #{@version} or later is required." + else + s = "Emacs is required." + end s += super s end
false
Other
Homebrew
brew
75c196c1fc7347661bc888ae1ead8be49e5494eb.json
create: accept HEAD urls Fixes Homebrew/homebrew#45310. Closes Homebrew/homebrew#45336. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Library/Homebrew/cmd/create.rb
@@ -78,10 +78,16 @@ def url=(url) @url = url path = Pathname.new(url) if @name.nil? - %r{github.com/\S+/(\S+)/archive/}.match url - @name ||= $1 - /(.*?)[-_.]?#{path.version}/.match path.basename - @name ||= $1 + case url + when %r{github\.com/\S+/(\S+)\.git} + @name = $1 + @head = true + when %r{github\.com/\S+/(\S+)/archive/} + @name = $1 + else + /(.*?)[-_.]?#{path.version}/.match path.basename + @name = $1 + end @path = Formulary.path @name unless @name.nil? else @path = Formulary.path name @@ -94,7 +100,11 @@ def url=(url) end def fetch? - !ARGV.include?("--no-fetch") + !head? && !ARGV.include?("--no-fetch") + end + + def head? + @head || ARGV.build_head? end def generate! @@ -124,11 +134,15 @@ def template; <<-EOS.undent class #{Formulary.class_s(name)} < Formula desc "" homepage "" + <% if head? %> + head "#{url}" + <% else %> url "#{url}" <% unless version.nil? or version.detected_from_url? %> version "#{version}" <% end %> sha256 "#{sha256}" + <% end %> <% if mode == :cmake %> depends_on "cmake" => :build
false
Other
Homebrew
brew
8ea9903a99fce3d7bcd432200f1bd2170e81de43.json
update: use git stash silently. There's been a few issues where users have been confused about these errors. They may have modified stuff but we probably don't care about telling them that unless we're debugging other issues. Closes Homebrew/homebrew#45373. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/cmd/update.rb
@@ -196,18 +196,17 @@ class Updater def initialize(repository) @repository = repository @stashed = false + @quiet_args = [] + @quiet_args << "--quiet" unless ARGV.verbose? end def pull!(options = {}) - quiet = [] - quiet << "--quiet" unless ARGV.verbose? - unless system "git", "diff", "--quiet" - unless options[:silent] + if ARGV.verbose? puts "Stashing your changes:" system "git", "status", "--short", "--untracked-files" end - safe_system "git", "stash", "save", "--include-untracked", *quiet + safe_system "git", "stash", "save", "--include-untracked", *@quiet_args @stashed = true end @@ -242,7 +241,7 @@ def pull!(options = {}) end if @initial_branch != @upstream_branch && !@initial_branch.empty? - safe_system "git", "checkout", @upstream_branch, *quiet + safe_system "git", "checkout", @upstream_branch, *@quiet_args end @initial_revision = read_current_revision @@ -253,7 +252,7 @@ def pull!(options = {}) args = ["pull"] args << "--ff" args << ((ARGV.include? "--rebase") ? "--rebase" : "--no-rebase") - args += quiet + args += @quiet_args args << "origin" # the refspec ensures that the default upstream branch gets updated args << "refs/heads/#{@upstream_branch}:refs/remotes/origin/#{@upstream_branch}" @@ -263,12 +262,12 @@ def pull!(options = {}) @current_revision = read_current_revision if @initial_branch != "master" && !@initial_branch.empty? - safe_system "git", "checkout", @initial_branch, *quiet + safe_system "git", "checkout", @initial_branch, *@quiet_args end if @stashed - safe_system "git", "stash", "pop", *quiet - unless options[:silent] + safe_system "git", "stash", "pop", *@quiet_args + if ARGV.verbose? puts "Restored your changes:" system "git", "status", "--short", "--untracked-files" end @@ -282,7 +281,8 @@ def reset_on_interrupt if $?.signaled? && $?.termsig == 2 # SIGINT safe_system "git", "checkout", @initial_branch unless @initial_branch.empty? safe_system "git", "reset", "--hard", @initial_revision - safe_system "git", "stash", "pop" if @stashed + safe_system "git", "stash", "pop", *@quiet_args if @stashed + @stashed = false end end
false
Other
Homebrew
brew
f6cf1a4025b80a01427570d9b451b9f3fd684a7e.json
xcode: expect xcode 7.1 Closes Homebrew/homebrew#45266. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Library/Homebrew/os/mac.rb
@@ -252,6 +252,7 @@ def preferred_arch "6.4" => { :clang => "6.1", :clang_build => 602 }, "7.0" => { :clang => "7.0", :clang_build => 700 }, "7.0.1" => { :clang => "7.0", :clang_build => 700 }, + "7.1" => { :clang => "7.0", :clang_build => 700 }, } def compilers_standard?
true
Other
Homebrew
brew
f6cf1a4025b80a01427570d9b451b9f3fd684a7e.json
xcode: expect xcode 7.1 Closes Homebrew/homebrew#45266. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Library/Homebrew/os/mac/xcode.rb
@@ -14,12 +14,12 @@ def latest_version when "10.7" then "4.6.3" when "10.8" then "5.1.1" when "10.9" then "6.2" - when "10.10" then "7.0.1" - when "10.11" then "7.0.1" + when "10.10" then "7.1" + when "10.11" then "7.1" else # Default to newest known version of Xcode for unreleased OSX versions. if OS::Mac.prerelease? - "7.0.1" + "7.1" else raise "OS X '#{MacOS.version}' is invalid" end @@ -165,8 +165,8 @@ def installed? def latest_version case MacOS.version - when "10.11" then "700.0.72" - when "10.10" then "700.0.72" + when "10.11" then "700.1.76" + when "10.10" then "700.1.76" when "10.9" then "600.0.57" when "10.8" then "503.0.40" else
true
Other
Homebrew
brew
f6cf1a4025b80a01427570d9b451b9f3fd684a7e.json
xcode: expect xcode 7.1 Closes Homebrew/homebrew#45266. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
share/doc/homebrew/Xcode.md
@@ -9,8 +9,8 @@ Tools available for your platform: 10.7 | 4.6.3 | April 2013 10.8 | 5.1.1 | April 2014 10.9 | 6.2 | 6.2 - 10.10 | 7.0.1 | 7.0.1 - 10.11 | 7.0.1 | 7.0.1 + 10.10 | 7.1 | 7.1 + 10.11 | 7.1 | 7.1 ## Compiler Version Database @@ -58,6 +58,7 @@ Tools available for your platform: 6.4 | — | — | — | — | 6.1 (602.0.53) | 3.6 7.0 | — | — | — | — | 7.0 (700.0.72) | - 7.0.1 | — | — | — | — | 7.0 (700.0.72) | - + 7.1 | — | — | — | — | 7.0 (700.1.76) | - ## References to Xcode and compiler versions in code When a new Xcode release is made, the following things need to be
true
Other
Homebrew
brew
f5d7e6915be2b6be2be7eba33cb3144e67057aa3.json
travis: send failure emails to committer/author.
.travis.yml
@@ -34,7 +34,5 @@ notifications: slack: secure: Y5ZL6OcprSzAYQ3yVpvrhiQn1UQGd7reKNz3o7+7Bcy2k7DMr66xKBadTv1gK1Qrg9LugsmZ4CqOqKBwy7t5smktan/wsUo5y5HX3WUOG1nk0jQ4HOOZNT8bhUZc/Eu7ilH5UMqvIVsjrX9BjEZMeT4TxTIUD8zj5xUwgiAsD5k= email: - recipients: - - brew-test-bot@googlegroups.com on_success: never on_failure: always
false
Other
Homebrew
brew
01270ea12cdab49401dae24058109381b903e997.json
travis: fix slack notification
.travis.yml
@@ -31,9 +31,10 @@ script: - brew test-bot notifications: + slack: + secure: Y5ZL6OcprSzAYQ3yVpvrhiQn1UQGd7reKNz3o7+7Bcy2k7DMr66xKBadTv1gK1Qrg9LugsmZ4CqOqKBwy7t5smktan/wsUo5y5HX3WUOG1nk0jQ4HOOZNT8bhUZc/Eu7ilH5UMqvIVsjrX9BjEZMeT4TxTIUD8zj5xUwgiAsD5k= email: recipients: - brew-test-bot@googlegroups.com on_success: never on_failure: always - slack: mikemcquaid:h0G8MHFwtn0ajrepWuBRUaGV
false
Other
Homebrew
brew
8755e91675dbe615b7792a77061627eb089abbfc.json
test-bot: remove duplicated conflicts unlinking
Library/Homebrew/cmd/test-bot.rb
@@ -441,11 +441,6 @@ def formula(formula_name) formula = Formulary.factory(canonical_formula_name) - formula.conflicts.map { |c| Formulary.factory(c.name) }. - select(&:installed?).each do |conflict| - test "brew", "unlink", conflict.name - end - installed_gcc = false deps = []
false
Other
Homebrew
brew
e13866f74afd469dece0d1b9c2c32da2b941c349.json
test-bot: install bottle unneeded formulae in --fast mode
Library/Homebrew/cmd/test-bot.rb
@@ -572,7 +572,7 @@ def formula(formula_name) # Don't care about e.g. bottle failures for dependencies. install_passed = false run_as_not_developer do - if !ARGV.include?("--fast") || formula_bottled + if !ARGV.include?("--fast") || formula_bottled || formula.bottle_unneeded? test "brew", "install", "--only-dependencies", *install_args unless dependencies.empty? test "brew", "install", *install_args install_passed = steps.last.passed?
false
Other
Homebrew
brew
4ef15427bacc84622561bde6b8474a1df996eb52.json
add test for bottle disable Closes Homebrew/homebrew#43935. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/test/test_bottle_hooks.rb
@@ -6,6 +6,7 @@ class BottleHookTests < Homebrew::TestCase class FormulaDouble def bottle; end def local_bottle_path; end + def bottle_disabled?; false end def some_random_method true
true
Other
Homebrew
brew
4ef15427bacc84622561bde6b8474a1df996eb52.json
add test for bottle disable Closes Homebrew/homebrew#43935. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/test/test_formula_installer.rb
@@ -51,4 +51,20 @@ def test_a_basic_install assert_equal 3, bin.children.length end end + + def test_bottle_unneeded_formula_install + MacOS.stubs(:has_apple_developer_tools?).returns(false) + + formula = Testball.new + formula.stubs(:bottle_unneeded?).returns(true) + formula.stubs(:bottle_disabled?).returns(true) + + refute_predicate formula, :bottled? + assert_predicate formula, :bottle_unneeded? + assert_predicate formula, :bottle_disabled? + + temporary_install(formula) do |f| + assert_predicate f, :installed? + end + end end
true
Other
Homebrew
brew
4ef15427bacc84622561bde6b8474a1df996eb52.json
add test for bottle disable Closes Homebrew/homebrew#43935. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/test/test_formula_support.rb
@@ -11,3 +11,17 @@ def test_to_s_no_explanation assert_match(/^OS X already provides/, r.to_s) end end + +class BottleDisableReasonTests < Homebrew::TestCase + def test_bottle_unneeded + bottle_disable_reason = BottleDisableReason.new :unneeded, nil + assert_predicate bottle_disable_reason, :unneeded? + assert_equal "This formula doesn't require compiling.", bottle_disable_reason.to_s + end + + def test_bottle_disabled + bottle_disable_reason = BottleDisableReason.new :disable, "reason" + refute_predicate bottle_disable_reason, :unneeded? + assert_equal "reason", bottle_disable_reason.to_s + end +end
true
Other
Homebrew
brew
975771ab358ca582f6d5119c63bf32792735ac60.json
formula_installer: let build_bottle? check bottle_disabled? Also don't pour bottle if it's disabled.
Library/Homebrew/formula_installer.rb
@@ -29,9 +29,9 @@ def self.mode_attr_accessor(*names) end attr_reader :formula - attr_accessor :options + attr_accessor :options, :build_bottle mode_attr_accessor :show_summary_heading, :show_header - mode_attr_accessor :build_from_source, :build_bottle, :force_bottle + mode_attr_accessor :build_from_source, :force_bottle mode_attr_accessor :ignore_deps, :only_deps, :interactive, :git mode_attr_accessor :verbose, :debug, :quieter @@ -69,6 +69,10 @@ def self.prevent_build_flags raise BuildFlagsError.new(build_flags) unless build_flags.empty? end + def build_bottle? + !!@build_bottle && !formula.bottle_disabled? + end + def pour_bottle?(install_bottle_options = { :warn=>false }) return true if Homebrew::Hooks::Bottles.formula_has_bottle?(formula) @@ -78,6 +82,7 @@ def pour_bottle?(install_bottle_options = { :warn=>false }) return true if force_bottle? && bottle return false if build_from_source? || build_bottle? || interactive? return false unless options.empty? + return false if formula.bottle_disabled? return true if formula.local_bottle_path return false unless bottle && formula.pour_bottle?
false
Other
Homebrew
brew
06806f860d12aa5a4cfd077b67cae62071755864.json
remove unnecessary require statements
Library/Homebrew/bottles.rb
@@ -1,5 +1,4 @@ require "tab" -require "os/mac" require "extend/ARGV" def built_as_bottle?(f)
true
Other
Homebrew
brew
06806f860d12aa5a4cfd077b67cae62071755864.json
remove unnecessary require statements
Library/Homebrew/extend/ENV/std.rb
@@ -1,5 +1,4 @@ require "hardware" -require "os/mac" require "extend/ENV/shared" # @deprecated
true
Other
Homebrew
brew
06806f860d12aa5a4cfd077b67cae62071755864.json
remove unnecessary require statements
Library/Homebrew/extend/ENV/super.rb
@@ -1,4 +1,3 @@ -require "os/mac" require "extend/ENV/shared" # ### Why `superenv`?
true
Other
Homebrew
brew
06806f860d12aa5a4cfd077b67cae62071755864.json
remove unnecessary require statements
Library/Homebrew/utils.rb
@@ -1,6 +1,5 @@ require "pathname" require "exceptions" -require "os/mac" require "utils/json" require "utils/inreplace" require "utils/popen"
true
Other
Homebrew
brew
0915f0c6681890e47f94aab523a796f7e835f9e4.json
doc: add links to jenkins jobs Add links to specific jenkins jobs described in Brew-Test-Bot-For-Core-Contributors.md Closes Homebrew/homebrew#45052. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
share/doc/homebrew/Brew-Test-Bot-For-Core-Contributors.md
@@ -3,13 +3,13 @@ If a build has run and passed on `brew test-bot` then it can be used to quickly There are three types of Jenkins jobs: -## Homebrew +## [Homebrew](http://bot.brew.sh/job/Homebrew/) This job automatically builds anything committed to the master branch. On failure it sends an email to `brew-test-bot@googlegroups.com`. It tests rather than builds bottles. -## Homebrew Pull Requests +## [Homebrew Pull Requests](http://bot.brew.sh/job/Homebrew%20Pull%20Requests/) This job automatically builds any pull requests submitted to Homebrew/homebrew. On success or failure it updates the pull request status (see more details on the [main Brew Test Bot wiki page](Brew-Test-Bot.md)). On a successful build it automatically uploads bottles. -## Homebrew Testing +## [Homebrew Testing](http://bot.brew.sh/job/Homebrew%20Testing/) This job is manually triggered to run [`brew test-bot`](https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/cmd/test-bot.rb) with user-specified parameters. On a successful build it automatically uploads bottles. You can manually start this job with parameters to run [`brew test-bot`](https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/cmd/test-bot.rb) with the same parameters. It's often useful to pass a pull request URL, a commit URL, a commit SHA-1 and/or formula names to have `brew-test-bot` test them, report the results and produce bottles.
false
Other
Homebrew
brew
71ecf5539aefb802102056e120aaf401501a1c43.json
SUPPORTERS: use https where supported and not broken Closes Homebrew/homebrew#45045. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
SUPPORTERS.md
@@ -30,7 +30,7 @@ These amazing people supported our Kickstarter by giving us £100 or more: * [Spike Grobstein](http://spike.grobste.in) * [nonfiction studios inc.](http://nonfiction.ca/) * [Dev Fu! LLC](http://devfu.com) -* [Human Made Limited](http://hmn.md/) +* [Human Made Limited](https://hmn.md/) * [Roland Moriz](https://roland.io/) * [Rob Freiburger](http://robfreiburger.com/) * [Carter Schonwald](http://www.wellposed.com) @@ -54,7 +54,7 @@ These awesome people supported our Kickstarter by giving us £50 or more: * [Klaus Großmann](https://github.com/iKlaus) * [monmon](https://github.com/monmon) * [nimbly](http://nimbly.be) -* [cimnine](http://cimnine.ch) +* [cimnine](https://cimnine.ch) * [Greg DeAngelis](http://greg.deangel.is) * [Johan Carlquist](https://www.rymdvarel.se) * [Simon Lundström](http://soy.se) @@ -78,16 +78,16 @@ These awesome people supported our Kickstarter by giving us £50 or more: * [Fluent Globe](http://fluentglobe.com) * [Dmitri Akatov](http://akatov.com) * [Joey Mink](http://joeymink.com) -* [MentalPower](http://mentalpower.us) +* [MentalPower](https://mentalpower.us) * [worldofchris](http://www.worldofchris.com) * [Joël Kuijten](http://pm5544.eu) * [William Griffiths](http://Cwmni.com) * [Paul Howard](https://github.com/pauldhoward) * [Mårten Gustafson](http://marten.gustafson.pp.se) * [Markus Heurung](http://markusheurung.de) -* [Rajiv Aaron Manglani](http://www.rajivmanglani.com/) +* [Rajiv Aaron Manglani](https://www.rajivmanglani.com/) * Zachary Elliott -* [Justin Weiss](http://www.justinweiss.com) +* [Justin Weiss](https://www.justinweiss.com) * Matt Dickoff * [Pivotal Ops](http://pivotallabs.com) * [William Woodall](http://williamjwoodall.com) @@ -103,7 +103,7 @@ These awesome people supported our Kickstarter by giving us £50 or more: * Fernando Blat * [Adam Holt](http://adamholt.co.uk) * Trevor Turk -* [Jochen Weiland](http://jweiland.net) +* [Jochen Weiland](https://jweiland.net) * Paul Mietz Egli * Petr Olah * Ken Mayer @@ -120,7 +120,7 @@ These awesome people supported our Kickstarter by giving us £50 or more: * [Lane Lillquist](http://www.lillq.com) * [Robert Schmidl](https://github.com/RobRoy) * [Collective Idea](http://collectiveidea.com) -* [Freckle Time Tracking](http://letsfreckle.com/) +* [Freckle Time Tracking](https://letsfreckle.com/) * [Hans-Christian Otto](http://hans-christian-otto.de/) * Dan Lane * Seth Szymanski @@ -140,15 +140,15 @@ These awesome people supported our Kickstarter by giving us £50 or more: * Stephen Eckenrode * [Kevin Sumner](http://kevinsumner.com) * Rahul -* [Nothing Interactive](http://www.nothing.ch) +* [Nothing Interactive](https://www.nothing.ch) * [Nick Sivo](http://nicksivo.com) * [Claus Pfisterer](http://www.apochroma.ch) * Bob Doyle * Gabriel Boyer * Tom * Yann Lawrence * Frederick Ostrander -* [David Wagner](http://noiseandheat.com) +* [David Wagner](https://noiseandheat.com) * [Craig Labenz and Matt Kahl](http://www.Stik.com) * Alan Grosskurth @@ -164,14 +164,14 @@ These brilliant people supported our Kickstarter by giving us £15 or more: * [JD Harrington](https://twitter.com/psi) * [P.J. Onori](http://www.somerandomdude.com) * [Egbert Veenstra](http://egbert.co) -* [Bramus Van Damme](http://www.bram.us/) -* [Matt Vagni](http://www.twitter.com/mattvagni) +* [Bramus Van Damme](https://www.bram.us/) +* [Matt Vagni](https://www.twitter.com/mattvagni) * [Matt Cannon](http://www.mattcannon.co.uk) * [Dannel Jurado](http://demarko.org) * [Benjamin Esham](http://www.bdesham.info) * [Nick Rogers](https://twitter.com/zikolas) -* [Abe Estrada](http://abeestrada.com) -* [Mattias Larsson](http://www.yahoo.com/) +* [Abe Estrada](https://abeestrada.com) +* [Mattias Larsson](https://www.yahoo.com/) * [Dave Ross](http://davidmichaelross.com) * [Andrian Budantsov](http://andrian.io/) * [Jason Smith](https://twitter.com/waitingallday) @@ -182,29 +182,29 @@ These brilliant people supported our Kickstarter by giving us £15 or more: * [Carl Laird](http://allthingsoptimal.com) * [Mx A. Matienzo](http://matienzo.org/) * [Sean Dunn](http://www.dunns.me) -* [Kara Van Malssen](http://avpreserve.com) +* [Kara Van Malssen](https://avpreserve.com) * [phette23](http://phette.net) * [Jemal Cole](http://jemal.co/) * [Branden Wiegand](http://brandenwiegand.com) * [Adam Spooner](http://adamjspooner.com) * [Evan McNulty](http://www.evanm.net/) * [Abdullah AlDwyish](https://twitter.com/adwayish) -* [Simon Jodet](http://jodet.com) +* [Simon Jodet](https://jodet.com) * [Christian Maier](http://sieben.me) * [Justin Pecott](http://justin.pecott.net) * [Yuya Saito](https://github.com/studiomohawk) * [jan](https://alpha.app.net/derjan) -* [beanieboi](http://abwesend.com) -* [dirkr](http://niebegeg.net) +* [beanieboi](https://abwesend.com) +* [dirkr](https://niebegeg.net) * [ouvanous](http://ouvanous.com) * [dlinsin](https://dlinsin.github.io) -* [Alex Morega](http://grep.ro/) +* [Alex Morega](https://grep.ro/) * [Chris McGrath](https://twitter.com/chrismcg) * [Ben](http://blog.bueti-online.ch) -* [Ishaan Gulrajani](http://ishaan.io) -* [Horst Gutmann](http://zerokspot.com/) +* [Ishaan Gulrajani](https://ishaan.io) +* [Horst Gutmann](https://zerokspot.com/) * [freecastle](http://freiburg79.de/) -* [Hynek Schlawack](http://hynek.me) +* [Hynek Schlawack](https://hynek.me) * [aiusepsi](http://aiusepsi.co.uk) * [Stefan Borsje](https://yourkarma.com) * [Mark Goody](http://markgoody.ie/) @@ -225,23 +225,23 @@ These brilliant people supported our Kickstarter by giving us £15 or more: * [noahhendrix](https://twitter.com/noahhendrix) * [Kevin Davies](http://theausguild.org) * [Geknowm](http://geknowm.com) -* [Tod Olson](http://www.lib.uchicago.edu/~tod/) -* [Christian Busch](http://debilux.org) +* [Tod Olson](https://www.lib.uchicago.edu/~tod/) +* [Christian Busch](https://debilux.org) * [Victor Asteinza](http://victorasteinza.com) * [Hans N. Hjort](http://www.hansnilsson.net) * [Rachel Heaton](http://www.rmheaton.com) * [CodeCatalyst](http://codecatalyst.com/) * [Luke Karrys](http://lukekarrys.com) * [Brandon Weiss](http://brandonweiss.me) * [Gareth](http://gareth.com.au) -* [Nate Robins](http://xmission.com/~nate) +* [Nate Robins](https://xmission.com/~nate) * [Jay Graves](http://doubleencore.com) * [John Wittkoski](https://github.com/jwittkoski) * [Micah Woods](http://www.hashrocket.com) -* [Raphael Stolt](http://raphaelstolt.blogspot.de) +* [Raphael Stolt](https://raphaelstolt.blogspot.de) * [Hatimeria](http://hatimeria.com) * [Barron Bichon](http://blueplaid.net/) -* [Torvos](http://www.torvos.ca) +* [Torvos](https://www.torvos.ca) * [Alexander Zautke](http://alexander-zautke.com) * [Sam Kelly](http://skel.ly) * [Tobias Ottenweller](https://github.com/tomco) @@ -255,7 +255,7 @@ These brilliant people supported our Kickstarter by giving us £15 or more: * [Ryan Ahearn](http://rcahearn.net) * [ITerativ GmbH](http://www.iterativ.ch/) * [Brian Nelson](http://www.clientresourcesinc.com) -* [Jeff Beemn](http://jeffbeeman.com) +* [Jeff Beemn](https://jeffbeeman.com) * [loranger](https://github.com/loranger/) * Torbjørn Vatn * [Justin Hileman](http://justinhileman.info) @@ -273,20 +273,20 @@ These brilliant people supported our Kickstarter by giving us £15 or more: * [Andreas Behr](http://www.codedreality.com) * [Terry Churchill](http://www.doc-linux.co.uk) * [Maximilian Haack](http://3141.eu) -* [Pascal Jungblut](http://pascalj.de) -* [Absolight](http://www.absolight.fr/) +* [Pascal Jungblut](https://pascalj.de) +* [Absolight](https://www.absolight.fr/) * [Ben Hagen](https://plus.google.com/102873090274552422645/) * [Wilbur Smith](https://twitter.com/thewilbur) * bup -* [epiGenesys](http://www.epigenesys.co.uk/) +* [epiGenesys](https://www.epigenesys.co.uk/) * Greg Clarke * [CoEPP](http://www.coepp.org.au) -* [Jérôme Foray](http://foray-jero.me/) +* [Jérôme Foray](https://foray-jero.me/) * [bobuk](https://twitter.com/bobuk) -* [Christoph Hochstrasser](http://christophh.net) +* [Christoph Hochstrasser](https://christophh.net) * [João Bolila](http://Bolila.com) * [Yaroslav Markin](https://github.com/yaroslav) -* [David White](http://wizardfrag.co.uk) +* [David White](https://wizardfrag.co.uk) * Jonatan Lindström * [AYSTech Consulting](http://aystech.net) * [Josh Dick](http://joshdick.net) @@ -343,7 +343,7 @@ These brilliant people supported our Kickstarter by giving us £15 or more: * [Adam](https://example.com) * [François Lamboley](http://www.frostland.fr/) * [Mike Anderson](http://mrmikea.com) -* [Ian Johnson](http://ialsotakephotos.com/) +* [Ian Johnson](https://ialsotakephotos.com/) * Dave Coyle * Brian Fuchs * Fernando @@ -365,22 +365,22 @@ These wonderful people supported our Kickstarter by giving us £10 or more: * [Lovingly Handmade Pornography](http://lovinglyhandmadepornography.com/) * [Ben Handzo](http://handzo.com) * [Jean-Philippe Sirois](http://jpsirois.com) -* [Sindre Sorhus](http://sindresorhus.com) +* [Sindre Sorhus](https://sindresorhus.com) * [Nick Ruest](http://ruebot.net) * [Steven Huey](https://twitter.com/stevehuey) * [Craig Bernstein](http://cwb.us/) -* [Peter Murray](http://dltj.org/) +* [Peter Murray](https://dltj.org/) * [Andrew Madsen](http://www.openreelsoftware.com) * [pb30](http://pb30.com) -* [squaredesign](http://squaredesign.com) +* [squaredesign](https://squaredesign.com) * [Alex Burka](http://www.alexburka.com) * Ciarán Walsh * [Andrew Brown](http://pvalu.es) * [Bethany Sumner](http://www.bethanysumner.com/) * [Orta](http://orta.io) -* [Michał Gołębiowski](http://mgol.eu) +* [Michał Gołębiowski](https://mgol.eu) * [Adam C. Foltzer](http://www.acfoltzer.net/) -* [Steve Hiemstra](http://www.speg.com) +* [Steve Hiemstra](https://www.speg.com) * [Anton Sipos](http://www.softwarefuturism.com) * [Sergey Nebolsin](http://fedot.com) * [Dan Poltawski](http://blog.danpoltawski.co.uk) @@ -389,12 +389,12 @@ These wonderful people supported our Kickstarter by giving us £10 or more: * [Milan Cermak](http://milancermak.com) * [Sebastian Krysmanski](http://manski.net) * [Mike Stenhouse](http://mikesten.com) -* [Alastair Stuart](http://eurotalk.com) +* [Alastair Stuart](https://eurotalk.com) * [David Rekowski](http://rekowski.info) * [Roland Leth](http://rolandleth.com) * [Maurice Kelly](http://blog.chatswood.org.uk/) * [Daryl Spitzer](https://twitter.com/yacitus) -* [Jose Peleteiro](http://peleteiro.net) +* [Jose Peleteiro](https://peleteiro.net) * [Mikael Hultgren](http://www.artsoftheinsane.com) * [Richard Japenga](http://japenga.eu) * [Pierre Riteau](https://github.com/priteau) @@ -407,8 +407,8 @@ These wonderful people supported our Kickstarter by giving us £10 or more: * [David McFarland](http://www.dcmcfarland.com) * [Roland Tanglao](http://rolandtanglao.com) * [Jacob Elder](http://jacobelder.com) -* [ToWatchList](http://towatchlist.com/) -* [Joshua Jabbour](http://about.me/joshuajabbour) +* [ToWatchList](https://towatchlist.com/) +* [Joshua Jabbour](https://about.me/joshuajabbour) * [Daniel Giribet](http://dani.calidos.com) * [Eric Wallmander](http://wallmander.net/) * [Teakhouten meubelen](http://teakmeubelen.nl/) @@ -420,7 +420,7 @@ These wonderful people supported our Kickstarter by giving us £10 or more: * [Robert Clark](http://www.touchtech.co.nz) * [Wes Oldenbeuving](http://narnach.com/) * [Jon Fuller](http://erg7.com) -* [PredictionIO (Open-source machine learning server)](http://prediction.io) +* [PredictionIO (Open-source machine learning server)](https://prediction.io) * Nikolaus Wittenstein * [StormMQ](http://stormmq.com/) * [Barry Hoggard](http://www.tristanmedia.com/) @@ -433,37 +433,37 @@ These wonderful people supported our Kickstarter by giving us £10 or more: * [Jeremy Clarke](http://jeremyclarke.org) * [Dimitar Dimitrov](http://ddimitrov.name/) * [Hacker School](https://www.hackerschool.com/) -* [Franklin](http://frankl.in) +* [Franklin](https://frankl.in) * [Wes Garrison](http://databasically.com) * [Braulio Carreno](http://carreno.me) * [Derek Croft](http://www.kiindly.com) * [Doc Ritezel](http://ritezel.com) * [Christoph Heer](http://christophheer.me) -* [Kuba Suder](http://mackuba.eu) +* [Kuba Suder](https://mackuba.eu) * [Jason Garber](http://sixtwothree.org) * [Alejandro Caceres](http://punkspider.hyperiongray.com) * [Slobodan Miskovic](https://miskovic.ca) * [Kurt Ostergaard](http://KurtOstergaard.com) -* [Simply Business](http://www.simplybusiness.co.uk/) +* [Simply Business](https://www.simplybusiness.co.uk/) * [Tate Johnson](http://tatey.com) * [Gerry Cardinal III](http://gerrycardinal.com/) * [Andrew Kalek](http://anlek.com) * [Bryan Coe](http://www.BryanACoe.com) * 360 Virtual Tours * [James Turnbull](http://www.kartar.net) -* [Dominic Morgan](http://d3r.com) +* [Dominic Morgan](https://d3r.com) * [Mario Witte](http://www.mariowitte.com) * [Studio NAND](http://www.nand.io) -* [Per Sandström](http://www.helloper.com) +* [Per Sandström](https://www.helloper.com) * [Jochen Schäfer](http://www.joschs-robotics.de) * [Jökull Sólberg Auðunsson](http://www.solberg.is) * [kolpax](http://kolpax.io) * [Matt Davis](http://penandpants.com) -* [Scott Chamberlain](http://ropensci.org/) +* [Scott Chamberlain](https://ropensci.org/) * [Jaehoon You](https://github.com/teslamint) * [Wayne Robinson](http://www.wayne-robinson.com) * [Kitt Hodsden](https://kitt.hodsden.org/) -* [Justin Johnson](http://justinjohnson.org/) +* [Justin Johnson](https://justinjohnson.org/) * [David Cristofaro](http://davidcristofaro.com/) * Steve Salkin * [Kristopher Johnson](http://undefinedvalue.com/) @@ -473,44 +473,44 @@ These wonderful people supported our Kickstarter by giving us £10 or more: * [Jeff Warner](http://www.stormysoftware.com) * [Jeremy Walker](http://www.ihid.co.uk) * [Michael Sanders](http://msanders.com) -* [Zulfiqar Ali](http://www.simplerses.com) +* [Zulfiqar Ali](https://www.simplerses.com) * [Josh Hepworth](http://friendsoftheweb.com) * [Michael Dippery](http://monkey-robot.com/) * [Jonathan Beavers](https://jon4than.com) * [Jason Nourse](http://jasonnourse.com) * [cj little](http://cjlittle.com) * [Nicholas Mott](http://www.discovilante.com) * [Jean-Luc Geering](http://www.ufirstgroup.com/) -* [Ingo Kampe](http://kreuzwerker.de/) +* [Ingo Kampe](https://kreuzwerker.de/) * [Jason Rasmussen](http://www.sourcefire.com) * [Reni Margold](http://renimargold.com) * [Jacopo](https://github.com/dedalusj) -* [Incremental Productions Ltd](http://www.incremental.co.uk/) +* [Incremental Productions Ltd](https://www.incremental.co.uk/) * [condero Aktiengesellschaft](http://www.condero.com) * [Mintrus](http://mintrus.com) * [Ezekiel Templin](http://zeke.templ.in/) * [Matt Robinson](https://www.lazycat.org/) * [Greg Kaufman](http://gregkaufman.com) * [Chris Wilkes](https://github.com/cwilkes) -* [Maven Security Consulting](http://www.mavensecurity.com) +* [Maven Security Consulting](https://www.mavensecurity.com) * [Christopher Vander Poel](http://www.wlvrn.com) * [Weiyin LIANG](http://pyology.com) -* [Epic Awesome](http://epicawesome.co/) +* [Epic Awesome](https://epicawesome.co/) * [Evan Oxfeld](https://twitter.com/evanoxfeld) * [Alexander Lash](http://alexla.sh) * [Ferran Selles](http://www.nulltrace.com) * [Rick Companje](http://www.companje.nl) * [Alexander Zubko](https://www.youtube.com/watch?v=jqxENMKaeCU) -* [Iain Beeston](http://iainbeeston.com/) -* [Geoff Bowers](http://www.daemon.com.au) +* [Iain Beeston](https://iainbeeston.com/) +* [Geoff Bowers](https://www.daemon.com.au) * [Logan Cox](http://lo5an.com) * [Helmwind](http://helmwind.com) * [José Tiburcio Ribeiro Netto](http://mineiro.org) * [Cloudier](http://www.cloudier.com) * [Adam Merrifield](http://seydesign.com) * [Alan Chiang](http://itsnotvalid.com) * Ralf Norbert Sooth -* [Cameron Tod](http://camerontod.com) +* [Cameron Tod](https://camerontod.com) * [Paul McLanahan](http://pmac.io) * [Lance Ulmer](http://lanceulmer.com) * [Thomas Jachmann](http://thomasjachmann.com) @@ -519,9 +519,9 @@ These wonderful people supported our Kickstarter by giving us £10 or more: * [Arvy](http://www.codingepiphany.com) * [James Pellerano](http://jamespellerano.com) * [Birger J. Nordølum](http://mindtooth.me) -* [Bob Saska](http://r35.net) +* [Bob Saska](https://r35.net) * [Michael McCarthy](https://github.com/mikeycmccarthy) -* [Scott Courtney](http://www.sinenomine.net/) +* [Scott Courtney](https://www.sinenomine.net/) * [Courtney Wilburn](http://blog.cjwilburn.com) * [Gregory Man](https://github.com/gregory-m) * [Sean Porter](http://seanporter.com) @@ -530,7 +530,7 @@ These wonderful people supported our Kickstarter by giving us £10 or more: * [Joacim Löwgren](http://www.jorum.se) * [Shawn Price](http://shawnprice.com/) * [Dominick LoBraico](http://dominick.me) -* [Denis Wolf](http://deniswolf.net) +* [Denis Wolf](https://deniswolf.net) These lovely people supported our Kickstarter by giving us £5 or more:
false
Other
Homebrew
brew
dd7e8f291d24c08b5e6e09b48350ffd1cf0b8bd3.json
downloads: fix undefined local variable https://github.com/Homebrew/homebrew/commit/2950e5ab6ee76f35c7015cfa2d07bee6ddb1170e#commitcomment-13824130
Library/Homebrew/download_strategy.rb
@@ -500,7 +500,7 @@ def fetch_repo(target, url, revision = nil, ignore_externals = false) args << url unless target.directory? args << target if revision - ohai "Checking out #{ref}" + ohai "Checking out #{@ref}" args << "-r" << revision end args << "--ignore-externals" if ignore_externals
false
Other
Homebrew
brew
017a5014715d21b8fc8b8aa2d0f42fec1d47f933.json
downloads: Fix checkout on initial clone Moves the "Checking out" output to where checkouts actually happen, to avoid spurious checkout announcements. Closes Homebrew/homebrew#45019. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/download_strategy.rb
@@ -135,10 +135,6 @@ def fetch end end - def stage - ohai "Checking out #{@ref_type} #{@ref}" if @ref_type && @ref - end - def cached_location @clone end @@ -503,7 +499,10 @@ def fetch_repo(target, url, revision = nil, ignore_externals = false) args = ["svn", svncommand] args << url unless target.directory? args << target - args << "-r" << revision if revision + if revision + ohai "Checking out #{ref}" + args << "-r" << revision + end args << "--ignore-externals" if ignore_externals quiet_safe_system(*args) end @@ -645,11 +644,13 @@ def clone_repo safe_system "git", *clone_args cached_location.cd do safe_system "git", "config", "homebrew.cacheversion", cache_version + checkout update_submodules if submodules? end end def checkout + ohai "Checking out #{@ref_type} #{@ref}" if @ref_type && @ref quiet_safe_system "git", "checkout", "-f", @ref, "--" end @@ -732,6 +733,7 @@ def stage dst = Dir.getwd cached_location.cd do if @ref_type && @ref + ohai "Checking out #{@ref_type} #{@ref}" if @ref_type && @ref safe_system hgpath, "archive", "--subrepos", "-y", "-r", @ref, "-t", "files", dst else safe_system hgpath, "archive", "--subrepos", "-y", "-t", "files", dst
false
Other
Homebrew
brew
79018e4e242dbad09adce4c60e2f4f061df0a402.json
test-bot: remove unused --tap args for brew bottle
Library/Homebrew/cmd/test-bot.rb
@@ -592,7 +592,6 @@ def formula(formula_name) bottle_step.output.gsub(/.*(\.\/\S+#{bottle_native_regex}).*/m, '\1') bottle_rb_filename = bottle_filename.gsub(/\.(\d+\.)?tar\.gz$/, ".rb") bottle_merge_args = ["--merge", "--write", "--no-commit", bottle_rb_filename] - bottle_merge_args << "--tap=#{@tap}" if @tap bottle_merge_args << "--keep-old" if ARGV.include? "--keep-old" test "brew", "bottle", *bottle_merge_args test "brew", "uninstall", "--force", canonical_formula_name @@ -823,7 +822,6 @@ def test_ci_upload(tap) end bottle_args = ["--merge", "--write", *Dir["*.bottle.rb"]] - bottle_args << "--tap=#{tap}" if tap bottle_args << "--keep-old" if ARGV.include? "--keep-old" system "brew", "bottle", *bottle_args
false
Other
Homebrew
brew
d1222971f61b5e882571e303750da34fdee5a0cf.json
test-bot: update diff_start_sha1 unconditionally See bfab4b0e65db4667ab09159b1040701fa75ec687 Closes Homebrew/homebrew#44889. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/test-bot.rb
@@ -318,12 +318,13 @@ def brew_update # Use Travis CI Git variables for master or branch jobs. elsif ENV["TRAVIS_COMMIT_RANGE"] diff_start_sha1, diff_end_sha1 = ENV["TRAVIS_COMMIT_RANGE"].split "..." - diff_start_sha1 = git("merge-base", diff_start_sha1, diff_end_sha1).strip # Otherwise just use the current SHA-1 (which may be overriden later) else diff_end_sha1 = diff_start_sha1 = current_sha1 end + diff_start_sha1 = git("merge-base", diff_start_sha1, diff_end_sha1).strip + # Handle no arguments being passed on the command-line e.g. `brew test-bot`. if no_args? if diff_start_sha1 == diff_end_sha1 || \
false
Other
Homebrew
brew
7ba19f76975228861dbf75c8dbe40d499e4a98db.json
README: note documentation license.
README.md
@@ -31,6 +31,7 @@ Homebrew was originally created by [Max Howell](https://github.com/mxcl). ## License Code is under the [BSD 2 Clause (NetBSD) license](https://github.com/Homebrew/homebrew/tree/master/LICENSE.txt). +Documentation is under the [Creative Commons Attribution license](https://creativecommons.org/licenses/by/4.0/). ## Sponsors Our CI infrastructure was paid for by [our Kickstarter supporters](https://github.com/Homebrew/homebrew/blob/master/SUPPORTERS.md).
false
Other
Homebrew
brew
76a5ba6ae598ea0c6c204f3a30bc36dd3a423d67.json
test: allow writing to certain var directories Closes Homebrew/homebrew#44458. Closes Homebrew/homebrew#44773. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/test.rb
@@ -56,6 +56,9 @@ def test sandbox.allow_write_temp_and_cache sandbox.allow_write_log(f) sandbox.allow_write_xcode + sandbox.allow_write_path(HOMEBREW_PREFIX/"var/cache") + sandbox.allow_write_path(HOMEBREW_PREFIX/"var/log") + sandbox.allow_write_path(HOMEBREW_PREFIX/"var/run") sandbox.exec(*args) else exec(*args)
false
Other
Homebrew
brew
52de8d93733ca371996d56c721ba99483d271b24.json
postinstall: sanitize ARGV options
Library/Homebrew/cmd/postinstall.rb
@@ -15,6 +15,12 @@ def run_post_install(formula) #{formula.path} ].concat(ARGV.options_only) + if formula.head? + args << "--HEAD" + elsif formula.devel? + args << "--devel" + end + if Sandbox.available? && ARGV.sandbox? if Sandbox.auto_disable? Sandbox.print_autodisable_warning
false
Other
Homebrew
brew
fe3b69d388ca4a5b3a0d9493b688e40ee28dc1c8.json
test: sanitize ARGV options Otherwise, it will use the wrong prefix to test devel/HEAD install.
Library/Homebrew/cmd/test.rb
@@ -34,6 +34,12 @@ def test #{f.path} ].concat(ARGV.options_only) + if f.head? + args << "--HEAD" + elsif f.devel? + args << "--devel" + end + if Sandbox.available? && ARGV.sandbox? if Sandbox.auto_disable? Sandbox.print_autodisable_warning
false
Other
Homebrew
brew
5b321ffb5a5308f1de96e7bfa79e83828e9c9552.json
caveats: show information based on build options Fixes Homebrew/homebrew#44729. Fixes Homebrew/homebrew#40863. Closes Homebrew/homebrew#44779. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/caveats.rb
@@ -7,8 +7,13 @@ def initialize(f) def caveats caveats = [] - s = f.caveats.to_s - caveats << s.chomp + "\n" if s.length > 0 + begin + build, f.build = f.build, Tab.for_formula(f) + s = f.caveats.to_s + caveats << s.chomp + "\n" if s.length > 0 + ensure + f.build = build + end caveats << keg_only_text caveats << bash_completion_caveats caveats << zsh_completion_caveats
false
Other
Homebrew
brew
1ae44d44299803ec0da62731ac7b808d1d32f5aa.json
use directory? to check rack existence
Library/Homebrew/cmd/install.rb
@@ -77,7 +77,7 @@ def install msg = "#{f.full_name}-#{f.installed_version} already installed" msg << ", it's just not linked" unless f.linked_keg.symlink? || f.keg_only? opoo msg - elsif f.oldname && (dir = HOMEBREW_CELLAR/f.oldname).exist? && !dir.subdirs.empty? \ + elsif f.oldname && (dir = HOMEBREW_CELLAR/f.oldname).directory? && !dir.subdirs.empty? \ && f.tap == Tab.for_keg(dir.subdirs.first).tap && !ARGV.force? # Check if the formula we try to install is the same as installed # but not migrated one. If --force passed then install anyway.
true
Other
Homebrew
brew
1ae44d44299803ec0da62731ac7b808d1d32f5aa.json
use directory? to check rack existence
Library/Homebrew/cmd/outdated.rb
@@ -18,10 +18,9 @@ def outdated_brews(formulae) all_versions = [] older_or_same_tap_versions = [] - if f.oldname && !f.rack.exist? && (dir = HOMEBREW_CELLAR/f.oldname).exist? - if f.tap == Tab.for_keg(dir.subdirs.first).tap - raise Migrator::MigrationNeededError.new(f) - end + if f.oldname && !f.rack.exist? && (dir = HOMEBREW_CELLAR/f.oldname).directory? && + !dir.subdirs.empty? && f.tap == Tab.for_keg(dir.subdirs.first).tap + raise Migrator::MigrationNeededError.new(f) end f.rack.subdirs.each do |keg_dir|
true
Other
Homebrew
brew
6b3b398858147a53fec5dc850d29ca531ef8fcc1.json
audit: fix GitHub repository audit In the data returned from the GitHub API, “watchers_count” is actually the number of stars. See https://developer.github.com/v3/activity/starring/#starring-vs-watching Closes Homebrew/homebrew#44477. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/audit.rb
@@ -477,7 +477,7 @@ def audit_github_repository end problem "GitHub fork (not canonical repository)" if metadata["fork"] - if (metadata["forks_count"] < 10) && (metadata["watchers_count"] < 10) && + if (metadata["forks_count"] < 10) && (metadata["subscribers_count"] < 10) && (metadata["stargazers_count"] < 20) problem "GitHub repository not notable enough (<10 forks, <10 watchers and <20 stars)" end
false
Other
Homebrew
brew
d3d1b6f0fe57660d6b3f6cf74e08b75ba5322649.json
Encourage https for bottle hosting I assume that we want to encourage people hosting their own bottles to serve them using `https`. This PR has a trivial change in the example. We may consider adding some text to the `root_url` description with a discussion of security. Also use https://example.com instead of http://mikemcquaid.com in bottle example. Closes Homebrew/homebrew#44651. Signed-off-by: Xu Cheng <xucheng@me.com>
share/doc/homebrew/Bottles.md
@@ -32,7 +32,7 @@ end A full example: ```ruby bottle do - root_url "http://mikemcquaid.com" + root_url "https://example.com" prefix "/opt/homebrew" cellar "/opt/homebrew/Cellar" revision 4
false
Other
Homebrew
brew
831850029422cb3d78e395ce091b1e2a115b5400.json
Remove extra word Closes Homebrew/homebrew#44708. Signed-off-by: Xu Cheng <xucheng@me.com>
share/doc/homebrew/Gems,-Eggs-and-Perl-Modules.md
@@ -72,7 +72,7 @@ without sudo. You should add this to your path. See the caveats in the ### With system’s Ruby -To make Ruby install install to `/usr/local`, we need to add +To make Ruby install to `/usr/local`, we need to add `gem: -n/usr/local/bin` to your `~/.gemrc`. It’s YAML…so do it manually or use this:
false
Other
Homebrew
brew
4c80bf4324956e39073eb7d13c144cdcd0f64fba.json
audit: add check for 'head' and 'head do' both present Closes Homebrew/homebrew#44626. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Library/Homebrew/cmd/audit.rb
@@ -179,15 +179,20 @@ def audit_file [/^ test do/, "test block"] ] - component_list.map do |regex, name| + present = component_list.map do |regex, name| lineno = text.line_number regex next unless lineno [lineno, name] - end.compact.each_cons(2) do |c1, c2| + end.compact + present.each_cons(2) do |c1, c2| unless c1[0] < c2[0] problem "`#{c1[1]}` (line #{c1[0]}) should be put before `#{c2[1]}` (line #{c2[0]})" end end + present.map!(&:last) + if present.include?("head") && present.include?("head block") + problem "Should not have both `head` and `head do`" + end end def audit_class
false
Other
Homebrew
brew
e0f99945421243bc332002dec4f8e25220237aeb.json
Remove incomplete files in cache on `brew cleanup` Closes Homebrew/homebrew#44182. Closes Homebrew/homebrew#44349. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/cleanup.rb
@@ -57,6 +57,10 @@ def cleanup_keg(keg) def cleanup_cache return unless HOMEBREW_CACHE.directory? HOMEBREW_CACHE.children.each do |path| + if path.to_s.end_with? ".incomplete" + cleanup_path(path) { path.unlink } + next + end if prune?(path) if path.file? cleanup_path(path) { path.unlink }
false
Other
Homebrew
brew
cc7a047edc8dbd34706dfe4014a78dc0b176cf6b.json
version: parse opam archives Closes Homebrew/homebrew#44544. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Library/Homebrew/test/test_versions.rb
@@ -350,4 +350,15 @@ def test_with_arch assert_version_detected "4.0.18", "http://ftpmirror.gnu.org/mtools/mtools_4.0.18_i386.deb" end + + def test_opam_version + assert_version_detected "2.18.3", + "https://opam.ocaml.org/archives/lablgtk.2.18.3+opam.tar.gz" + assert_version_detected "1.9", + "https://opam.ocaml.org/archives/sha.1.9+opam.tar.gz" + assert_version_detected "0.99.2", + "https://opam.ocaml.org/archives/ppx_tools.0.99.2+opam.tar.gz" + assert_version_detected "1.0.2", + "https://opam.ocaml.org/archives/easy-format.1.0.2+opam.tar.gz" + end end
true
Other
Homebrew
brew
cc7a047edc8dbd34706dfe4014a78dc0b176cf6b.json
version: parse opam archives Closes Homebrew/homebrew#44544. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Library/Homebrew/version.rb
@@ -328,6 +328,13 @@ def self._parse(spec) m = /-(\d+\.\d+(?:\.\d+)?)-w(?:in)?(?:32|64)$/.match(stem) return m.captures.first unless m.nil? + # Opam packages + # e.g. https://opam.ocaml.org/archives/sha.1.9+opam.tar.gz + # e.g. https://opam.ocaml.org/archives/lablgtk.2.18.3+opam.tar.gz + # e.g. https://opam.ocaml.org/archives/easy-format.1.0.2+opam.tar.gz + m = /\.(\d+\.\d+(?:\.\d+)?)\+opam$/.match(stem) + return m.captures.first unless m.nil? + # e.g. http://ftpmirror.gnu.org/mtools/mtools-4.0.18-1.i686.rpm # e.g. http://ftpmirror.gnu.org/autogen/autogen-5.5.7-5.i386.rpm # e.g. http://ftpmirror.gnu.org/libtasn1/libtasn1-2.8-x86.zip
true
Other
Homebrew
brew
5f29dee138a2478f89480710af3905546fa98368.json
Remove redundant chown commands. `chown -R` should be sufficient. There is no obvious reason to chown the top-level directory as a separate command. Closes Homebrew/homebrew#44554. Signed-off-by: Tim D. Smith <git@tim-smith.us>
share/doc/homebrew/El_Capitan_and_Homebrew.md
@@ -15,7 +15,7 @@ This is how to fix Homebrew on El Capitan if you see permission issues: ## If `/usr/local` exists already: ```bash -sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local +sudo chown -R $(whoami):admin /usr/local ``` ## If `/usr/local` does not exist: @@ -27,7 +27,7 @@ sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/loca * Open your Terminal application and execute: ```bash - sudo mkdir /usr/local && sudo chflags norestricted /usr/local && sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local + sudo mkdir /usr/local && sudo chflags norestricted /usr/local && sudo chown -R $(whoami):admin /usr/local ``` * Reboot back into Recovery Mode & access the Terminal again.
false
Other
Homebrew
brew
8f072724def466a37543ec279876fada932109b7.json
Remove MacVTKITKPythonBottles from doc Bottles for VTK and ITK python are no more provided. ITK can be wrapped with Python since version 4.8, so this tap is no more needed. Using the vanilla homebrew VTK and ITK formulas is the way to go. Closes Homebrew/homebrew#44467. Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
share/doc/homebrew/Interesting-Taps-&-Branches.md
@@ -69,9 +69,6 @@ You can be added as a maintainer for one of the Homebrew organization taps and a * [petere/postgresql](https://github.com/petere/homebrew-postgresql) - Allows installing multiple PostgreSQL versions in parallel. -* [iMichka/MacVTKITKPythonBottles](https://github.com/iMichka/homebrew-MacVTKITKPythonBottles) - - VTK and ITK binaries with Python wrapping. - * [edavis/emacs](https://github.com/edavis/homebrew-emacs) - A tap for Emacs packages.
false
Other
Homebrew
brew
ab19bc641ca2cd6b4dc7d408bbb8df29432c07d4.json
El_Capitan_and_Homebrew: update dead link
share/doc/homebrew/El_Capitan_and_Homebrew.md
@@ -6,9 +6,9 @@ SIP prevents you from writing to many system directories such as `/usr`, `/Syste One of the implications of SIP is that you cannot simply create `/usr/local` if it is removed or doesn't exist for another reason. However, as noted in the keynote, Apple is leaving `/usr/local` open for developers to use, so Homebrew can still be used as expected. -Apple documentation hints that `/usr/local` will be returned to `root:wheel restricted` permissions on [every OS X update](https://developer.apple.com/library/prerelease/mac/releasenotes/General/rn-osx-10.11/); Homebrew will be adding a `brew doctor` check to warn you when this happens in the near future. +Apple documentation *hints* that `/usr/local` will be returned to `root:wheel restricted` permissions on [every OS X update](https://developer.apple.com/library/mac/releasenotes/General/rn-osx-10.11/index.html). There is a `brew doctor` check in place to advise if permissions have slipped for whatever reason. -If you haven't installed Homebrew in `/usr/local` or another system-protected directory, none of these concerns apply to you. +**If you haven't installed Homebrew in `/usr/local` or another system-protected directory, this document does not apply to you.** This is how to fix Homebrew on El Capitan if you see permission issues:
false
Other
Homebrew
brew
00242964801a5030d8661ef42fae9a05101c9230.json
xcode: expect xcode 7.0.1
Library/Homebrew/os/mac/xcode.rb
@@ -14,12 +14,12 @@ def latest_version when "10.7" then "4.6.3" when "10.8" then "5.1.1" when "10.9" then "6.2" - when "10.10" then "6.4" - when "10.11" then "7.0" + when "10.10" then "7.0.1" + when "10.11" then "7.0.1" else # Default to newest known version of Xcode for unreleased OSX versions. if MacOS.version > "10.11" - "7.0" + "7.0.1" else raise "OS X '#{MacOS.version}' is invalid" end @@ -166,7 +166,7 @@ def installed? def latest_version case MacOS.version when "10.11" then "700.0.72" - when "10.10" then "602.0.53" + when "10.10" then "700.0.72" when "10.9" then "600.0.57" when "10.8" then "503.0.40" else
false
Other
Homebrew
brew
be8d348a6d98425ed8b3feecec7ce58ce95e948c.json
os: add xcode 7.0.1
Library/Homebrew/os/mac.rb
@@ -238,7 +238,8 @@ def preferred_arch "6.3.1" => { :clang => "6.1", :clang_build => 602 }, "6.3.2" => { :clang => "6.1", :clang_build => 602 }, "6.4" => { :clang => "6.1", :clang_build => 602 }, - "7.0" => { :clang => "7.0", :clang_build => 700 } + "7.0" => { :clang => "7.0", :clang_build => 700 }, + "7.0.1" => { :clang => "7.0", :clang_build => 700 }, } def compilers_standard?
false
Other
Homebrew
brew
e66cb917023f235903803f3df53df9bc86c2f321.json
update: add permissions check Closes Homebrew/homebrew#42048 Closes Homebrew/homebrew#44434. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/update.rb
@@ -1,4 +1,5 @@ require "cmd/tap" +require "cmd/doctor" require "formula_versions" require "migrator" require "formulary" @@ -13,6 +14,16 @@ def update EOS end + # check permissions + checks = Checks.new + %w[ + check_access_usr_local + check_access_homebrew_repository + ].each do |check| + out = checks.send(check) + odie out unless out.nil? + end + # ensure git is installed Utils.ensure_git_installed!
false
Other
Homebrew
brew
04959403ac23bc16d52fc52aafed80b574231b02.json
Python-for-Formula-Authors: use sha256 for example
share/doc/homebrew/Python-for-Formula-Authors.md
@@ -99,13 +99,13 @@ class Foo < Formula url ... resource "six" do - url "https://pypi.python.org/packages/source/s/six/six-1.8.0.tar.gz" - sha1 "aa3b0659cbc85c6c7a91efc51f2d1007040070cd" + url "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz" + sha256 "e24052411fc4fbd1f672635537c3fc2330d9481b18c0317695b46259512c91d5" end - resource "parsedatetime" do + resource "parsedatetime" do url "https://pypi.python.org/packages/source/p/parsedatetime/parsedatetime-1.4.tar.gz" - sha1 "4b9189d38f819cc8144f30d91779716a696d97f8" + sha256 "09bfcd8f3c239c75e77b3ff05d782ab2c1aed0892f250ce2adf948d4308fe9dc" end def install
false
Other
Homebrew
brew
b37a28514126ac46e06cc1f5c8cc124a0fdff7f1.json
test-bot: fix start_revision for Travis When a PR is merged during the test, the commit tree will be looked like this: master PR \ / \ / | root The start_revision will be poined to the commit used to merging PR, instead of common root commit. As result, `git diff-tree start end` will list file changes both in PR and master branch, which later contributes to additional formulae are tested in some Travis builds. To fix the problem, we use `git merge-base` to get common ancestor as the real start_revision. Closes Homebrew/homebrew#44379. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/test-bot.rb
@@ -318,6 +318,7 @@ def brew_update # Use Travis CI Git variables for master or branch jobs. elsif ENV["TRAVIS_COMMIT_RANGE"] diff_start_sha1, diff_end_sha1 = ENV["TRAVIS_COMMIT_RANGE"].split "..." + diff_start_sha1 = git("merge-base", diff_start_sha1, diff_end_sha1).strip # Otherwise just use the current SHA-1 (which may be overriden later) else diff_end_sha1 = diff_start_sha1 = current_sha1
false
Other
Homebrew
brew
be45e6a0c52b02508aef17f0a9b16ebf6976d006.json
migrator: link Cellar and opt before the keg. When there's absolute symlinks in a linked directory in the `keg` (e.g. `bin`)that point to the `Cellar` or `opt` then linking the `keg` will fail before the `Cellar` or `opt` has been linked. Closes Homebrew/homebrew#44306. Closes Homebrew/homebrew#44329. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/migrator.rb
@@ -163,9 +163,9 @@ def migrate unlink_oldname move_to_new_directory repin - link_newname unless old_linked_keg.nil? - link_oldname_opt link_oldname_cellar + link_oldname_opt + link_newname unless old_linked_keg.nil? update_tabs rescue Interrupt ignore_interrupts { backup_oldname }
false
Other
Homebrew
brew
74a2c3a5092c3d0556a5e3a8b07c8e2e92b93c1c.json
test-bot: add comments, tweak argument handling.
Library/Homebrew/cmd/test-bot.rb
@@ -299,48 +299,58 @@ def brew_update travis_pr = ENV["TRAVIS_PULL_REQUEST"] && ENV["TRAVIS_PULL_REQUEST"] != "false" - # Use Jenkins environment variables if present. - if no_args? && ENV["GIT_PREVIOUS_COMMIT"] && ENV["GIT_COMMIT"] \ - && !ENV["ghprbPullLink"] - diff_start_sha1 = shorten_revision ENV["GIT_PREVIOUS_COMMIT"] - diff_end_sha1 = shorten_revision ENV["GIT_COMMIT"] - elsif ENV["TRAVIS_COMMIT_RANGE"] - diff_start_sha1, diff_end_sha1 = ENV["TRAVIS_COMMIT_RANGE"].split "..." - diff_end_sha1 = ENV["TRAVIS_COMMIT"] if travis_pr - elsif ENV["ghprbPullLink"] - # Handle Jenkins pull request builder plugin. + # Use Jenkins GitHub Pull Request Builder plugin variables for + # pull request jobs. + if ENV["ghprbPullLink"] @url = ENV["ghprbPullLink"] @hash = nil test "git", "checkout", "origin/master" + # Use Travis CI pull-request variables for pull request jobs. elsif travis_pr @url = "https://github.com/#{ENV["TRAVIS_REPO_SLUG"]}/pull/#{ENV["TRAVIS_PULL_REQUEST"]}" @hash = nil - elsif @hash - diff_start_sha1 = current_sha1 - brew_update - diff_end_sha1 = current_sha1 end + # Use Jenkins Git plugin variables for master branch jobs. + if ENV["GIT_PREVIOUS_COMMIT"] && ENV["GIT_COMMIT"] + diff_start_sha1 = ENV["GIT_PREVIOUS_COMMIT"] + diff_end_sha1 = ENV["GIT_COMMIT"] + # Use Travis CI Git variables for master or branch jobs. + elsif ENV["TRAVIS_COMMIT_RANGE"] + diff_start_sha1, diff_end_sha1 = ENV["TRAVIS_COMMIT_RANGE"].split "..." + # Otherwise just use the current SHA-1 (which may be overriden later) + else + diff_end_sha1 = diff_start_sha1 = current_sha1 + end + + # Handle no arguments being passed on the command-line e.g. `brew test-bot`. if no_args? if diff_start_sha1 == diff_end_sha1 || \ single_commit?(diff_start_sha1, diff_end_sha1) @name = diff_end_sha1 else @name = "#{diff_start_sha1}-#{diff_end_sha1}" end + # Handle formulae arguments being passed on the command-line e.g. `brew test-bot wget fish`. + elsif @formulae && @formulae.any? + @name = "#{@formulae.first}-#{diff_end_sha1}" + # Handle a hash being passed on the command-line e.g. `brew test-bot 1a2b3c`. elsif @hash test "git", "checkout", @hash diff_start_sha1 = "#{@hash}^" diff_end_sha1 = @hash @name = @hash - elsif ENV["TRAVIS_PULL_REQUEST"] && ENV["TRAVIS_PULL_REQUEST"] != "false" - @short_url = @url.gsub("https://github.com/", "") - @name = "#{@short_url}-#{diff_end_sha1}" - # TODO: in future this may need to use `brew pull` to push the right commit. + # Handle a URL being passed on the command-line or through Jenkins/Travis + # environment variables e.g. + # `brew test-bot https://github.com/Homebrew/homebrew/pull/44293`. elsif @url - diff_start_sha1 = current_sha1 - test "brew", "pull", "--clean", @url - diff_end_sha1 = current_sha1 + # TODO: in future Travis CI may need to also use `brew pull` to e.g. push + # the right commit to BrewTestBot. + unless travis_pr + diff_start_sha1 = current_sha1 + test "brew", "pull", "--clean", @url + diff_end_sha1 = current_sha1 + end @short_url = @url.gsub("https://github.com/", "") if @short_url.include? "/commit/" # 7 characters should be enough for a commit (not 40). @@ -350,8 +360,7 @@ def brew_update @name = "#{@short_url}-#{diff_end_sha1}" end else - diff_start_sha1 = diff_end_sha1 = current_sha1 - @name = "#{@formulae.first}-#{diff_end_sha1}" + raise "Cannot set @name: invalid command-line arguments!" end if ENV["TRAVIS"]
false
Other
Homebrew
brew
a3bb7575072bdd6cbb8f8c127ba5fbd79d18caa4.json
travis: organize matrix config
.travis.yml
@@ -1,16 +1,17 @@ # Force OS X. language: objective-c -os: osx -env: OSX=10.11 -osx_image: osx10.11 -rvm: - - system matrix: include: + - env: OSX=10.11 + os: osx + osx_image: osx10.11 + rvm: system - env: OSX=10.10 + os: osx osx_image: xcode7 rvm: system - env: OSX=10.9 + os: osx osx_image: beta-xcode6.2 rvm: system
false
Other
Homebrew
brew
87769ee970c71e757ccc5637f315a93c2e0cb141.json
style: update rubocop to 0.34.2
Library/Homebrew/cmd/style.rb
@@ -8,7 +8,7 @@ def style ARGV.formulae.map(&:path) end - Homebrew.install_gem_setup_path! "rubocop", "0.34.1" + Homebrew.install_gem_setup_path! "rubocop", "0.34.2" args = [ "--format", "simple", "--force-exclusion", "--config",
false
Other
Homebrew
brew
322a93bce0a7d592ba5f5be87731a7f9db22fafd.json
test-bot: use IO#read instead of IO#gets IO#gets will only return for every new lines, which will be bad for `brew install` since we print dots in single line. Closes Homebrew/homebrew#44264. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/test-bot.rb
@@ -154,9 +154,12 @@ def run working_dir.cd { exec(*@command) } end write.close - while line = read.gets - puts line if verbose - @output += line + while buf = read.read(1) + if verbose + print buf + $stdout.flush + end + @output << buf end ensure read.close
false
Other
Homebrew
brew
9aecb1be2b89843c66852ad11ba6c22ef10d2e64.json
formula: increase fail log lines, allow config. The default is almost never useful. 15 seems like a good medium as it'll not fill a 80x24 default but provides a bit more context. Also allow it to be overriden for developers and `test-bot`.
Library/Homebrew/formula.rb
@@ -1304,8 +1304,14 @@ def system(cmd, *args) $stdout.flush unless $?.success? + log_lines = ENV["HOMEBREW_FAIL_LOG_LINES"] + log_lines ||= "15" + log.flush - Kernel.system "/usr/bin/tail", "-n", "5", logfn unless verbose + unless verbose + puts "Last #{log_lines} lines from #{logfn}:" + Kernel.system "/usr/bin/tail", "-n", log_lines, logfn + end log.puts require "cmd/config"
false
Other
Homebrew
brew
b5a20e79ee99d399f8e590e6a414bf2be0a06c52.json
travis.yml: add 10.11 image.
.travis.yml
@@ -1,12 +1,15 @@ # Force OS X. language: objective-c os: osx -env: OSX=10.10 -osx_image: xcode7 +env: OSX=10.11 +osx_image: osx10.11 rvm: - system matrix: include: + - env: OSX=10.10 + osx_image: xcode7 + rvm: system - env: OSX=10.9 osx_image: beta-xcode6.2 rvm: system
false
Other
Homebrew
brew
15875ade9341f29bc2e3f240db077df3a16a0914.json
add link to RISC-V toolchain Closes Homebrew/homebrew#44196. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
share/doc/homebrew/Custom-GCC-and-cross-compilers.md
@@ -12,3 +12,4 @@ Rather than merging in brews for either of these cases at this time, we're listi * [MSP430 development](https://github.com/Homebrew/homebrew/issues/issue/2336) * [OS161 development](https://github.com/maxpow4h/homebrew-os161) Your university probably uses a different version, replacing the URLs with your university's URLs will probably work. * [ARM-EABI](https://github.com/paxswill/homebrew-paxswill) provides an arm-none-eabi toolchain formula. +* [RISC-V](https://github.com/riscv/homebrew-riscv) provides the RISC-V toolchain including binutils and gcc.
false
Other
Homebrew
brew
76488216b78f83f3f76a052b1819f04bd0555bde.json
test-bot: remove obsolete empty line
Library/Homebrew/cmd/test-bot.rb
@@ -142,7 +142,6 @@ def run end verbose = ARGV.verbose? - puts if verbose && !ENV["TRAVIS"] @output = "" working_dir = Pathname.new(@command.first == "git" ? @repository : Dir.pwd) read, write = IO.pipe
false
Other
Homebrew
brew
6e5bef5ee167b6ed635ebd845cffa61339fa989b.json
Troubleshooting: add El Cap doc link
share/doc/homebrew/Troubleshooting.md
@@ -24,6 +24,7 @@ Thank you! * If you’re installing something Java-related, maybe you need the [Java Developer Update][] or [JDK 7][]? * Check that **Command Line Tools for Xcode (CLT)** and/or **Xcode** are up to date. * If things fail with permissions errors, check the permissions in `/usr/local`. If you’re unsure what to do, you can `sudo chown -R $(whoami) /usr/local`. +* If you see permission errors after upgrading to El Capitan please see the [El Capitan and Homebrew](El_Capitan_and_Homebrew.md) document. #### Listen to Dr. Brew
false
Other
Homebrew
brew
bf5482216bc80cee609590c518ea9415358c931f.json
El_Capitan_and_Homebrew: add permissions doc
share/doc/homebrew/El_Capitan_and_Homebrew.md
@@ -0,0 +1,36 @@ +# El Capitan & Homebrew + +Part of the OS X 10.11/El Capitan changes is something called [System Integrity Protection](https://en.wikipedia.org/wiki/System_Integrity_Protection) or "SIP". + +SIP prevents you from writing to many system directories such as `/usr`, `/System` & `/bin`, regardless of whether or not you are root. The Apple keynote is [here](https://developer.apple.com/videos/wwdc/2015/?id=706) if you'd like to learn more. + +One of the implications of SIP is that you cannot simply create `/usr/local` if it is removed or doesn't exist for another reason. However, as noted in the keynote, Apple is leaving `/usr/local` open for developers to use, so Homebrew can still be used as expected. + +Apple documentation hints that `/usr/local` will be returned to `root:wheel restricted` permissions on [every OS X update](https://developer.apple.com/library/prerelease/mac/releasenotes/General/rn-osx-10.11/); Homebrew will be adding a `brew doctor` check to warn you when this happens in the near future. + +If you haven't installed Homebrew in `/usr/local` or another system-protected directory, none of these concerns apply to you. + +This is how to fix Homebrew on El Capitan if you see permission issues: + +## If `/usr/local` exists already: + +```bash +sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local +``` + +## If `/usr/local` does not exist: + +* Reboot into Recovery mode (Hold Cmd+R on boot) & access the Terminal. +* In that terminal run: + `csrutil disable` +* Reboot back into OS X +* Open your Terminal application and execute: + +```bash + sudo mkdir /usr/local && sudo chflags norestricted /usr/local && sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local +``` + +* Reboot back into Recovery Mode & access the Terminal again. +* In that terminal execute: + `csrutil enable` +* Reboot back into OS X & you'll be able to write to `/usr/local` & install Homebrew.
false
Other
Homebrew
brew
badea990973e6464d47e2ec43ff34fb7d45a0069.json
test-bot: fix bottle uploading
Library/Homebrew/cmd/test-bot.rb
@@ -795,7 +795,7 @@ def test_ci_upload(tap) tag = pr ? "pr-#{pr}" : "testing-#{number}" safe_system "git", "push", "--force", remote, "master:master", ":refs/tags/#{tag}" - bintray_repo = if tap + bintray_repo = if tap.nil? Bintray.repository(tap) else Bintray.repository(tap.name)
false
Other
Homebrew
brew
9e2c0601e3d0c3f1eca3763c2f24d15e562ed0be.json
test-bot: fix bottle uploading
Library/Homebrew/cmd/test-bot.rb
@@ -795,7 +795,11 @@ def test_ci_upload(tap) tag = pr ? "pr-#{pr}" : "testing-#{number}" safe_system "git", "push", "--force", remote, "master:master", ":refs/tags/#{tag}" - bintray_repo = Bintray.repository(tap.name) + bintray_repo = if tap + Bintray.repository(tap) + else + Bintray.repository(tap.name) + end bintray_repo_url = "https://api.bintray.com/packages/homebrew/#{bintray_repo}" formula_packaged = {}
false
Other
Homebrew
brew
70d31838c61b0aaeb76827b26cb461069c9dff8c.json
test-bot: use tap object
Library/Homebrew/cmd/test-bot.rb
@@ -37,10 +37,30 @@ module Homebrew EMAIL_SUBJECT_FILE = "brew-test-bot.#{MacOS.cat}.email.txt" BYTES_IN_1_MEGABYTE = 1024*1024 + def resolve_test_tap + tap = ARGV.value("tap") + return Tap.new(*tap_args(tap)) if tap + + if ENV["UPSTREAM_BOT_PARAMS"] + bot_argv = ENV["UPSTREAM_BOT_PARAMS"].split " " + bot_argv.extend HomebrewArgvExtension + tap = bot_argv.value("tap") + return Tap.new(*tap_args(tap)) if tap + end + + if git_url = ENV["UPSTREAM_GIT_URL"] || ENV["GIT_URL"] + # Also can get tap from Jenkins GIT_URL. + url_path = git_url.sub(%r{^https?://github\.com/}, "").chomp("/") + HOMEBREW_TAP_ARGS_REGEX =~ url_path + return Tap.new($1, $3) if $1 && $3 && $3 != "homebrew" + end + + # return nil means we are testing core repo. + end + def homebrew_git_repo(tap = nil) if tap - user, repo = tap.split "/" - HOMEBREW_LIBRARY/"Taps/#{user}/homebrew-#{repo}" + tap.path else HOMEBREW_REPOSITORY end @@ -586,7 +606,7 @@ def homebrew return if @skip_homebrew test "brew", "tests" if @tap - test "brew", "readall", @tap + test "brew", "readall", @tap.name else test "brew", "tests", "--no-compat" readall_args = ["--aliases"] @@ -681,11 +701,11 @@ def formulae end def head_only_tap?(formula) - formula.head && formula.devel.nil? && formula.stable.nil? && formula.tap == "homebrew/homebrew-head-only" + formula.head && formula.devel.nil? && formula.stable.nil? && formula.tap.name == "homebrew/head-only" end def devel_only_tap?(formula) - formula.devel && formula.stable.nil? && formula.tap == "homebrew/homebrew-devel-only" + formula.devel && formula.stable.nil? && formula.tap.name == "homebrew/devel-only" end def run @@ -716,23 +736,8 @@ def test_bot_ci_reset_and_update end def test_bot - tap = ARGV.value("tap") - - if !tap && ENV["UPSTREAM_BOT_PARAMS"] - bot_argv = ENV["UPSTREAM_BOT_PARAMS"].split " " - bot_argv.extend HomebrewArgvExtension - tap ||= bot_argv.value("tap") - end - - tap.gsub!(/homebrew\/homebrew-/i, "Homebrew/") if tap - - git_url = ENV["UPSTREAM_GIT_URL"] || ENV["GIT_URL"] - if !tap && git_url - # Also can get tap from Jenkins GIT_URL. - url_path = git_url.gsub(%r{^https?://github\.com/}, "").gsub(%r{/$}, "") - HOMEBREW_TAP_ARGS_REGEX =~ url_path - tap = "#{$1}/#{$3}" if $1 && $3 - end + tap = resolve_test_tap + repository = Homebrew.homebrew_git_repo tap if Pathname.pwd == HOMEBREW_PREFIX && ARGV.include?("--cleanup") odie "cannot use --cleanup from HOMEBREW_PREFIX as it will delete all output." @@ -768,12 +773,10 @@ def test_bot test_bot_ci_reset_and_update if ARGV.include? "--ci-reset-and-update" - repository = Homebrew.homebrew_git_repo tap - # Tap repository if required, this is done before everything else # because Formula parsing and/or git commit hash lookup depends on it. - if tap && !repository.directory? - safe_system "brew", "tap", tap + if tap && !tap.installed? + safe_system "brew", "tap", tap.name end if ARGV.include? "--ci-upload" @@ -817,8 +820,7 @@ def test_bot if pr pull_pr = if tap - user, repo = tap.split "/" - "https://github.com/#{user}/homebrew-#{repo}/pull/#{pr}" + "https://github.com/#{tap.user}/homebrew-#{tap.repo}/pull/#{pr}" else pr end @@ -832,13 +834,12 @@ def test_bot bottle_args << "--keep-old" if ARGV.include? "--keep-old" safe_system "brew", "bottle", *bottle_args - remote_repo = tap ? tap.tr("/", "-") : "homebrew" - + remote_repo = tap ? "homebrew-#{tap.repo}" : "homebrew" remote = "git@github.com:BrewTestBot/#{remote_repo}.git" tag = pr ? "pr-#{pr}" : "testing-#{number}" safe_system "git", "push", "--force", remote, "master:master", ":refs/tags/#{tag}" - bintray_repo = Bintray.repository(tap) + bintray_repo = Bintray.repository(tap.name) bintray_repo_url = "https://api.bintray.com/packages/homebrew/#{bintray_repo}" formula_packaged = {}
false
Other
Homebrew
brew
fab6b6c19d3be7a2ded5b7aa050064c5d66c5340.json
test-bot: fix syntax error.
Library/Homebrew/cmd/test-bot.rb
@@ -284,7 +284,7 @@ def brew_update elsif ENV["TRAVIS_COMMIT_RANGE"] diff_start_sha1, diff_end_sha1 = ENV["TRAVIS_COMMIT_RANGE"].split "..." diff_end_sha1 = ENV["TRAVIS_COMMIT"] if travis_pr - elseif ENV["ghprbPullLink"] + elsif ENV["ghprbPullLink"] # Handle Jenkins pull request builder plugin. @url = ENV["ghprbPullLink"] @hash = nil
false
Other
Homebrew
brew
49241473ec016fe0679e8cf84c90f5f9ef6f7227.json
Add Travis CI configuration. Closes Homebrew/homebrew#43976. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
.gitignore
@@ -1,5 +1,6 @@ /* !/.gitignore +!/.travis.yml !/.yardopts !/Library/ !/CODEOFCONDUCT.md
true
Other
Homebrew
brew
49241473ec016fe0679e8cf84c90f5f9ef6f7227.json
Add Travis CI configuration. Closes Homebrew/homebrew#43976. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
.travis.yml
@@ -0,0 +1,23 @@ +# Force OS X. +language: objective-c +os: osx +env: OSX=10.10 +osx_image: xcode7 +rvm: + - system +matrix: + include: + - env: OSX=10.9 + osx_image: beta-xcode6.2 + rvm: system + +before_install: + - sudo rsync -az "$TRAVIS_BUILD_DIR/" /usr/local/ + - export TRAVIS_BUILD_DIR="/usr/local" + - cd /usr/local + - if [ -f ".git/shallow" ]; then git fetch --unshallow; fi + - git reset --hard $TRAVIS_COMMIT + - git clean -qxdff + +script: + - brew test-bot
true
Other
Homebrew
brew
e39cd2e9b2581924596998d918f6e19fedd74328.json
test-bot: use Travis CI environment variables.
Library/Homebrew/cmd/test-bot.rb
@@ -17,6 +17,7 @@ # --tap=<tap>: Use the git repository of the given tap # --dry-run: Just print commands, don't run them. # --fail-fast: Immediately exit on a failing step. +# --verbose: Print out all logs in realtime # # --ci-master: Shortcut for Homebrew master branch CI options. # --ci-pr: Shortcut for Homebrew pull request CI options. @@ -91,33 +92,57 @@ def failed? def puts_command cmd = @command.join(" ") - print "#{Tty.blue}==>#{Tty.white} #{cmd}#{Tty.reset}" + cmd_line = "#{Tty.blue}==>#{Tty.white} #{cmd}#{Tty.reset}" + if ENV["TRAVIS"] + @travis_timer_id = rand(2**32).to_s(16) + puts "travis_fold:start:#{@command.join(".")}" + puts "travis_time:start:#{@travis_timer_id}" + puts cmd_line + return + end + print cmd_line tabs = (80 - "PASSED".length + 1 - cmd.length) / 8 tabs.times { print "\t" } $stdout.flush end def puts_result + if ENV["TRAVIS"] + cmd = @command.join(" ") + puts "#{Tty.send status_colour}==> #{cmd}: #{status_upcase}#{Tty.reset}" + travis_start_time = @start_time.to_i*1000000000 + travis_end_time = @end_time.to_i*1000000000 + travis_duration = travis_end_time - travis_start_time + puts "travis_fold:end:#{@command.join(".")}" + puts "travis_time:end:#{@travis_timer_id},start=#{travis_start_time},finish=#{travis_end_time},duration=#{travis_duration}" + return + end puts " #{Tty.send status_colour}#{status_upcase}#{Tty.reset}" end def has_output? @output && !@output.empty? end + def time + @end_time - @start_time + end + def run + @start_time = Time.now + puts_command if ARGV.include? "--dry-run" - puts + @end_time = Time.now @status = :passed + puts_result return end verbose = ARGV.verbose? - puts if verbose + puts if verbose && !ENV["TRAVIS"] @output = "" working_dir = Pathname.new(@command.first == "git" ? @repository : Dir.pwd) - start_time = Time.now read, write = IO.pipe begin @@ -138,7 +163,7 @@ def run end Process.wait(pid) - @time = Time.now - start_time + @end_time = Time.now @status = $?.success? ? :passed : :failed puts_result @@ -269,12 +294,17 @@ def brew_update @category = __method__ @start_branch = current_branch + travis_pr = ENV["TRAVIS_PULL_REQUEST"] && ENV["TRAVIS_PULL_REQUEST"] != "false" + # Use Jenkins environment variables if present. if no_args? && ENV["GIT_PREVIOUS_COMMIT"] && ENV["GIT_COMMIT"] \ && !ENV["ghprbPullLink"] diff_start_sha1 = shorten_revision ENV["GIT_PREVIOUS_COMMIT"] diff_end_sha1 = shorten_revision ENV["GIT_COMMIT"] brew_update + elsif ENV["TRAVIS_COMMIT_RANGE"] + diff_start_sha1, diff_end_sha1 = ENV["TRAVIS_COMMIT_RANGE"].split "..." + diff_end_sha1 = ENV["TRAVIS_COMMIT"] if travis_pr elsif @hash diff_start_sha1 = current_sha1 brew_update @@ -287,6 +317,9 @@ def brew_update if ENV["ghprbPullLink"] @url = ENV["ghprbPullLink"] @hash = nil + elsif travis_pr + @url = "https://github.com/#{ENV["TRAVIS_REPO_SLUG"]}/pull/#{ENV["TRAVIS_PULL_REQUEST"]}" + @hash = nil end if no_args? @@ -301,6 +334,9 @@ def brew_update diff_start_sha1 = "#{@hash}^" diff_end_sha1 = @hash @name = @hash + elsif ENV["TRAVIS_PULL_REQUEST"] && ENV["TRAVIS_PULL_REQUEST"] != "false" + @short_url = @url.gsub("https://github.com/", "") + @name = "#{@short_url}-#{diff_end_sha1}" elsif @url diff_start_sha1 = current_sha1 test "git", "checkout", diff_start_sha1 @@ -323,7 +359,7 @@ def brew_update FileUtils.mkdir_p @log_root return unless diff_start_sha1 != diff_end_sha1 - return if @url && !steps.last.passed? + return if @url && steps.last && !steps.last.passed? if @tap formula_path = %w[Formula HomebrewFormula].find { |dir| (@repository/dir).directory? } || "" @@ -369,7 +405,7 @@ def satisfied_requirements?(formula, spec, dependency = nil) def setup @category = __method__ return if ARGV.include? "--skip-setup" - test "brew", "doctor" + test "brew", "doctor" unless ENV["TRAVIS"] test "brew", "--env" test "brew", "config" end @@ -610,7 +646,8 @@ def cleanup_after checkout_args << @start_branch - if ARGV.include?("--cleanup") || @url || @hash + if @start_branch && !@start_branch.empty? && \ + (ARGV.include?("--cleanup") || @url || @hash) test "git", "checkout", *checkout_args end @@ -723,9 +760,11 @@ def test_bot ENV["HOMEBREW_DEVELOPER"] = "1" ENV["HOMEBREW_SANDBOX"] = "1" ENV["HOMEBREW_NO_EMOJI"] = "1" + ARGV << "--verbose" if ENV["TRAVIS"] + if ARGV.include?("--ci-master") || ARGV.include?("--ci-pr") \ || ARGV.include?("--ci-testing") - ARGV << "--cleanup" if ENV["JENKINS_HOME"] || ENV["TRAVIS_COMMIT"] + ARGV << "--cleanup" if ENV["JENKINS_HOME"] || ENV["TRAVIS"] ARGV << "--junit" << "--local" end if ARGV.include? "--ci-master" @@ -933,15 +972,19 @@ def test_bot end end - if ARGV.include? "--email" - failed_steps = [] - tests.each do |test| - test.steps.each do |step| - next if step.passed? - failed_steps << step.command_short - end + failed_steps = [] + tests.each do |test| + test.steps.each do |step| + next if step.passed? + failed_steps << step.command_short end + end + if ENV["TRAVIS"] && !failed_steps.empty? + puts "#{Tty.red}==> #{cmd}: FAILED: #{MacOS.version}: #{failed_steps.join ", "}#{Tty.reset}" + end + + if ARGV.include? "--email" if failed_steps.empty? email_subject = "" else
false
Other
Homebrew
brew
d6a50f1e7617b40be12b7878bbcbade634c8ef86.json
deps: remove duplicated entires Fixes Homebrew/homebrew#43955 Closes Homebrew/homebrew#43966. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/deps.rb
@@ -25,7 +25,8 @@ def deps else all_deps = deps_for_formulae(ARGV.formulae, !ARGV.one?, &(mode.union? ? :| : :&)) all_deps = all_deps.select(&:installed?) if mode.installed? - all_deps = all_deps.sort_by(&:name) unless mode.topo_order? + all_deps = all_deps.map(&:name).uniq + all_deps.sort! unless mode.topo_order? puts all_deps end end
false
Other
Homebrew
brew
8a30f315d93d75383e35af6743a1c07580d6a428.json
search: use full name to filter aliases result
Library/Homebrew/cmd/search.rb
@@ -139,12 +139,13 @@ def search_tap(user, repo, rx) def search_formulae(rx) 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| - canonical_name = Formulary.canonical_name(name) + formula = Formulary.factory(name) + canonical_name = formula.name + canonical_full_name = formula.full_name # Ignore aliases from results when the full name was also found - if aliases.include?(name) && result_names.include?(canonical_name) + if aliases.include?(name) && results.include?(canonical_full_name) next elsif (HOMEBREW_CELLAR/canonical_name).directory? "#{name} (installed)"
false