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
c44cb2710ba94e2caaae5de480a895ed2aab490e.json
tests: replace tests script with rake-based runner Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/tests
@@ -1,24 +0,0 @@ -#!/bin/bash -# This shell script runs Homebrew's test suite. - -cd `dirname $0` - -EXIT=0 -/usr/bin/ruby test_bucket.rb $* || EXIT=1 -/usr/bin/ruby test_formula.rb $* || EXIT=1 -/usr/bin/ruby test_versions.rb $* || EXIT=1 -/usr/bin/ruby test_checksums.rb $* || EXIT=1 -/usr/bin/ruby test_compilers.rb $...
true
Other
Homebrew
brew
1d0be89fa5bbe9aa07fcacad0c369437553129fc.json
tests: reorganize compiler selection tests Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/test_compilers.rb
@@ -0,0 +1,143 @@ +require 'testing_env' + +require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser +ARGV.extend(HomebrewArgvExtension) + +require 'extend/ENV' +ENV.extend(HomebrewEnvExtension) + +require 'test/testball' + +module CompilerTestsEnvExtension + def unset_use_cc + vars ...
true
Other
Homebrew
brew
1d0be89fa5bbe9aa07fcacad0c369437553129fc.json
tests: reorganize compiler selection tests Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/test_formula.rb
@@ -8,8 +8,6 @@ require 'test/testball' -require 'hardware' - class AbstractDownloadStrategy attr_reader :url end @@ -68,74 +66,4 @@ def test_mirror_support assert_equal downloader.url, "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz" end end - - def test_compiler_selection - %W{HOMEBREW_...
true
Other
Homebrew
brew
1d0be89fa5bbe9aa07fcacad0c369437553129fc.json
tests: reorganize compiler selection tests Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/tests
@@ -8,6 +8,7 @@ EXIT=0 /usr/bin/ruby test_formula.rb $* || EXIT=1 /usr/bin/ruby test_versions.rb $* || EXIT=1 /usr/bin/ruby test_checksums.rb $* || EXIT=1 +/usr/bin/ruby test_compilers.rb $* || EXIT=1 /usr/bin/ruby test_inreplace.rb $* || EXIT=1 /usr/bin/ruby test_hardware.rb $* || EXIT=1 /usr/bin/ruby test_formu...
true
Other
Homebrew
brew
d4f757718505b080ef3bd60fbf9ab7a751453e9a.json
Add ofail command to print error and exit.
Library/Homebrew/utils.rb
@@ -53,6 +53,10 @@ def onoe error puts lines unless lines.empty? end +def ofail error + onoe error + exit 1 +end def pretty_duration s return "2 seconds" if s < 3 # avoids the plural problem ;)
false
Other
Homebrew
brew
4dc1a7bdce4d2b311c2ca2507ecdd5654a813f2b.json
brew doctor: add check for outdated compilers A common source of build problems on Xcode 4.3+ is outdated compilers, usually when a user has installed over top of an old version and hasn't installed the CLT. Since the compilers from the previous Xcode are still around, brew doctor wouldn't complain. This adds a hash ...
Library/Homebrew/cmd/doctor.rb
@@ -232,6 +232,17 @@ def check_cc end end +def check_standard_compilers + return if check_for_latest_xcode # only check if Xcode is up to date + if !MacOS.compilers_standard? then <<-EOS.undent + Your compilers are different from the standard versions for your Xcode. + If you have Xcode 4.3 or newer, you ...
true
Other
Homebrew
brew
4dc1a7bdce4d2b311c2ca2507ecdd5654a813f2b.json
brew doctor: add check for outdated compilers A common source of build problems on Xcode 4.3+ is outdated compilers, usually when a user has installed over top of an old version and hasn't installed the CLT. Since the compilers from the previous Xcode are still around, brew doctor wouldn't complain. This adds a hash ...
Library/Homebrew/utils.rb
@@ -521,6 +521,25 @@ def mountain_lion? def prefer_64_bit? Hardware.is_64_bit? and not leopard? end + + StandardCompilers = { + "3.1.4" => {:gcc_40_build_version=>5493, :gcc_42_build_version=>5577, :llvm_build_version=>2064}, + "3.2.6" => {:gcc_40_build_version=>5494, :gcc_42_build_version=>5666, :llv...
true
Other
Homebrew
brew
9614301be4f2647de6a0395b125c3a2ca69e3889.json
Fix protection against overriding Formula#brew The test for this previously passed, but only because the constructor for SoftwareSpecification was raising an exception. method_added needs to be a class method because methods are being defined on the class, not the object, and to test it properly we have to eval the cl...
Library/Homebrew/formula.rb
@@ -551,8 +551,8 @@ def set_instance_variable(type) instance_variable_set("@#{type}", class_value) if class_value end - def method_added method - raise 'You cannot override Formula.brew' if method == 'brew' + def self.method_added method + raise 'You cannot override Formula.brew' if method == :brew ...
true
Other
Homebrew
brew
9614301be4f2647de6a0395b125c3a2ca69e3889.json
Fix protection against overriding Formula#brew The test for this previously passed, but only because the constructor for SoftwareSpecification was raising an exception. method_added needs to be a class method because methods are being defined on the class, not the object, and to test it properly we have to eval the cl...
Library/Homebrew/test/test_formula.rb
@@ -19,15 +19,6 @@ class MostlyAbstractFormula <Formula @homepage = 'http://example.com/' end -class TestBallOverrideBrew <Formula - def initialize - super "foo" - end - def brew - end -end - - class FormulaTests < Test::Unit::TestCase def test_prefix @@ -48,7 +39,17 @@ def test_class_naming end ...
true
Other
Homebrew
brew
04bf4e5f8977e4e7792f39da87cdf2e67f8ca03c.json
brew-pull: add support for pulling from taps
Library/Contributions/cmds/brew-pull.rb
@@ -3,18 +3,21 @@ require 'utils' +def tap arg + match = arg.match(%r[homebrew-(\w+)/]) + match[1] if match +end + if ARGV.empty? onoe 'This command requires at least one argument containing a URL or pull request number' end -Dir.chdir HOMEBREW_REPOSITORY - ARGV.named.each do|arg| if arg.to_i > 0 ...
false
Other
Homebrew
brew
d3ba9723b244fc52b0b20b1cffa88d71700e6b92.json
Add test for ghc version style the ghc formula had an explicit version because we had trouble parsing the version from the 64-bit URL. It is working now, so add a test to ensure it isn't broken in the future. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/test_versions.rb
@@ -193,6 +193,11 @@ def test_dash_version_dash_style check 'http://www.antlr.org/download/antlr-3.4-complete.jar', '3.4' end + def check_ghc_style + check 'http://www.haskell.org/ghc/dist/7.0.4/ghc-7.0.4-x86_64-apple-darwin.tar.bz2', '7.0.4' + check 'http://www.haskell.org/ghc/dist/7.0.4/ghc-7.0.4-i38...
false
Other
Homebrew
brew
5d3c65f68e7bead1e3e758a1a81644c00935d1c4.json
Use GitHub API 3 in `brew search`
Library/Homebrew/cmd/search.rb
@@ -50,12 +50,12 @@ def search_tap user, repo, rx return [] if (HOMEBREW_LIBRARY/"Taps/#{user.downcase}-#{repo.downcase}").directory? require 'open-uri' - require 'yaml' + require 'vendor/multi_json' results = [] - open "http://github.com/api/v2/yaml/blob/all/#{user}/homebrew-#{repo}/master"...
false
Other
Homebrew
brew
7ffa831718b1377a9faea623ed185bae54248106.json
patches.rb: Fix warning thrown by Ruby 1.8.6 Need to be consistent with use of parenthesis in functions.
Library/Homebrew/patches.rb
@@ -91,7 +91,7 @@ def curl_args # Write the given file object (DATA) out to a local file for patch def write_data f pn = Pathname.new @patch_filename - pn.write(brew_var_substitution f.read.to_s) + pn.write(brew_var_substitution(f.read.to_s)) end # Do any supported substitutions of HOMEBREW var...
false
Other
Homebrew
brew
62a98753ec9cce23653b18e95b8debafd877856d.json
Populate empty mirror_list for bottles. Fixes Homebrew/homebrew#11434.
Library/Homebrew/formula.rb
@@ -443,6 +443,7 @@ def system cmd, *args def fetch if install_bottle? self downloader = CurlBottleDownloadStrategy.new bottle_url, name, version, nil + mirror_list = [] else downloader = @downloader # Don't attempt mirrors if this install is not pointed at a "stable" URL.
false
Other
Homebrew
brew
6010763159e2005069328b864ae6daf55b3cb288.json
Use current bottle versions to calculate new ones.
Library/Homebrew/bottles.rb
@@ -26,7 +26,7 @@ def bottle_current? f end def bottle_new_version f - return 0 unless f.bottle_version + return 0 unless bottle_current? f f.bottle_version + 1 end
false
Other
Homebrew
brew
bb8fcc89014de64d5faf7e8ac9a252144addb508.json
Reset compiler when testing fails_with Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/test_formula.rb
@@ -77,6 +77,7 @@ def test_compiler_selection cs = CompilerSelector.new(f) cs.select_compiler assert_equal MacOS.default_compiler, ENV.compiler + ENV.send MacOS.default_compiler f = TestNoCompilerFailures.new assert !(f.fails_with? :clang) @@ -85,6 +86,7 @@ def test_compiler_selection ...
false
Other
Homebrew
brew
bfbfdf03eb2bcbb73082af0325f85761ea87719e.json
Show target path when empty
Library/Homebrew/extend/pathname.rb
@@ -9,13 +9,13 @@ def install *sources case src when Array if src.empty? - opoo "install was passed an empty array" + opoo "tried to install empty array to #{self}" return [] end src.each {|s| results << install_p(s) } when Hash if sr...
false
Other
Homebrew
brew
0aea8d39e6a175a1cf6f81526928a2f4353cdc9a.json
Fix typo in --config.rb Closes Homebrew/homebrew#11183. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/--config.rb
@@ -97,7 +97,7 @@ def dump_build_config puts "/usr/bin/ruby => #{ruby.realpath}" unless ruby.realpath.to_s =~ %r{^/System} ponk = macports_or_fink_installed? - puts "MacPorts/Fink: #{ponk?}" if ponk + puts "MacPorts/Fink: #{ponk}" if ponk x11 = describe_x11 puts "X11: #{x11}" unless x11 ==...
false
Other
Homebrew
brew
1bc631369494433714c5174dcd51511078377980.json
Pass the tab to FormulaInstaller Callers of FormulaInstaller now usually unlink the existing keg prior to running the installer. However, Tab.for_formula uses the LinkedKeg record to obtain the tab. Since we need the tab to persist install options across upgrades, we must start creating the Tab object before unlinkin...
Library/Homebrew/cmd/upgrade.rb
@@ -49,9 +49,10 @@ def upgrade end def upgrade_formula f + tab = Tab.for_formula(f) outdated_keg = Keg.new(f.linked_keg.realpath) rescue nil - installer = FormulaInstaller.new f + installer = FormulaInstaller.new(f, tab) installer.show_header = false oh1 "Upgrading #{f.name}"
true
Other
Homebrew
brew
1bc631369494433714c5174dcd51511078377980.json
Pass the tab to FormulaInstaller Callers of FormulaInstaller now usually unlink the existing keg prior to running the installer. However, Tab.for_formula uses the LinkedKeg record to obtain the tab. Since we need the tab to persist install options across upgrades, we must start creating the Tab object before unlinkin...
Library/Homebrew/formula_installer.rb
@@ -7,13 +7,15 @@ class FormulaInstaller attr :f + attr :tab attr :show_summary_heading, true attr :ignore_deps, true attr :install_bottle, true attr :show_header, true - def initialize ff + def initialize ff, tab=nil @f = ff + @tab = tab @show_header = true @ignore_deps = ARGV....
true
Other
Homebrew
brew
10f8443f8ae9f008c2bc45b0e80bcbb2f6419806.json
Use --verify when querying HEAD Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/update.rb
@@ -97,7 +97,7 @@ def report private def read_current_revision - `git rev-parse HEAD`.chomp + `git rev-parse -q --verify HEAD`.chomp end def `(cmd)
false
Other
Homebrew
brew
5dc15272d9fa925bd801e4b54b8fe91040ae2b21.json
ENV: reset LD when switching compilers Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/extend/ENV.rb
@@ -87,7 +87,8 @@ def O1 def gcc_4_0_1 # we don't use xcrun because gcc 4.0 has not been provided since Xcode 4 - self['CC'] = "#{MacOS.dev_tools_path}/gcc-4.0" + self['CC'] = "#{MacOS.dev_tools_path}/gcc-4.0" + self['LD'] = self['CC'] self['CXX'] = "#{MacOS.dev_tools_path}/g++-4.0" self['...
true
Other
Homebrew
brew
5dc15272d9fa925bd801e4b54b8fe91040ae2b21.json
ENV: reset LD when switching compilers Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/test_ENV.rb
@@ -25,4 +25,11 @@ def test_ENV_options assert !ENV.cc.empty? assert !ENV.cxx.empty? end + + def test_switching_compilers + ENV.llvm + ENV.clang + assert_equal ENV['LD'], ENV['CC'] + assert_equal ENV['OBJC'], ENV['CC'] + end end
true
Other
Homebrew
brew
01c14f877574ab451e499fa5986f3cfebe957b3d.json
ENV: normalize usage of "self" and "ENV" Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/extend/ENV.rb
@@ -10,7 +10,7 @@ def setup_build_environment remove_cc_etc # make any aclocal stuff installed in Homebrew available - ENV['ACLOCAL_PATH'] = "#{HOMEBREW_PREFIX}/share/aclocal" if MacOS.xcode_version < "4.3" + self['ACLOCAL_PATH'] = "#{HOMEBREW_PREFIX}/share/aclocal" if MacOS.xcode_version < "4.3" ...
false
Other
Homebrew
brew
6eced20b351a4dab4a1cbf75fe7a9d1975602512.json
Fix Dependency equality
Library/Homebrew/dependencies.rb
@@ -71,7 +71,7 @@ def to_s end def ==(other_dep) - @name = other_dep.to_s + @name == other_dep.to_s end def options
false
Other
Homebrew
brew
54f1837d237b2c1b09d96815bd8a990ac1c951e5.json
Generate unique patch filenames Closes Homebrew/homebrew#11098. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Library/Homebrew/patches.rb
@@ -3,13 +3,14 @@ class Patches def initialize patches @patches = [] return if patches.nil? - + n = 0 normalize_patches(patches).each do |patch_p, urls| # Wrap the urls list in an array if it isn't already; # DATA.each does each line, which doesn't work so great urls = [urls] u...
false
Other
Homebrew
brew
975459a75cc371d97ec381ed3ffa2aa2733d9f1f.json
Add tests for patches.rb
Library/Homebrew/test/test_patches.rb
@@ -0,0 +1,93 @@ +require 'testing_env' + +require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser +ARGV.extend(HomebrewArgvExtension) + +require 'test/testball' +require 'utils' +require 'set' + +# Expose some internals +class Patches + attr_reader :patches +end + +class Patch + attr...
false
Other
Homebrew
brew
bc7469c819e18afa07f4c719d895e3c3c80f8c3f.json
Fix inappropriate linking of info files share/info files were always being linked if they existed, regardless of whether the user had HOMEBREW_KEEP_INFO set. This primarily affects users with software built before 9610ff2e9e06931693f49d4377ee26c0e664c547. This also fixes a bug in Keg#link_dir, in which a file would a...
Library/Homebrew/keg.rb
@@ -75,7 +75,7 @@ def link link_dir('share') do |path| case path.to_s when 'locale/locale.alias' then :skip_file - when INFOFILE_RX then :info if ENV['HOMEBREW_KEEP_INFO'] + when INFOFILE_RX then ENV['HOMEBREW_KEEP_INFO'] ? :info : :skip_file when LOCALEDIR_RX then :mkpath whe...
false
Other
Homebrew
brew
ed83fa609b4c6c1ebe29d157ce564e1f85fa627a.json
Remove broken `puts` from verbose `brew link` The print wrapper which has its own `puts` broke this line; though with the changes to `link` it isn't necessary any longer, so just remove it. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/link.rb
@@ -16,7 +16,6 @@ def link end print "Linking #{keg}... " do - puts if ARGV.verbose? puts "#{keg.link} symlinks created" end end
false
Other
Homebrew
brew
9c28138889055f8a3af5e32bab4059b6a9a8a87f.json
audit: add tests for patches
Library/Homebrew/cmd/audit.rb
@@ -1,5 +1,17 @@ require 'formula' require 'utils' +require 'extend/ENV' + +# Some formulae use ENV in patches, so set up an environment +ENV.extend(HomebrewEnvExtension) +ENV.setup_build_environment + +class Module + def redefine_const(name, value) + __send__(:remove_const, name) if const_defined?(name) + con...
false
Other
Homebrew
brew
f6052e8cc44e885f4a8b31d77d1c579169779ac6.json
Add Patches class
Library/Homebrew/patches.rb
@@ -0,0 +1,103 @@ +class Patches + # The patches defined in a formula and the DATA from that file + def initialize patches + @patches = [] + return if patches.nil? + + normalize_patches(patches).each do |patch_p, urls| + # Wrap the urls list in an array if it isn't already; + # DATA.each does each ...
false
Other
Homebrew
brew
46a9c9b6a09a67d8ebfc0fd07fc942a627f135a0.json
Tell the user to run doctor after installing
Library/Contributions/install_homebrew.rb
@@ -132,4 +132,5 @@ def macos_version end ohai "Installation successful!" +puts "You should run `brew doctor' *before* you install anything." puts "Now type: brew help"
false
Other
Homebrew
brew
85452c5e910abf3280614248923c3bdbe2095a6e.json
Fix bottles on non-Lion.
Library/Homebrew/bottles.rb
@@ -10,22 +10,15 @@ def bottles_supported? end def install_bottle? f - !ARGV.build_from_source? && bottle_current?(f) && bottle_native?(f) -end - -def bottle_native? f - return true if bottle_native_regex.match(f.bottle_url) - # old brew bottle style - return true if MacOS.lion? && old_bottle_regex.match(f.bott...
true
Other
Homebrew
brew
85452c5e910abf3280614248923c3bdbe2095a6e.json
Fix bottles on non-Lion.
Library/Homebrew/formula.rb
@@ -664,7 +664,7 @@ def self.sha1 sha1 key, value = sha1.shift @sha1 = key if value == MacOS.cat when String - @sha1 = sha1 + @sha1 = sha1 if MacOS.lion? end end
true
Other
Homebrew
brew
64457b2315088fa8396801d04872b4da443d8961.json
Remove reliance of bottle DSL on EOCLASS.
Library/Homebrew/bottles.rb
@@ -46,4 +46,8 @@ def bottle_regex def old_bottle_regex /(-bottle\.tar\.gz)$/ -end \ No newline at end of file +end + +def bottle_base_url + "https://downloads.sf.net/project/machomebrew/Bottles/" +end
true
Other
Homebrew
brew
64457b2315088fa8396801d04872b4da443d8961.json
Remove reliance of bottle DSL on EOCLASS.
Library/Homebrew/cmd/bottle.rb
@@ -17,7 +17,7 @@ def bottle_formula f safe_system 'tar', 'czf', directory/filename, "#{f.name}/#{f.version}" puts "./#{filename}" puts "bottle do" - puts " url 'https://downloads.sf.net/project/machomebrew/Bottles/#{filename}'" + puts " url '#{bottle_base_url}#{filename}'" puts ...
true
Other
Homebrew
brew
64457b2315088fa8396801d04872b4da443d8961.json
Remove reliance of bottle DSL on EOCLASS.
Library/Homebrew/formula.rb
@@ -651,32 +651,35 @@ def devel &block end def bottle url=nil, &block - if block_given? - eval <<-EOCLASS - module BottleData - def self.url url; @url = url; end - def self.sha1 sha1 - case sha1 - when Hash - key, value = sha1.shift - ...
true
Other
Homebrew
brew
aa91bd27d20a34ca5337639c7e97d7a38e048bd7.json
Implement new bottle syntax in formula.rb Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/formula.rb
@@ -655,12 +655,27 @@ def bottle url=nil, &block eval <<-EOCLASS module BottleData def self.url url; @url = url; end - def self.sha1 sha1; @sha1 = sha1; end - def self.return_data; [@url,@sha1]; end + def self.sha1 sha1 + case sha1 + when Has...
false
Other
Homebrew
brew
23b84ef73243e24444c6f16576097a3199243f2d.json
Set MACOS_VERSION as 0 on non-OSX platforms.
Library/Contributions/cmds/brew-man
@@ -24,7 +24,7 @@ test "$1" = '-l' && { exit 0 } -/usr/bin/which -s ronn || die "You need to \"gem install ronn\" and put it in your path." +/usr/bin/which ronn &>/dev/null || die "You need to \"gem install ronn\" and put it in your path." test "$1" = '--server' || \ test "$1" = '-s' && {
true
Other
Homebrew
brew
23b84ef73243e24444c6f16576097a3199243f2d.json
Set MACOS_VERSION as 0 on non-OSX platforms.
Library/Homebrew/cmd/doctor.rb
@@ -624,7 +624,7 @@ def check_for_multiple_volumes end def check_for_git - unless system "/usr/bin/which -s git" then <<-EOS.undent + unless which_s "git" then <<-EOS.undent Git could not be found in your PATH. Homebrew uses Git for several internal functions, and some formulae use Git checkouts in...
true
Other
Homebrew
brew
23b84ef73243e24444c6f16576097a3199243f2d.json
Set MACOS_VERSION as 0 on non-OSX platforms.
Library/Homebrew/cmd/update.rb
@@ -4,7 +4,7 @@ module Homebrew extend self def update - abort "Please `brew install git' first." unless system "/usr/bin/which -s git" + abort "Please `brew install git' first." unless which_s "git" # ensure GIT_CONFIG is unset as we need to operate on .git/config ENV.delete('GIT_CONFIG')
true
Other
Homebrew
brew
23b84ef73243e24444c6f16576097a3199243f2d.json
Set MACOS_VERSION as 0 on non-OSX platforms.
Library/Homebrew/cmd/versions.rb
@@ -2,7 +2,7 @@ module Homebrew extend self def versions - raise "Please `brew install git' first" unless system "/usr/bin/which -s git" + raise "Please `brew install git` first" unless which_s "git" raise "Please `brew update' first" unless (HOMEBREW_REPOSITORY/".git").directory? raise FormulaU...
true
Other
Homebrew
brew
23b84ef73243e24444c6f16576097a3199243f2d.json
Set MACOS_VERSION as 0 on non-OSX platforms.
Library/Homebrew/download_strategy.rb
@@ -90,7 +90,7 @@ def stage safe_system '/usr/bin/tar', 'xf', @tarball_path chdir when /^\xFD7zXZ\x00/ # xz compressed - raise "You must install XZutils: brew install xz" unless system "/usr/bin/which -s xz" + raise "You must install XZutils: brew install xz" unless which_s "xz" safe...
true
Other
Homebrew
brew
23b84ef73243e24444c6f16576097a3199243f2d.json
Set MACOS_VERSION as 0 on non-OSX platforms.
Library/Homebrew/global.rb
@@ -61,10 +61,18 @@ def mkpath HOMEBREW_LOGS = Pathname.new('~/Library/Logs/Homebrew/').expand_path -MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp -MACOS_VERSION = /(10\.\d+)(\.\d+)?/.match(MACOS_FULL_VERSION).captures.first.to_f +if RUBY_PLATFORM =~ /darwin/ + MACOS_FULL_VERSION = `/usr/bin/sw_ve...
true
Other
Homebrew
brew
23b84ef73243e24444c6f16576097a3199243f2d.json
Set MACOS_VERSION as 0 on non-OSX platforms.
Library/Homebrew/utils.rb
@@ -138,7 +138,8 @@ def puts_columns items, star_items=[] end end -def which cmd +def which cmd, silent=false + cmd += " 2>/dev/null" if silent path = `/usr/bin/which #{cmd}`.chomp if path.empty? nil @@ -147,15 +148,19 @@ def which cmd end end +def which_s cmd + which cmd, true +end + def whic...
true
Other
Homebrew
brew
23b84ef73243e24444c6f16576097a3199243f2d.json
Set MACOS_VERSION as 0 on non-OSX platforms.
bin/brew
@@ -31,7 +31,7 @@ case HOMEBREW_PREFIX.to_s when '/', '/usr' # it may work, but I only see pain this route and don't want to support it abort "Cowardly refusing to continue at this prefix: #{HOMEBREW_PREFIX}" end -if MACOS_VERSION < 10.5 +if MACOS and MACOS_VERSION < 10.5 abort <<-EOABORT.undent Homebrew...
true
Other
Homebrew
brew
d47cf55f68fb1d381cfbdc9de905dc33c7ce5a83.json
Use fetch for downloading bottles. Fixes Homebrew/homebrew#10958.
Library/Homebrew/cmd/fetch.rb
@@ -29,21 +29,23 @@ def fetch the_tarball, _ = f.fetch next unless the_tarball.kind_of? Pathname - previous_md5 = f.instance_variable_get(:@md5).to_s.downcase + bottle = install_bottle? f + + previous_md5 = f.instance_variable_get(:@md5).to_s.downcase unless bottle previous_sha1 = ...
true
Other
Homebrew
brew
d47cf55f68fb1d381cfbdc9de905dc33c7ce5a83.json
Use fetch for downloading bottles. Fixes Homebrew/homebrew#10958.
Library/Homebrew/formula.rb
@@ -443,10 +443,14 @@ def system cmd, *args # For brew-fetch and others. def fetch - downloader = @downloader - # Don't attempt mirrors if this install is not pointed at a "stable" URL. - # This can happen when options like `--HEAD` are invoked. - mirror_list = @spec_to_use == @standard ? mirrors :...
true
Other
Homebrew
brew
d47cf55f68fb1d381cfbdc9de905dc33c7ce5a83.json
Use fetch for downloading bottles. Fixes Homebrew/homebrew#10958.
Library/Homebrew/formula_installer.rb
@@ -253,10 +253,8 @@ def clean end def pour - HOMEBREW_CACHE.mkpath - downloader = CurlBottleDownloadStrategy.new f.bottle_url, f.name, f.version, nil - downloader.fetch - f.verify_download_integrity downloader.tarball_path, f.bottle_sha1, "SHA1" + fetched, downloader = f.fetch + f.verify_down...
true
Other
Homebrew
brew
c346ebd9481d4d798006ac830c208757f408220d.json
Add brew/versions and brew/dupes to search
Library/Homebrew/cmd/search.rb
@@ -31,6 +31,8 @@ def search $found = search_results.length puts_columns search_tap "adamv", "alt", rx puts_columns search_tap "josegonzalez", "php", rx + puts_columns search_tap "Homebrew", "versions", rx + puts_columns search_tap "Homebrew", "dupes", rx if $found == 0 and not b...
false
Other
Homebrew
brew
d388c4386335390d1c57dc1f9857bbf373781f18.json
Generalise the untap step so we can add to update brew-update needs to be able to unsymlink removed stuff from taps too.
Library/Homebrew/cmd/untap.rb
@@ -7,22 +7,31 @@ def untap raise "No such tap!" unless tapd.directory? - gitignores = (HOMEBREW_LIBRARY/"Formula/.gitignore").read.split rescue [] + files = [] + tapd.find_formula{ |file| files << Pathname.new("#{user}-#{repo}").join(file) } + untapped = unlink_tap_formula(files) + rm_rf tapd +...
false
Other
Homebrew
brew
21bddc7972c4c7936bc02ee45378600f180bdbaa.json
Make the tapping already there step actually work For when the symlink for a tap already exists and points to the thing we are about to symlink. This can happen, mostly because my code has sucked, but since the filesystem can be edited by the user at whim, it's possible then too.
Library/Homebrew/cmd/tap.rb
@@ -34,7 +34,7 @@ def link_tap_formula formulae to = HOMEBREW_LIBRARY.join("Formula/#{formula.basename}") # Unexpected, but possible, lets proceed as if nothing happened - formula.delete if to.symlink? and to.realpath == from + to.delete if to.symlink? and to.realpath == from ...
false
Other
Homebrew
brew
1cdd35b7e81e8bee41f6bf55d3ca228aa11659a1.json
doctor: check OS version We warn if you are not running the latest Leopard or Snow Leopard. (We do not currently check Lion or Mountain Lion versions.)
Library/Homebrew/cmd/doctor.rb
@@ -861,6 +861,26 @@ def check_for_unlinked_but_not_keg_only end end +def check_os_version + if MACOS_FULL_VERSION =~ /^10\.6(\.|$)/ + unless (MACOS_FULL_VERSION == "10.6.8") + return <<-EOS.undent + Please update Snow Leopard. + 10.6.8 is the supported version of Snow Leopard. + You...
false
Other
Homebrew
brew
fe9e2be8fe059d8dd67274f19fecc3fdca132054.json
Allow dashes in tap-formula names
Library/Homebrew/exceptions.rb
@@ -31,7 +31,7 @@ def dependent_s end def to_s - if name =~ %r{(\w+)/(\w+)/(\w+)} then <<-EOS.undent + if name =~ %r{(\w+)/(\w+)/([^/]+)} then <<-EOS.undent No available formula for #$3 #{dependent_s} Please tap it and then try again: brew tap #$1/#$2 EOS
false
Other
Homebrew
brew
ee0041f29021cd941493cd6d9464690b934b3b7b.json
Appease the masses Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Contributions/brew_bash_completion.sh
@@ -37,403 +37,405 @@ __brewcomp_words_include () { - local i=1 - while [[ $i -lt $COMP_CWORD ]]; do - if [[ "${COMP_WORDS[i]}" = "$1" ]]; then - return 0 - fi - i=$((++i)) - done - return 1 + local i=1 + while [[ $i -lt $COMP_CWORD ]]; do + if [[ "${COMP_WORDS[i]}" = "$1" ]]; then + re...
false
Other
Homebrew
brew
3d5b4af523dca55fe7fa49433eec2519254b060b.json
Tell the user to tap (if req.) for tapped deps Also propagate dependency info through exception if possible so the error message is more useful.
Library/Homebrew/exceptions.rb
@@ -24,10 +24,24 @@ def initialize name class FormulaUnavailableError < RuntimeError attr :name + attr :dependent, true + + def dependent_s + "(dependency of #{dependent})" if dependent and dependent != name + end + + def to_s + if name =~ %r{(\w+)/(\w+)/(\w+)} then <<-EOS.undent + No available for...
true
Other
Homebrew
brew
3d5b4af523dca55fe7fa49433eec2519254b060b.json
Tell the user to tap (if req.) for tapped deps Also propagate dependency info through exception if possible so the error message is more useful.
Library/Homebrew/formula_installer.rb
@@ -44,6 +44,12 @@ def check_install_sanity raise CannotInstallFormulaError, "You must `brew link #{dep}' before #{f} can be installed" end end unless ignore_deps + + rescue FormulaUnavailableError => e + # this is sometimes wrong if the dependency chain is more than one deep + # but can't e...
true
Other
Homebrew
brew
7280590e881635f4e47bb619043f5bfd1af05780.json
Link new tapped formula during brew update Required me to spoil tap's code. All in the name of DRY! Alas!
Library/Homebrew/cmd/tap.rb
@@ -21,21 +21,28 @@ def install_tap user, repo raise "Already tapped!" if tapd.directory? abort unless system "git clone https://github.com/#{user}/homebrew-#{repo} #{tapd}" - gitignores = (HOMEBREW_LIBRARY/"Formula/.gitignore").read.split rescue [] - - cd HOMEBREW_LIBRARY/"Formula" - tapd.find_for...
true
Other
Homebrew
brew
7280590e881635f4e47bb619043f5bfd1af05780.json
Link new tapped formula during brew update Required me to spoil tap's code. All in the name of DRY! Alas!
Library/Homebrew/cmd/update.rb
@@ -1,3 +1,5 @@ +require 'cmd/tap' + module Homebrew extend self def update @@ -14,6 +16,7 @@ def update master_updater.pull! report.merge!(master_updater.report) + new_files = [] Dir["Library/Taps/*"].each do |tapd| cd tapd do updater = Updater.new @@ -23,6 +26,7 @@ def update...
true
Other
Homebrew
brew
765ae9618050e415c039edabce02671581c1ffb1.json
Leave kegs keg-only if linking step fails Rationale: well, it should always have been like this! However now we are opening ourselves up to more-mixed installations of formula not maintained by us, it's important that
Library/Homebrew/cmd/link.rb
@@ -11,12 +11,7 @@ def link ARGV.kegs.each do |keg| print "Linking #{keg}... " puts if ARGV.verbose? - begin - puts "#{keg.link} symlinks created" - rescue Exception - puts - raise - end + puts "#{keg.link} symlinks created" end end end
true
Other
Homebrew
brew
765ae9618050e415c039edabce02671581c1ffb1.json
Leave kegs keg-only if linking step fails Rationale: well, it should always have been like this! However now we are opening ourselves up to more-mixed installations of formula not maintained by us, it's important that
Library/Homebrew/extend/pathname.rb
@@ -273,15 +273,10 @@ def make_relative_symlink src self.dirname.mkpath Dir.chdir self.dirname do - # TODO use Ruby function so we get exceptions - # NOTE Ruby functions may work, but I had a lot of problems - rv = system 'ln', '-sf', src.relative_path_from(self.dirname), self.basename - ...
true
Other
Homebrew
brew
765ae9618050e415c039edabce02671581c1ffb1.json
Leave kegs keg-only if linking step fails Rationale: well, it should always have been like this! However now we are opening ourselves up to more-mixed installations of formula not maintained by us, it's important that
Library/Homebrew/formula_installer.rb
@@ -214,11 +214,14 @@ def link f.linked_keg.unlink end - Keg.new(f.prefix).link + keg = Keg.new(f.prefix) + keg.link rescue Exception => e onoe "The linking step did not complete successfully" puts "The formula built, but is not symlinked into #{HOMEBREW_PREFIX}" puts "You can t...
true
Other
Homebrew
brew
b5de42bfefe1ed7b06a948a2f5df06ceafccbb47.json
Refer users to correct tracker for tapped brews
Library/Homebrew/exceptions.rb
@@ -87,8 +87,19 @@ def dump formula_name = $1 error_line = $2 + path = HOMEBREW_REPOSITORY/"Library/Formula/#{formula_name}.rb" + if path.symlink? and path.realpath.to_s =~ %r{^#{HOMEBREW_REPOSITORY}/Library/Taps/(\w+)-(\w+)/} + repo = "#$1/homebrew-#$2" + repo_path = path.realpath.relative_...
false
Other
Homebrew
brew
903b1167a67335f9ada69075e4cc12895d43f1cb.json
Prevent tapped symlinks showing up in git status The symlinks taps write to Formula show up in git status, but this trick prevents this. brew-(un)tap maintain a .gitignore in Formula that contains all the symlinks brew-tap creates. We add the .gitignore to the root .gitignore and TADA! Magic.
.gitignore
@@ -9,3 +9,4 @@ .DS_Store /Library/LinkedKegs /Library/Taps +/Library/Formula/.gitignore
true
Other
Homebrew
brew
903b1167a67335f9ada69075e4cc12895d43f1cb.json
Prevent tapped symlinks showing up in git status The symlinks taps write to Formula show up in git status, but this trick prevents this. brew-(un)tap maintain a .gitignore in Formula that contains all the symlinks brew-tap creates. We add the .gitignore to the root .gitignore and TADA! Magic.
Library/Homebrew/cmd/tap.rb
@@ -1,3 +1,5 @@ +require 'tempfile' + HOMEBREW_LIBRARY = HOMEBREW_REPOSITORY/"Library" module Homebrew extend self @@ -19,12 +21,23 @@ def install_tap user, repo raise "Already tapped!" if tapd.directory? abort unless system "git clone https://github.com/#{user}/homebrew-#{repo} #{tapd}" + gitignores...
true
Other
Homebrew
brew
903b1167a67335f9ada69075e4cc12895d43f1cb.json
Prevent tapped symlinks showing up in git status The symlinks taps write to Formula show up in git status, but this trick prevents this. brew-(un)tap maintain a .gitignore in Formula that contains all the symlinks brew-tap creates. We add the .gitignore to the root .gitignore and TADA! Magic.
Library/Homebrew/cmd/untap.rb
@@ -1,4 +1,5 @@ require 'cmd/tap' # for Pathname.recursive_formula +require 'tempfile' module Homebrew extend self def untap @@ -7,11 +8,19 @@ def untap raise "No such tap!" unless tapd.directory? + gitignores = (HOMEBREW_PREFIX/"Library/Formula/.gitignore").read.split rescue [] + tapd.find_form...
true
Other
Homebrew
brew
c28943de7b99b2298d60b0cbbbc0d5fa72a9777d.json
Tell user to `brew update' if no .git
Library/Homebrew/cmd/versions.rb
@@ -2,7 +2,8 @@ module Homebrew extend self def versions - raise "Please `brew install git` first" unless system "/usr/bin/which -s git" + raise "Please `brew install git' first" unless system "/usr/bin/which -s git" + raise "Please `brew update' first" unless (HOMEBREW_REPOSITORY/".git").directory? ...
false
Other
Homebrew
brew
74c2fc8279498a67f504b9b8c8d4cfcbe24b7aa8.json
Remove invalid character for UTF-8 Closes Homebrew/homebrew#10962. Signed-off-by: Max Howell <max@methylblue.com>
Library/Homebrew/cmd/doctor.rb
@@ -220,7 +220,7 @@ def check_cc You have no /usr/bin/cc. This means you probably can't build *anything*. You need to install the CLI Tools for Xcode. You can either download this from http://connect.apple.com/ - or install them from inside Xcode’s preferences. Homebrew does not require + ...
false
Other
Homebrew
brew
c59be1a930fa1237e3ea84dca9c484037f1ba5a1.json
Remove libiconv duplicate Commit ee2c3ab ("Remove spurious libiconv dependencies") pruned all existing "depends_on 'libiconv'" usages from Homebrew in preparation for removing the libiconv dupe itself. Now that is done, and we can remove and blacklist it. It can be obtained from Homebrew-alt. Closes Homebrew/homebre...
Library/Homebrew/blacklist.rb
@@ -6,6 +6,11 @@ def blacklisted? name when 'libarchive', 'libpcap' then <<-EOS.undent Apple distributes #{name} with OS X, you can find it in /usr/lib. EOS + when 'libiconv' then <<-EOS.undent + Apple distributes #{name} with OS X, you can find it in /usr/lib. + Some build scripts fail to detect it...
true
Other
Homebrew
brew
c59be1a930fa1237e3ea84dca9c484037f1ba5a1.json
Remove libiconv duplicate Commit ee2c3ab ("Remove spurious libiconv dependencies") pruned all existing "depends_on 'libiconv'" usages from Homebrew in preparation for removing the libiconv dupe itself. Now that is done, and we can remove and blacklist it. It can be obtained from Homebrew-alt. Closes Homebrew/homebre...
Library/Homebrew/cmd/doctor.rb
@@ -340,7 +340,7 @@ def check_xcode_prefix if prefix.to_s.match(' ') <<-EOS.undent Xcode is installed to a directory with a space in the name. - This will cause some formulae, such as libiconv, to fail to build. + This will cause some formulae to fail to build. EOS end end
true
Other
Homebrew
brew
5aa6aefa9664597ae9f004a9e0cb58edd31a2d6e.json
Allow multiple digits in GitHub version parts
Library/Homebrew/extend/pathname.rb
@@ -154,21 +154,21 @@ def version end # github tarballs, like v1.2.3 - %r[github.com/.*/(zip|tar)ball/v?((\d\.)+\d+)$].match to_s + %r[github.com/.*/(zip|tar)ball/v?((\d+\.)+\d+)$].match to_s return $2 if $2 # eg. https://github.com/sam-github/libnet/tarball/libnet-1.1.4 - %r[github.com...
false
Other
Homebrew
brew
8973d1dbcf6afb4266cd1333978d1f7b54a9a798.json
Remove redundant versions and update version tests Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/test_versions.rb
@@ -188,4 +188,27 @@ def test_imagemagick_bottle_style check 'http://downloads.sf.net/project/machomebrew/Bottles/imagemagick-6.7.1-1-bottle.tar.gz', '6.7.1-1' end + + def test_dash_version_dash_style + check 'http://www.antlr.org/download/antlr-3.4-complete.jar', '3.4' + end + + def test_more_vers...
false
Other
Homebrew
brew
27288547aaaaba14e2daa6de91b307b381b69742.json
Add specialty formulase to inheritance check
Library/Homebrew/cmd/audit.rb
@@ -9,7 +9,7 @@ def ff def audit_formula_text name, text problems = [] - if text =~ /<(Formula|AmazonWebServicesFormula)/ + if text =~ /<(Formula|AmazonWebServicesFormula|ScriptFileFormula|GithubGistFormula)/ problems << " * Use a space in class inheritance: class Foo < #{$1}" end
false
Other
Homebrew
brew
c947dbc58028f6c8efe40e9b3206c04e62fe73e5.json
Use HOMEBREW_REPOSITORY for freshness check Homebrew itself is found under HOMEBREW_REPOSITORY, which *may* be the same HOMEBREW_PREFIX, but does not have to be if you link brew into /usr/local/bin from another location.
Library/Homebrew/cmd/doctor.rb
@@ -801,11 +801,11 @@ def check_for_bad_python_symlink end def check_for_outdated_homebrew - HOMEBREW_PREFIX.cd do + HOMEBREW_REPOSITORY.cd do timestamp = if File.directory? ".git" `git log -1 --format="%ct" HEAD`.to_i else - (HOMEBREW_PREFIX/"Library").mtime.to_i + (HOMEBREW_REPOSITORY...
false
Other
Homebrew
brew
cef5429f9373526ed1fe523bcbbbb42b5cf65ea9.json
Use new Requirements code in Homebrew
Library/Contributions/examples/brew-server
@@ -146,8 +146,8 @@ get '/formula/:name' do s << <<-HTML <dt>Depends on</td> HTML - klass.deps.each do |name| - s << "<dd>#{link_to_formula(name)}</dd>" + klass.deps.each do |dep| + s << "<dd>#{link_to_formula(dep.name)}</dd>" end end
true
Other
Homebrew
brew
cef5429f9373526ed1fe523bcbbbb42b5cf65ea9.json
Use new Requirements code in Homebrew
Library/Homebrew/exceptions.rb
@@ -51,54 +51,12 @@ def message end end -class UnsatisfiedExternalDependencyError < Homebrew::InstallationError - attr :type +class UnsatisfiedRequirement < Homebrew::InstallationError + attr :dep - def initialize formula, type - @type = type - super formula, get_message(formula) - end - - def get_me...
true
Other
Homebrew
brew
cef5429f9373526ed1fe523bcbbbb42b5cf65ea9.json
Use new Requirements code in Homebrew
Library/Homebrew/formula.rb
@@ -1,4 +1,5 @@ require 'download_strategy' +require 'dependencies' require 'formula_support' require 'hardware' require 'bottles' @@ -357,17 +358,10 @@ def self.path name HOMEBREW_REPOSITORY+"Library/Formula/#{name.downcase}.rb" end - def mirrors - self.class.mirrors or [] - end + def mirrors; ...
true
Other
Homebrew
brew
cef5429f9373526ed1fe523bcbbbb42b5cf65ea9.json
Use new Requirements code in Homebrew
Library/Homebrew/formula_installer.rb
@@ -52,9 +52,16 @@ def install EOS end - unless ignore_deps - f.check_external_deps + f.external_deps.each do |dep| + unless dep.satisfied? + puts dep.message + if dep.fatal? and not ignore_deps + raise UnsatisfiedRequirement.new(f, dep) + end + end + ...
true
Other
Homebrew
brew
aef580261b2452eda2ebad666f27692e94cbf7ef.json
Tell the user when build logs are copied
Library/Homebrew/formula.rb
@@ -192,14 +192,9 @@ def brew yield self rescue Interrupt, RuntimeError, SystemCallError => e unless ARGV.debug? - logs = File.expand_path '~/Library/Logs/Homebrew/' - if File.exist? 'config.log' - mkdir_p logs - mv 'config.log', logs - end - ...
true
Other
Homebrew
brew
aef580261b2452eda2ebad666f27692e94cbf7ef.json
Tell the user when build logs are copied
Library/Homebrew/global.rb
@@ -51,6 +51,9 @@ def cache HOMEBREW_REPOSITORY+"Cellar" end +HOMEBREW_LOGS = Pathname.new('~/Library/Logs/Homebrew/').expand_path + + MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp MACOS_VERSION = /(10\.\d+)(\.\d+)?/.match(MACOS_FULL_VERSION).captures.first.to_f
true
Other
Homebrew
brew
04088ba96dfcc91eb74a3903e9ca1c951fa11511.json
Do a stricter version check A version should always be set when going through the constructor so tighten this check. Also do some style clean ups here.
Library/Homebrew/formula.rb
@@ -24,7 +24,6 @@ def initialize name='__UNKNOWN__', path=nil set_instance_variable 'bottle_sha1' set_instance_variable 'head' set_instance_variable 'specs' - set_instance_variable 'standard' set_instance_variable 'unstable' @@ -41,19 +40,21 @@ def initialize name='__UNKNOWN__', path=nil ...
false
Other
Homebrew
brew
55d4f4874660c768d28dce18155da627a899a176.json
ENV.rb: Generalize method for setting CPU flags All logic has been copied into a new method `set_cpu_flags` that accepts an additional argument, `flags`, which contains a list of environment variables for which the CPU flags are to be adjusted. `set_cpu_cflags` now recalls `set_cpu_flags` and passes `cflags_flags` as...
Library/Homebrew/extend/ENV.rb
@@ -355,24 +355,30 @@ def set_cflags f end end - def set_cpu_cflags default, map = {} + # Sets architecture-specific flags for every environment variable + # given in the list `flags`. + def set_cpu_flags flags, default, map = {} cflags =~ %r{(-Xarch_i386 )-march=} xarch = $1.to_s - remove_fr...
false
Other
Homebrew
brew
cd13553d5906b89258d1504329afc4b587967631.json
Remove bad exit status; need to fix another way.
Library/Homebrew/cmd/install.rb
@@ -87,7 +87,6 @@ def install_formulae formulae fi.finish rescue CannotInstallFormulaError => e onoe e.message - exit 1 end end end
true
Other
Homebrew
brew
cd13553d5906b89258d1504329afc4b587967631.json
Remove bad exit status; need to fix another way.
Library/Homebrew/cmd/upgrade.rb
@@ -66,11 +66,9 @@ def upgrade_formula f installer.finish rescue CannotInstallFormulaError => e onoe e - exit 1 rescue BuildError => e e.dump puts - exit 1 ensure # restore previous installation state if build failed outdated_keg.link if outdated_keg and not f.installed? res...
true
Other
Homebrew
brew
d60f4ffcd80a984018c61f9ca60269d42a055bf8.json
Restore cleaning of lib/charset.alias Even though we now prevent linking of this file into the prefix in Keg#link, its presence still triggers a "non-lib in lib" warning during installation. So keep cleaning it, and leave the check in Keg#link so things that skip_clean 'lib' still won't have it linked. Signed-off-by:...
Library/Homebrew/cleaner.rb
@@ -78,6 +78,8 @@ def clean_dir d elsif path.extname == '.la' # *.la files are stupid path.unlink unless @f.skip_clean? path + elsif path == @f.lib+'charset.alias' + path.unlink unless @f.skip_clean? path elsif not path.symlink? clean_file path end
false
Other
Homebrew
brew
fe25e4f7ec27ba66ad6eab2e26c9567e2419cc81.json
Fix typo in test_arch_for_command Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/test_utils.rb
@@ -20,7 +20,7 @@ def test_arch_for_command if `sw_vers -productVersion` =~ /10\.(\d+)/ and $1.to_i >= 7 assert_equal 2, arches.length assert arches.include?(:x86_64) - elsif `sw_vers -productVersion` =~ /10\.(\d+)/ and $1.to_i = 6 + elsif `sw_vers -productVersion` =~ /10\.(\d+)/ and $1.to_i ==...
false
Other
Homebrew
brew
6345ceef1fa13830b720dbf425c7408100ce2570.json
Update Xcode checks and URLs
install_homebrew.rb
@@ -126,9 +126,9 @@ def macos_version warn "/usr/local/bin is not in your PATH." unless ENV['PATH'].split(':').include? '/usr/local/bin' if macos_version < 10.7 - warn "Now install Xcode: http://developer.apple.com/technologies/xcode.html" unless Kernel.system "/usr/bin/which -s gcc" + warn "Now install Xcode: ht...
false
Other
Homebrew
brew
f37e22838cb0df651f50dd063135d975f7d30e3f.json
Encourage usage of the new CLT4Xcode
install_homebrew.rb
@@ -131,7 +131,12 @@ def macos_version end warn "/usr/local/bin is not in your PATH." unless ENV['PATH'].split(':').include? '/usr/local/bin' -warn "Now install Xcode: http://developer.apple.com/technologies/xcode.html" unless Kernel.system "/usr/bin/which -s gcc" + +if macos_version < 10.7 + warn "Now install Xco...
false
Other
Homebrew
brew
dfa75f9230f75060a693add842fcdc5648398c69.json
Allow "Press Enter" to be a \r Some wrapper-tools push \r rather than \n and break the installer.
install_homebrew.rb
@@ -106,7 +106,9 @@ def macos_version if STDIN.tty? puts puts "Press enter to continue" - abort unless getc == 13 + c = getc + # we test for \r and \n because some stuff does \r instead + abort unless c == 13 or c == 10 end if File.directory? "/usr/local"
false
Other
Homebrew
brew
98ec342ecc597d0bb2806fbd2a5fafb796caf8ed.json
Use admin group and not staff Staff is overly permissive, require user to be an Administrator to use Homebrew.
install_homebrew.rb
@@ -74,13 +74,11 @@ def macos_version abort "MacOS too old, see: https://gist.github.com/1144389" if macos_version < 10.5 abort "/usr/local/.git already exists!" unless Dir["/usr/local/.git/*"].empty? abort "Don't run this as root!" if Process.uid == 0 -abort <<-EOABORT unless `groups`.split.include? "staff" -This s...
false
Other
Homebrew
brew
c1568ab27746d993ec2d25276c625e42297d7555.json
Fix install script for Ruby 1.9.x
install_homebrew.rb
@@ -36,7 +36,7 @@ def sudo *args args = if args.length > 1 args.unshift "/usr/bin/sudo" else - "/usr/bin/sudo #{args}" + "/usr/bin/sudo #{args.first}" end ohai *args system *args
false
Other
Homebrew
brew
d39364b70a451a0a0bbd5c5abd1bca2371173c72.json
Use full path to sudo
install_homebrew.rb
@@ -52,9 +52,9 @@ def system *args def sudo *args args = if args.length > 1 - args.unshift "sudo" + args.unshift "/usr/bin/sudo" else - "sudo #{args}" + "/usr/bin/sudo #{args}" end ohai *args system *args
false
Other
Homebrew
brew
897dd14ae5ab775470264156ddd3645ffb37cfaa.json
Amend paths to check for chmods
install_homebrew.rb
@@ -88,7 +88,7 @@ def getc # NOTE only tested on OS X puts "/usr/local/Library/Formula/..." puts "/usr/local/Library/Homebrew/..." -chmods = %w(bin etc include lib libexec Library sbin share var . share/locale share/man share/info share/doc share/aclocal). +chmods = %w(bin etc include lib lib/pkgconfig Library sbi...
false
Other
Homebrew
brew
76ad14507ce71126d9446e08b99dbbb056bc296b.json
Direct the user to Xcode download
install_homebrew.rb
@@ -128,4 +128,4 @@ def getc # NOTE only tested on OS X ohai "Installation successful!" warn "/usr/local/bin is not in your PATH." unless ENV['PATH'].split(':').include? '/usr/local/bin' -warn "Now install Xcode." unless Kernel.system "/usr/bin/which -s gcc" +warn "Now install Xcode: http://developer.apple.com/tec...
false
Other
Homebrew
brew
d9f1be7ef270458b38d9b41d64d0d807dbabd405.json
Use original system function for gcc check
install_homebrew.rb
@@ -45,11 +45,9 @@ def ohai *args def warn warning puts "#{Tty.red}Warning#{Tty.reset}: #{warning.chomp}" end - -alias :system_orig :system def system *args - abort "Failed during: #{args.shell_s}" unless system_orig *args + abort "Failed during: #{args.shell_s}" unless Kernel.system *args end def sudo *...
false
Other
Homebrew
brew
4c0545619d3aaa91f78e00a0d13e662a078a6543.json
Use getbyte and not getc
install_homebrew.rb
@@ -72,7 +72,7 @@ def sudo *args def getc # NOTE only tested on OS X system "/bin/stty raw -echo" - STDIN.getc + STDIN.getbyte ensure system "/bin/stty -raw echo" end
false
Other
Homebrew
brew
ebbc2e5b3fae09f6497723a2f0cb12c2248c082e.json
Use full path to stty
install_homebrew.rb
@@ -71,10 +71,10 @@ def sudo *args end def getc # NOTE only tested on OS X - system "stty raw -echo" + system "/bin/stty raw -echo" STDIN.getc ensure - system "stty -raw echo" + system "/bin/stty -raw echo" end ####################################################################### script
false
Other
Homebrew
brew
e12165138fe4064d42a016249d13daa40db8c070.json
Add user to staff if necessary
install_homebrew.rb
@@ -7,6 +7,18 @@ # If you do fork, please ensure you add a comment here that explains what the # changes are intended to do and how well you tested them. # +# 30th March 2010: +# Added a check to make sure user is in the staff group. This was a problem +# for me, and I think it was due to me migrating my account...
false
Other
Homebrew
brew
35292268657f1f21c543c0ff8c7ac792598d0ef2.json
Advise user if they are not in the right group
install_homebrew.rb
@@ -7,35 +7,50 @@ # If you do fork, please ensure you add a comment here that explains what the # changes are intended to do and how well you tested them. # +# 14th March 2010: +# Adapted CodeButler's fork: http://gist.github.com/331512 +# module Tty extend self def blue; bold 34; end def white; bold 39; ...
false
Other
Homebrew
brew
5f1a9098c945c46c30b095b823af2312ac8936a8.json
Add better Unix exit codes. Closes Homebrew/homebrew#10809.
Library/Homebrew/cmd/doctor.rb
@@ -836,5 +836,6 @@ def doctor end puts "Your system is raring to brew." if raring_to_brew + exit raring_to_brew ? 0 : 1 end end
true