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
f02d81ecbf636aea7bcb842ef6350afe947a4839.json
Create active symlinks for installed formula Similar to the LinkedKegs record, we write a symlink for installed kegs to PREFIX/opt. Unlike the linked-keg record, unlinking doesn't remove the link, only uninstalling, and keg-only formula have a record too. The reason for this addition is so that formula that depend o...
Library/Homebrew/keg.rb
@@ -42,7 +42,7 @@ def unlink Find.prune if src.directory? end end - linked_keg_record.unlink if linked_keg_record.exist? + linked_keg_record.unlink if linked_keg_record.symlink? n end @@ -126,7 +126,25 @@ def link mode=nil linked_keg_record.make_relative_symlink(self) unless ...
true
Other
Homebrew
brew
f02d81ecbf636aea7bcb842ef6350afe947a4839.json
Create active symlinks for installed formula Similar to the LinkedKegs record, we write a symlink for installed kegs to PREFIX/opt. Unlike the linked-keg record, unlinking doesn't remove the link, only uninstalling, and keg-only formula have a record too. The reason for this addition is so that formula that depend o...
Library/Homebrew/keg_fix_install_names.rb
@@ -56,8 +56,13 @@ def bad_install_names_for file end # the shortpath ensures that library upgrades don’t break installed tools - shortpath = HOMEBREW_PREFIX + Pathname.new(file).relative_path_from(self) - id = if shortpath.exist? then shortpath else file end + relative_path = Pathname.new(file).re...
true
Other
Homebrew
brew
05991dd846ac54b10cd78453b140de8bfb259392.json
Produce good error messages for bad tarballs
Library/Homebrew/extend/pathname.rb
@@ -189,8 +189,12 @@ def compression_type when /^\xFD7zXZ\x00/ then :xz when /^Rar!/ then :rar else - # Assume it is not an archive - nil + # This code so that bad-tarballs and zips produce good error messages + # when they don't unarchive properly. + case extname + ...
false
Other
Homebrew
brew
396ca3fc590ff1e8e5c6fb784458d7a5a5162b00.json
Add Version.slice to compat suite Refs Homebrew/homebrew#14299.
Library/Homebrew/compat/compatibility.rb
@@ -217,3 +217,11 @@ def mountain_lion? end alias_method :mountain_lion_or_newer?, :mountain_lion? end + + +class Version + def slice *args + opoo "Calling slice on versions is deprecated, use: to_s.slice" + to_s.slice *args + end +end
false
Other
Homebrew
brew
05094060692616040e5ef6bcd9bb996d4dd46cd0.json
Use full paths to mdfind and pkgutil
Library/Homebrew/macos.rb
@@ -216,12 +216,12 @@ def app_with_bundle_id id end def mdfind attribute, id - path = `mdfind "#{attribute} == '#{id}'"`.split("\n").first + path = `/usr/bin/mdfind "#{attribute} == '#{id}'"`.split("\n").first Pathname.new(path) unless path.nil? or path.empty? end def pkgutil_info id - `pk...
false
Other
Homebrew
brew
b8a62d98e114b1af6f1ce7878aa44fa60635870f.json
audit: fix redundant version check The == comparison was comparing the versions rather than directly comparing the strings, which lead to false positives. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/audit.rb
@@ -219,7 +219,7 @@ def audit_specs else version_text = s.version unless s.version.detected_from_url? version_url = Version.parse(s.url) - if version_url == version_text + if version_url.to_s == version_text.to_s problem "#{spec} version #{version_text} is redundant wit...
false
Other
Homebrew
brew
82d1310800dc225e8c561fb07c76a1e85434fdd4.json
Check formula options properly to rule out bottle. Fixes Homebrew/homebrew#14148.
Library/Homebrew/bottles.rb
@@ -12,7 +12,7 @@ def install_bottle? f return true if ARGV.include? '--install-bottle' not ARGV.build_from_source? \ and ARGV.bottles_supported? \ - and ARGV.options_only.empty? \ + and ARGV.used_options(f).empty? \ and bottle_current?(f) end
false
Other
Homebrew
brew
d5b954ebd4c3c8c43584e04976da071c6ac76cf4.json
Fix ARGV and bottles circular dependency.
Library/Homebrew/bottles.rb
@@ -8,13 +8,12 @@ def bottle_filename f, bottle_version=nil "#{name}-#{version}#{bottle_native_suffix(bottle_version)}" end -def bottles_supported? - HOMEBREW_PREFIX.to_s == '/usr/local' and HOMEBREW_CELLAR.to_s == '/usr/local/Cellar' and Hardware.is_64_bit? || !MacOS.snow_leopard? -end - def install_bottle? f ...
true
Other
Homebrew
brew
d5b954ebd4c3c8c43584e04976da071c6ac76cf4.json
Fix ARGV and bottles circular dependency.
Library/Homebrew/extend/ARGV.rb
@@ -124,15 +124,20 @@ def build_32_bit? include? '--32-bit' end + def bottles_supported? + # Snow Leopard was the only version of OS X that supported + # both 64-bit and 32-bit processors and kernels. + (Hardware.is_64_bit? or not MacOS.snow_leopard?) \ + and HOMEBREW_PREFIX.to_s == '/usr/local...
true
Other
Homebrew
brew
ebbc3438a1e6f9014d049c98c54182a31212b1d8.json
Move used_options and unused_options to ARGV.
Library/Homebrew/extend/ARGV.rb
@@ -7,6 +7,14 @@ def options_only select {|arg| arg[0..0] == '-'} end + def used_options f + f.build.as_flags & options_only + end + + def unused_options f + f.build.as_flags - options_only + end + def formulae require 'formula' @formulae ||= downcased_unique_named.map{ |name| Formula.f...
true
Other
Homebrew
brew
ebbc3438a1e6f9014d049c98c54182a31212b1d8.json
Move used_options and unused_options to ARGV.
Library/Homebrew/tab.rb
@@ -9,14 +9,8 @@ # `Tab.for_install`. class Tab < OpenStruct def self.for_install f, args - # Retrieve option flags from command line. - arg_options = args.options_only - # Pick off the option flags from the formula's `options` array by - # discarding the descriptions. - formula_options = f.build.as...
true
Other
Homebrew
brew
90010f46021c34024dd22a0f61790bb57cb4b5ea.json
Fix tests and NoMethodError with no X11 installed.
Library/Homebrew/extend/ENV.rb
@@ -301,9 +301,10 @@ def libxml2 end end - def x11 + def x11 silent=false unless MacOS::X11.installed? - opoo "You do not have X11 installed, this formula may not build." + opoo "You do not have X11 installed, this formula may not build." unless silent + return end # There ar...
true
Other
Homebrew
brew
90010f46021c34024dd22a0f61790bb57cb4b5ea.json
Fix tests and NoMethodError with no X11 installed.
Library/Homebrew/test/test_ENV.rb
@@ -15,7 +15,7 @@ def test_ENV_options ENV.minimal_optimization ENV.no_optimization ENV.libxml2 - ENV.x11 + ENV.x11 true ENV.enable_warnings assert !ENV.cc.empty? assert !ENV.cxx.empty?
true
Other
Homebrew
brew
d9a18d4c1e679d95ff9828f00d246d9b03ccb984.json
erlang: fix version detection and bottles.
Library/Homebrew/test/test_versions.rb
@@ -93,6 +93,10 @@ def test_erlang_version_style assert_version_detected 'R13B', 'http://erlang.org/download/otp_src_R13B.tar.gz' end + def test_another_erlang_version_style + assert_version_detected 'R15B01', 'https://github.com/erlang/otp/tarball/OTP_R15B01' + end + def test_p7zip_version_style ...
true
Other
Homebrew
brew
d9a18d4c1e679d95ff9828f00d246d9b03ccb984.json
erlang: fix version detection and bottles.
Library/Homebrew/version.rb
@@ -127,6 +127,10 @@ def self._parse spec m = %r[github.com/.+/(?:zip|tar)ball/v?((\d+\.)+\d+_(\d+))$].match(spec.to_s) return m.captures.first unless m.nil? + # e.g. https://github.com/erlang/otp/tarball/OTP_R15B01 (erlang style) + m = /[-_](R\d+[AB]\d*)/.match(spec.to_s) + return m.captures.first...
true
Other
Homebrew
brew
065475369568f7a1174efb681faab01183b648e4.json
audit: allow certain ARGV usages
Library/Homebrew/cmd/audit.rb
@@ -368,7 +368,7 @@ def audit_text problem "Use 'build.head?' instead of inspecting 'version'" end - if text =~ /ARGV/ + if text =~ /ARGV(?!\.(debug|verbose)\?)/ problem "Use build instead of ARGV to check options." end
false
Other
Homebrew
brew
e2058ed362eefca0cdc9553a7f9e7a5bb83acc26.json
mach-o: use any? instead of map and include? Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/mach.rb
@@ -100,14 +100,14 @@ def ppc64? end def dylib? - mach_data.map{ |m| m.fetch :type }.include? :dylib + mach_data.any? { |m| m.fetch(:type) == :dylib } end def mach_o_executable? - mach_data.map{ |m| m.fetch :type }.include? :executable + mach_data.any? { |m| m.fetch(:type) == :executable } ...
false
Other
Homebrew
brew
f471c3e99fef4bb59c0bbafbfc496eca2850caa2.json
MacOS.dev_tools_path: return nil if not found This matches the semantics of other path methods, such as Xcode.prefix. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/global.rb
@@ -99,5 +99,5 @@ module Homebrew extend self # Xcode-only installs place tools in non-standard locations, and we also want # to ensure the dev tools are in the PATH in build.rb unless ORIGINAL_PATHS.include? MacOS.dev_tools_path - ENV['PATH'] = ENV['PATH'].to_s + ':' + MacOS.dev_tools_path + ENV['PATH'] = ENV['PA...
true
Other
Homebrew
brew
f471c3e99fef4bb59c0bbafbfc496eca2850caa2.json
MacOS.dev_tools_path: return nil if not found This matches the semantics of other path methods, such as Xcode.prefix. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/macos.rb
@@ -71,8 +71,7 @@ def dev_tools_path else # Since we are pretty unrelenting in finding Xcode no matter where # it hides, we can now throw in the towel. - opoo "You really should consult the `brew doctor`!" - "" + opoo "Could not locate developer tools. Consult `brew doctor`." end ...
true
Other
Homebrew
brew
3f9e88ae69b1ce7c854008b8cbebc38df11b8701.json
Simplify build options API Simplify access to the different forms of a formula's build options by making options into real objects rather than strings, and expose both the 'name' and 'flag' form.
Library/Homebrew/cmd/options.rb
@@ -21,7 +21,7 @@ def options ff.each do |f| next if f.build.empty? if ARGV.include? '--compact' - puts f.build.collect {|k,v| "--"+k} * " " + puts f.build.as_flags * " " else puts f.name if ff.length > 1 dump_options_for_formula f @@ -31,9 +31,9 @@ def options ...
true
Other
Homebrew
brew
3f9e88ae69b1ce7c854008b8cbebc38df11b8701.json
Simplify build options API Simplify access to the different forms of a formula's build options by making options into real objects rather than strings, and expose both the 'name' and 'flag' form.
Library/Homebrew/formula_support.rb
@@ -162,6 +162,26 @@ def to_s end +# Represents a build-time option for a formula +class Option + attr_reader :name, :description, :flag + + def initialize name, description=nil + @name = name.to_s + @description = description.to_s + @flag = '--'+name.to_s + end + + def eql?(other) + @name == other...
true
Other
Homebrew
brew
3f9e88ae69b1ce7c854008b8cbebc38df11b8701.json
Simplify build options API Simplify access to the different forms of a formula's build options by making options into real objects rather than strings, and expose both the 'name' and 'flag' form.
Library/Homebrew/tab.rb
@@ -13,7 +13,7 @@ def self.for_install f, args arg_options = args.options_only # Pick off the option flags from the formula's `options` array by # discarding the descriptions. - formula_options = f.build.map { |opt, _| "--#{opt}" } + formula_options = f.build.as_flags Tab.new :used_options =...
true
Other
Homebrew
brew
3081e697832e8addd5fa7cfc19b4bc8f3922c256.json
Test version interrogation methods Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/test_versions.rb
@@ -39,6 +39,17 @@ def test_macos_version_comparison assert v == :snow_leopard assert v < :lion end + + def test_version_interrogation + v = Version.new("1.1alpha1") + assert v.alpha? + v = Version.new("1.0beta2") + assert v.devel? + assert v.beta? + v = Version.new("1.0rc-1") + asser...
false
Other
Homebrew
brew
23cc14f9a15da11bac6f3847887e91f129d29b7b.json
Simplify version comparison tests Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/test_versions.rb
@@ -15,20 +15,22 @@ class VersionComparisonTests < Test::Unit::TestCase include VersionAssertions def test_version_comparisons - assert_version_comparison '0.1', '==', '0.1.0' - assert_version_comparison '0.1', '!=', '0.2' - assert_version_comparison '1.2.3', '>', '1.2.2' - assert_version_comparison...
true
Other
Homebrew
brew
23cc14f9a15da11bac6f3847887e91f129d29b7b.json
Simplify version comparison tests Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/testing_env.rb
@@ -67,6 +67,10 @@ def shutup ENV.extend(HomebrewEnvExtension) module VersionAssertions + def version v + Version.new(v) + end + def assert_version_equal expected, actual assert_equal Version.new(expected), actual end @@ -78,8 +82,4 @@ def assert_version_detected expected, url def assert_version_...
true
Other
Homebrew
brew
b8231fc5f3e93f2d7a230e7880fb2fdc7c04c369.json
Add custom comparator for MacOS.version This will allow us to do comparisons like if MacOS.version >= :lion and hopefully deprecate the MacOS.<name>? family of methods, which are counterinitutive.
Library/Homebrew/macos.rb
@@ -3,7 +3,8 @@ module MacOS extend self MDITEM_BUNDLE_ID_KEY = "kMDItemCFBundleIdentifier" def version - MACOS_VERSION + require 'version' + MacOSVersion.new(MACOS_VERSION.to_s) end def cat
true
Other
Homebrew
brew
b8231fc5f3e93f2d7a230e7880fb2fdc7c04c369.json
Add custom comparator for MacOS.version This will allow us to do comparisons like if MacOS.version >= :lion and hopefully deprecate the MacOS.<name>? family of methods, which are counterinitutive.
Library/Homebrew/test/test_versions.rb
@@ -24,6 +24,13 @@ def test_version_comparisons assert_version_comparison 'HEAD', '>', '1.2.3' assert_version_comparison '1.2.3', '<', 'HEAD' end + + def test_macos_version_comparison + v = MacOSVersion.new(10.6) + assert v == 10.6 + assert v == :snow_leopard + assert v < :lion + end end ...
true
Other
Homebrew
brew
b8231fc5f3e93f2d7a230e7880fb2fdc7c04c369.json
Add custom comparator for MacOS.version This will allow us to do comparisons like if MacOS.version >= :lion and hopefully deprecate the MacOS.<name>? family of methods, which are counterinitutive.
Library/Homebrew/version.rb
@@ -154,3 +154,21 @@ def detect_from_symbol raise "Unknown version scheme #{@scheme} was requested." end end + +# Enable things like "MacOS.version >= :lion" +class MacOSVersion < Version + compare do |other| + case other + when Symbol, Fixnum, Float, Version + super Version.new case other + whe...
true
Other
Homebrew
brew
158b7047e516b6dda176cb1745e23c7109d049e9.json
Add small DSL for defining comparators
Library/Homebrew/version.rb
@@ -125,6 +125,13 @@ def self._parse spec m = /_([^_]+)/.match(stem) return m.captures.first unless m.nil? end + + # DSL for defining comparators + class << self + def compare &blk + send(:define_method, '<=>', &blk) + end + end end class VersionSchemeDetector
false
Other
Homebrew
brew
93baea7e47627cdd309715143b7d125966a28df5.json
outdated: use new version comparison machinery
Library/Homebrew/cmd/outdated.rb
@@ -1,28 +1,28 @@ require 'formula' +require 'keg' module Homebrew extend self def outdated - outdated_brews.each do |f| + outdated_brews do |f| if $stdout.tty? and not ARGV.flag? '--quiet' - versions = f.rack.cd{ Dir['*'] }.join(', ') - puts "#{f.name} (#{versions} < #{f.version})" + ...
true
Other
Homebrew
brew
93baea7e47627cdd309715143b7d125966a28df5.json
outdated: use new version comparison machinery
Library/Homebrew/cmd/upgrade.rb
@@ -1,4 +1,3 @@ -require 'cmd/outdated' require 'cmd/install' class Fixnum @@ -18,6 +17,7 @@ def upgrade Homebrew.perform_preinstall_checks outdated = if ARGV.named.empty? + require 'cmd/outdated' Homebrew.outdated_brews else ARGV.formulae.select do |f|
true
Other
Homebrew
brew
31b61cb01342b5a2079cb447693d003bdf455a65.json
keg: add method to return the corresponding Version
Library/Homebrew/keg.rb
@@ -67,6 +67,15 @@ def completion_installed? shell dir.directory? and not dir.children.length.zero? end + def version + require 'version' + Version.new(basename.to_s) + end + + def basename + Pathname.new(self.to_s).basename + end + def link mode=nil raise "Cannot link #{fname}\nAnother v...
false
Other
Homebrew
brew
2ff6c40735be2aca0e37ed94095526abcd115310.json
Add support for custom version schemes A version scheme is a class that inherits from Version and reimplements Version#<=>. This will allow formulae to specify a custom comparison method that will be used instead of the default, for cases where the default is insufficient.
Library/Homebrew/formula_support.rb
@@ -52,11 +52,14 @@ def url val=nil, specs=nil end def version val=nil - if val.nil? - @version ||= Version.parse(@url) - else - @version = Version.new(val) - end + @version ||= case val + when nil then Version.parse(@url) + when Hash + key, value = val.shift + sche...
true
Other
Homebrew
brew
2ff6c40735be2aca0e37ed94095526abcd115310.json
Add support for custom version schemes A version scheme is a class that inherits from Version and reimplements Version#<=>. This will allow formulae to specify a custom comparison method that will be used instead of the default, for cases where the default is insufficient.
Library/Homebrew/test/test_formula.rb
@@ -278,4 +278,11 @@ def test_revised_bottle_specs when :mountainlion then '8badf00d8badf00d8badf00d8badf00d8badf00d' end, f.bottle.checksum.hexdigest end + + def test_custom_version_scheme + f = CustomVersionSchemeTestBall.new + + assert_version_equal '1.0', f.version + assert_instance_of Cu...
true
Other
Homebrew
brew
2ff6c40735be2aca0e37ed94095526abcd115310.json
Add support for custom version schemes A version scheme is a class that inherits from Version and reimplements Version#<=>. This will allow formulae to specify a custom comparison method that will be used instead of the default, for cases where the default is insufficient.
Library/Homebrew/test/testball.rb
@@ -271,3 +271,17 @@ def initialize name=nil super "revisedbottlespectestball" end end + +class CustomVersionScheme < Version +end + +class CustomVersionSchemeTestBall < Formula + homepage 'http://example.com' + url 'file:///foo.com/testball-0.1.tbz' + sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5' + vers...
true
Other
Homebrew
brew
2ff6c40735be2aca0e37ed94095526abcd115310.json
Add support for custom version schemes A version scheme is a class that inherits from Version and reimplements Version#<=>. This will allow formulae to specify a custom comparison method that will be used instead of the default, for cases where the default is insufficient.
Library/Homebrew/version.rb
@@ -126,3 +126,24 @@ def self._parse spec return m.captures.first unless m.nil? end end + +class VersionSchemeDetector + def initialize scheme + @scheme = scheme + end + + def detect + if @scheme.is_a? Class and @scheme.ancestors.include? Version + @scheme + elsif @scheme.is_a? Symbol then det...
true
Other
Homebrew
brew
329f0a849059d227866d8127f9f72066236c82da.json
Replace version strings with Version objects
Library/Homebrew/cmd/diy.rb
@@ -21,7 +21,7 @@ def diy end end - prefix = HOMEBREW_CELLAR+name+version + prefix = HOMEBREW_CELLAR/name/version if File.file? 'CMakeLists.txt' puts "-DCMAKE_INSTALL_PREFIX=#{prefix}"
true
Other
Homebrew
brew
329f0a849059d227866d8127f9f72066236c82da.json
Replace version strings with Version objects
Library/Homebrew/cmd/versions.rb
@@ -13,7 +13,7 @@ def versions else f.versions do |version, sha| print Tty.white.to_s - print "#{version.ljust(8)} " + print "#{version.to_s.ljust(8)} " print Tty.reset.to_s puts "git checkout #{sha} #{f.pretty_relative_path}" end
true
Other
Homebrew
brew
329f0a849059d227866d8127f9f72066236c82da.json
Replace version strings with Version objects
Library/Homebrew/extend/pathname.rb
@@ -163,8 +163,7 @@ def abv def version require 'version' - version = Version.parse(self) - version.to_s unless version.nil? + Version.parse(self) end def compression_type
true
Other
Homebrew
brew
329f0a849059d227866d8127f9f72066236c82da.json
Replace version strings with Version objects
Library/Homebrew/formula.rb
@@ -108,7 +108,7 @@ def installed_prefix def prefix validate_variable :name validate_variable :version - HOMEBREW_CELLAR+@name+@version + HOMEBREW_CELLAR/@name/@version end def rack; prefix.parent end @@ -543,7 +543,7 @@ def patch def validate_variable name v = instance_variable_get...
true
Other
Homebrew
brew
329f0a849059d227866d8127f9f72066236c82da.json
Replace version strings with Version objects
Library/Homebrew/formula_support.rb
@@ -1,5 +1,6 @@ require 'download_strategy' require 'checksums' +require 'version' class SoftwareSpec attr_reader :checksum, :mirrors, :specs @@ -58,12 +59,12 @@ def url val=nil, specs=nil end def version val=nil - unless val.nil? - @version = val + if val.nil? + @version ||= Version.par...
true
Other
Homebrew
brew
329f0a849059d227866d8127f9f72066236c82da.json
Replace version strings with Version objects
Library/Homebrew/test/test_bucket.rb
@@ -22,6 +22,8 @@ def initialize # separate TestCase classes. class BeerTasting < Test::Unit::TestCase + include VersionAssertions + def test_supported_compressed_types assert_nothing_raised do MockFormula.new 'test-0.1.tar.gz' @@ -129,12 +131,6 @@ def test_my_float_assumptions assert_equal 10....
true
Other
Homebrew
brew
329f0a849059d227866d8127f9f72066236c82da.json
Replace version strings with Version objects
Library/Homebrew/test/test_formula.rb
@@ -10,6 +10,7 @@ class MostlyAbstractFormula < Formula end class FormulaTests < Test::Unit::TestCase + include VersionAssertions def test_prefix nostdout do @@ -65,7 +66,7 @@ def test_formula_specs assert_equal 'http://example.com', f.homepage assert_equal 'file:///foo.com/testball-0.1.tbz', f...
true
Other
Homebrew
brew
329f0a849059d227866d8127f9f72066236c82da.json
Replace version strings with Version objects
Library/Homebrew/test/test_versions.rb
@@ -3,20 +3,6 @@ require 'test/testball' require 'version' -module VersionAssertions - def assert_version_detected expected, url - assert_equal expected, Version.parse(url).to_s - end - - def assert_version_nil url - assert_nil Version.parse(url) - end - - def assert_version_comparison a, comparison, b -...
true
Other
Homebrew
brew
329f0a849059d227866d8127f9f72066236c82da.json
Replace version strings with Version objects
Library/Homebrew/test/testing_env.rb
@@ -65,3 +65,21 @@ def shutup require 'extend/ENV' ENV.extend(HomebrewEnvExtension) + +module VersionAssertions + def assert_version_equal expected, actual + assert_equal Version.new(expected), actual + end + + def assert_version_detected expected, url + assert_equal expected, Version.parse(url).to_s + en...
true
Other
Homebrew
brew
5fe7fdf1535eda627f74e0272b4bbf0618b9a498.json
Move version detection to Version class Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/extend/pathname.rb
@@ -161,90 +161,10 @@ def abv out<<`/usr/bin/du -hd0 #{to_s} | cut -d"\t" -f1`.strip end - # attempts to retrieve the version component of this path, so generally - # you'll call it on tarballs or extracted tarball directories, if you add - # to this please provide amend the unittest def version - if...
true
Other
Homebrew
brew
5fe7fdf1535eda627f74e0272b4bbf0618b9a498.json
Move version detection to Version class Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/test_versions.rb
@@ -5,7 +5,7 @@ module VersionAssertions def assert_version url, version - assert_equal version, Version.parse(url) + assert_equal version, Version.parse(url).to_s end def assert_version_nil url
true
Other
Homebrew
brew
5fe7fdf1535eda627f74e0272b4bbf0618b9a498.json
Move version detection to Version class Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/version.rb
@@ -3,7 +3,7 @@ class Version def initialize val return val if val.is_a? Version or val.nil? - @version = val.to_s.strip + @version = val.to_s end def head? @@ -38,6 +38,86 @@ def to_s alias_method :to_str, :to_s def self.parse spec - Pathname.new(spec.to_s).version + version = _pa...
true
Other
Homebrew
brew
104fc0e09b8bfe825a0fecd71a971677cb11c271.json
Add Version class
Library/Homebrew/version.rb
@@ -0,0 +1,25 @@ +class Version + include Comparable + + def initialize val + return val if val.is_a? Version or val.nil? + @version = val.to_s.strip + end + + def nums + @version.scan(/\d+/).map { |d| d.to_i } + end + + def <=>(other) + @version <=> other.version + end + + def to_s + @version + ...
false
Other
Homebrew
brew
1a8d5357215daaa2637e02ecfbb657c7b669b3a4.json
Add Xcode 4.4.1 to standard compilers map Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/macos.rb
@@ -233,7 +233,8 @@ def prefer_64_bit? "4.3.1" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_build_version=>318}, "4.3.2" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_build_version=>318}, "4.3.3" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_build_version=>31...
false
Other
Homebrew
brew
ad02ea74da758f5063b219a4a35df9431c4d8732.json
Fix syntax error, sorry about that. Didn't test properly, it was a side-fix. Bad mxcl.
Library/Homebrew/macos/xcode.rb
@@ -158,8 +158,8 @@ def installed? end def latest_version? - `/usr/bin/clang -v` =~ %r{tags/Apple/clang-(\d+).(\d+).(\d+)} - $1 >= 421 and $3 >= 57 + `/usr/bin/clang -v 2>&1` =~ %r{tags/Apple/clang-(\d+)\.(\d+)\.(\d+)} + $1.to_i >= 421 and $3.to_i >= 57 end def version
false
Other
Homebrew
brew
53cf970312fb98d53fa5859bc039e453b60274cc.json
build: expand requirements recursively when modifying ENV Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/build.rb
@@ -56,7 +56,7 @@ end def install f - f.requirements.each { |dep| dep.modify_build_environment } + f.recursive_requirements.each { |req| req.modify_build_environment } f.recursive_deps.uniq.each do |dep| dep = Formula.factory dep
true
Other
Homebrew
brew
53cf970312fb98d53fa5859bc039e453b60274cc.json
build: expand requirements recursively when modifying ENV Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/formula.rb
@@ -440,6 +440,12 @@ def self.expand_deps f end end + def recursive_requirements + reqs = recursive_deps.map { |dep| dep.requirements }.to_set + reqs << requirements + reqs.flatten + end + protected # Pretty titles the command and buffers stdout/stderr
true
Other
Homebrew
brew
120ce10730acfeb458801fcc24042ed34c463251.json
--config: remove confusing XQuartz annotation Apple's X11 is XQuartz, but this can be confusing, and is ultimately unnecessary for debugging purposes. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/--config.rb
@@ -60,7 +60,7 @@ def describe_path path def describe_x11 return "N/A" unless MacOS::XQuartz.installed? - return "XQuartz #{MacOS::XQuartz.version} in " + describe_path(MacOS::XQuartz.prefix) + return "#{MacOS::XQuartz.version} in " + describe_path(MacOS::XQuartz.prefix) end def describe_perl
false
Other
Homebrew
brew
3d657746bb2362d3120ec0b1f003dbec78b4b3c6.json
Encourage clicks on issues link
Library/Homebrew/exceptions.rb
@@ -125,10 +125,12 @@ def dump puts %["--use-llvm" was specified] if ARGV.include? '--use-llvm' puts %["--use-gcc" was specified] if ARGV.include? '--use-gcc' Homebrew.dump_build_env e.env + puts onoe "#{e.to_s.strip} (#{formula_name}.rb:#{error_line})" issues = GitHub.issues_for_formula for...
false
Other
Homebrew
brew
8818e008e360a6b6e94a1b470218efa951874e15.json
tests: require string extension before exceptions exceptions.rb now needs String#undent when it is loaded. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/test/testing_env.rb
@@ -8,9 +8,9 @@ $:.push(File.expand_path(__FILE__+'/../..')) require 'extend/pathname' +require 'extend/string' require 'exceptions' require 'utils' -require 'extend/string' # these are defined in global.rb, but we don't want to break our actual # homebrew tree, and we do want to test everything :)
false
Other
Homebrew
brew
d1c0d4c8793d6ea80f1e9dd3759aa22eb506211a.json
Fix normalization of old- and new-style options When combining the set of old-style and new-style options, make sure that the leading "--" is stripped. Fixes displaying options in `brew options`, and the exotic case of declaring options using the old syntax and then checking them with `build.include?`
Library/Homebrew/cmd/options.rb
@@ -32,8 +32,7 @@ def options def dump_options_for_formula f f.build.each do |k,v| - k.prepend "--" unless k.start_with? "--" - puts k + puts "--"+k puts "\t"+v end end
true
Other
Homebrew
brew
d1c0d4c8793d6ea80f1e9dd3759aa22eb506211a.json
Fix normalization of old- and new-style options When combining the set of old-style and new-style options, make sure that the leading "--" is stripped. Fixes displaying options in `brew options`, and the exotic case of declaring options using the old syntax and then checking them with `build.include?`
Library/Homebrew/formula.rb
@@ -58,7 +58,10 @@ def initialize name='__UNKNOWN__', path=nil @downloader = download_strategy.new(name, @active_spec) # Combine DSL `option` and `def options` - options.each {|o| self.class.build.add(o[0], o[1]) } + options.each do |opt, desc| + # make sure to strip "--" from the start of option...
true
Other
Homebrew
brew
bd1a7e2690c9f84e8a864aa80831b842f39b638b.json
remove trailing whitespace
Library/Homebrew/cmd/install.rb
@@ -2,7 +2,7 @@ require 'hardware' require 'blacklist' -module Homebrew extend self +module Homebrew extend self def install raise FormulaUnspecifiedError if ARGV.named.empty?
false
Other
Homebrew
brew
ac9bc89bb38fc07205b34fdbb7f3c34b81e7464e.json
Remove options audit check
Library/Homebrew/cmd/audit.rb
@@ -155,46 +155,6 @@ def audit_formula_text name, text --verbose ].freeze -def audit_formula_options f, text - problems = [] - - # Textually find options checked for in the formula - options = [] - text.scan(/ARGV\.include\?[ ]*\(?(['"])(.+?)\1/) { |m| options << m[1] } - options.reject! {|o| o.include? "#"}...
false
Other
Homebrew
brew
e196c845bf3099a1aaf7264fe87fa4e40ea8e2e6.json
Fix info/options for new options dsl
Library/Homebrew/cmd/info.rb
@@ -90,7 +90,7 @@ def info_formula f history = github_info(f) puts history if history - unless f.options.empty? + unless f.build.empty? require 'cmd/options' ohai "Options" Homebrew.dump_options_for_formula f
true
Other
Homebrew
brew
e196c845bf3099a1aaf7264fe87fa4e40ea8e2e6.json
Fix info/options for new options dsl
Library/Homebrew/cmd/options.rb
@@ -31,7 +31,7 @@ def options end def dump_options_for_formula f - f.options.each do |k,v| + f.build.each do |k,v| puts k puts "\t"+v end
true
Other
Homebrew
brew
f9751d63c49c9ad1d6ade8978a656060b619a4c2.json
fish completion: Remove dupe lines, fix commands
Library/Contributions/brew_fish_completion.fish
@@ -6,7 +6,7 @@ # ln -s (brew --prefix)/Library/Contributions/brew_fish_completion.fish # ~/.config/fish/completions/brew.fish -for command in (ls (brew --repository)/Library/Homebrew/cmd | sed s/\.rb//) +for command in (ls (brew --repository)/Library/Homebrew/cmd | sed -e "s/\.rb//g") set commands $comman...
false
Other
Homebrew
brew
eb0be2ba4757f3da486e01af9885bbcbaf0e62b8.json
download_strategy: Use MacOS.locate to find svn - So that Xcode-only systems don't fail to find svn. Closes Homebrew/homebrew#14080. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Library/Homebrew/download_strategy.rb
@@ -274,7 +274,7 @@ def fetch_repo target, url, revision=nil, ignore_externals=false def svn return ENV['HOMEBREW_SVN'] if ENV['HOMEBREW_SVN'] return "#{HOMEBREW_PREFIX}/bin/svn" if File.exist? "#{HOMEBREW_PREFIX}/bin/svn" - return '/usr/bin/svn' + return MacOS.locate 'svn' end end
false
Other
Homebrew
brew
dbe460ef04ddc8b043988879730414e31600db53.json
options: remove duplicate function
Library/Homebrew/formula_support.rb
@@ -200,10 +200,6 @@ def include? name @args.include? '--' + name end - def using? name - @args.include? '--' + name - end - def head? @args.flag? '--HEAD' end
false
Other
Homebrew
brew
0df4c6a703d67db76fc31ee78aed3fc1eed12cfd.json
Add modular x11 dependencies. Fixes Homebrew/homebrew#13638.
Library/Homebrew/dependencies.rb
@@ -64,7 +64,13 @@ def parse_symbol_spec spec, tag when :autoconf, :automake, :bsdmake, :libtool # Xcode no longer provides autotools or some other build tools Dependency.new(spec.to_s) unless MacOS::Xcode.provides_autotools? - when :x11, :libpng + when :libpng, :freetype, :pixman, :fontconfig,...
false
Other
Homebrew
brew
f15bef5831f6b57090a012974129a49bffb9a1a7.json
Remove libpng and freetype blacklist
Library/Homebrew/blacklist.rb
@@ -16,11 +16,6 @@ def blacklisted? name However not all build scripts look for these hard enough, so you may need to call ENV.libxml2 in your formula's install function. EOS - when 'freetype', 'libpng' then <<-EOS.undent - Apple distributed #{name} with OS X until 10.8. It is also distributed - a...
false
Other
Homebrew
brew
4f809d0311ab6ca8da897d2a9830b9ecbf262d60.json
Simplify printing conflicts in `brew info` Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/info.rb
@@ -68,10 +68,7 @@ def info_formula f end puts "Depends on: #{f.deps*', '}" unless f.deps.empty? - conflicts = [] - f.requirements.each do |dep| - conflicts << dep.formula if dep.is_a? ConflictRequirement - end + conflicts = f.conflicts.map { |c| c.formula } puts "Conflicts with: #{con...
true
Other
Homebrew
brew
4f809d0311ab6ca8da897d2a9830b9ecbf262d60.json
Simplify printing conflicts in `brew info` Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/formula.rb
@@ -425,6 +425,10 @@ def self.path name def deps; self.class.dependencies.deps; end def requirements; self.class.dependencies.requirements; end + def conflicts + requirements.select { |r| r.is_a? ConflictRequirement } + end + # deps are in an installable order # which means if a depen...
true
Other
Homebrew
brew
82d3890495a13d488dc2a024f69979d914b6bf6d.json
Fix typo in conflicts_with DSL method Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/formula.rb
@@ -630,7 +630,7 @@ def conflicts_with formula, opts={} message = <<-EOS.undent #{formula} cannot be installed alongside #{name.downcase}. EOS - message << "This is because #{opts[:reason]}\n" if opts[:reason] + message << "This is because #{opts[:because]}\n" if opts[:because] if ...
false
Other
Homebrew
brew
d5ba82ca7e050d05f21c4ab6d0d10e6ccc701b2b.json
fix info command
Library/Homebrew/cmd/info.rb
@@ -69,7 +69,7 @@ def info_formula f puts "Depends on: #{f.deps*', '}" unless f.deps.empty? conflicts = [] - f.external_deps.each do |dep| + f.requirements.each do |dep| conflicts << dep.formula if dep.is_a? ConflictRequirement end puts "Conflicts with: #{conflicts*', '}" unless confl...
false
Other
Homebrew
brew
8c8701f26893f0b0cf9d54c4a6e56657af2d25e8.json
Allow multiple unsatisfied fatal requirements Closes Homebrew/homebrew#13335.
Library/Homebrew/build.rb
@@ -56,7 +56,7 @@ end def install f - f.external_deps.each { |dep| dep.modify_build_environment } + f.requirements.each { |dep| dep.modify_build_environment } f.recursive_deps.uniq.each do |dep| dep = Formula.factory dep
true
Other
Homebrew
brew
8c8701f26893f0b0cf9d54c4a6e56657af2d25e8.json
Allow multiple unsatisfied fatal requirements Closes Homebrew/homebrew#13335.
Library/Homebrew/dependencies.rb
@@ -19,11 +19,11 @@ class DependencyCollector :chicken, :jruby, :lua, :node, :perl, :python, :rbx, :ruby ].freeze - attr_reader :deps, :external_deps + attr_reader :deps, :requirements def initialize @deps = Dependencies.new - @external_deps = Set.new + @requirements = Set.new end de...
true
Other
Homebrew
brew
8c8701f26893f0b0cf9d54c4a6e56657af2d25e8.json
Allow multiple unsatisfied fatal requirements Closes Homebrew/homebrew#13335.
Library/Homebrew/exceptions.rb
@@ -65,12 +65,15 @@ def message end end -class UnsatisfiedRequirement < Homebrew::InstallationError - attr :dep - - def initialize formula, dep - @dep = dep - super formula, "An unsatisfied requirement failed this build." +class UnsatisfiedRequirements < Homebrew::InstallationError + attr :reqs + + def ...
true
Other
Homebrew
brew
8c8701f26893f0b0cf9d54c4a6e56657af2d25e8.json
Allow multiple unsatisfied fatal requirements Closes Homebrew/homebrew#13335.
Library/Homebrew/formula.rb
@@ -422,8 +422,8 @@ def self.path name HOMEBREW_REPOSITORY+"Library/Formula/#{name.downcase}.rb" end - def deps; self.class.dependencies.deps; end - def external_deps; self.class.dependencies.external_deps; end + def deps; self.class.dependencies.deps; end + def requireme...
true
Other
Homebrew
brew
8c8701f26893f0b0cf9d54c4a6e56657af2d25e8.json
Allow multiple unsatisfied fatal requirements Closes Homebrew/homebrew#13335.
Library/Homebrew/formula_installer.rb
@@ -43,7 +43,8 @@ def check_install_sanity f.recursive_deps.each do |dep| if dep.installed? and not dep.keg_only? and not dep.linked_keg.directory? - raise CannotInstallFormulaError, "You must `brew link #{dep}' before #{f} can be installed" + raise CannotInstallFormulaError, + ...
true
Other
Homebrew
brew
8c8701f26893f0b0cf9d54c4a6e56657af2d25e8.json
Allow multiple unsatisfied fatal requirements Closes Homebrew/homebrew#13335.
Library/Homebrew/test/test_external_deps.rb
@@ -12,9 +12,9 @@ def check_deps_fail specs end # Should have found a dep - assert d.external_deps.size == 1 + assert d.requirements.size == 1 - d.external_deps do |dep| + d.requirements do |req| assert !d.satisfied? end end @@ -26,9 +26,9 @@ def check_deps_pass specs end ...
true
Other
Homebrew
brew
bcde6432f3b7e42870ee4b3ee7a6eb06021c62e7.json
Fix issues with writable? detection in brew doctor Closes Homebrew/homebrew#13689. Signed-off-by: Max Howell <mxcl@me.com> There are subtle distinctions between writable? and writable_real? we don't understand precisely why we need this, but it fixes the bugs :/
Library/Contributions/cmds/brew-unpack.rb
@@ -73,7 +73,7 @@ def unpack unpack_dir.mkpath unless unpack_dir.exist? end - raise "Cannot write to #{unpack_dir}" unless unpack_dir.writable? + raise "Cannot write to #{unpack_dir}" unless unpack_dir.writable_real? formulae.each do |f| # Create a nice name for the stage folder.
true
Other
Homebrew
brew
bcde6432f3b7e42870ee4b3ee7a6eb06021c62e7.json
Fix issues with writable? detection in brew doctor Closes Homebrew/homebrew#13689. Signed-off-by: Max Howell <mxcl@me.com> There are subtle distinctions between writable? and writable_real? we don't understand precisely why we need this, but it fixes the bugs :/
Library/Contributions/install_homebrew.rb
@@ -84,7 +84,7 @@ def macos_version share/man/man5 share/man/man6 share/man/man7 share/man/man8 share/info share/doc share/aclocal ). map{ |d| "/usr/local/#{d}" }. - select{ |d| File.directory? d and not File.writable? d } + select{ |d| File.directory? d an...
true
Other
Homebrew
brew
bcde6432f3b7e42870ee4b3ee7a6eb06021c62e7.json
Fix issues with writable? detection in brew doctor Closes Homebrew/homebrew#13689. Signed-off-by: Max Howell <mxcl@me.com> There are subtle distinctions between writable? and writable_real? we don't understand precisely why we need this, but it fixes the bugs :/
Library/Homebrew/cmd/doctor.rb
@@ -279,7 +279,7 @@ def __check_subdir_access base target.find do |d| next unless d.directory? - cant_read << d unless d.writable? + cant_read << d unless d.writable_real? end cant_read.sort! @@ -300,7 +300,7 @@ def __check_subdir_access base def check_access_usr_local return unless HOMEBREW...
true
Other
Homebrew
brew
bcde6432f3b7e42870ee4b3ee7a6eb06021c62e7.json
Fix issues with writable? detection in brew doctor Closes Homebrew/homebrew#13689. Signed-off-by: Max Howell <mxcl@me.com> There are subtle distinctions between writable? and writable_real? we don't understand precisely why we need this, but it fixes the bugs :/
Library/Homebrew/cmd/install.rb
@@ -33,8 +33,8 @@ def check_ppc end def check_writable_install_location - raise "Cannot write to #{HOMEBREW_CELLAR}" if HOMEBREW_CELLAR.exist? and not HOMEBREW_CELLAR.writable? - raise "Cannot write to #{HOMEBREW_PREFIX}" unless HOMEBREW_PREFIX.writable? or HOMEBREW_PREFIX.to_s == '/usr/local' + raise ...
true
Other
Homebrew
brew
bcde6432f3b7e42870ee4b3ee7a6eb06021c62e7.json
Fix issues with writable? detection in brew doctor Closes Homebrew/homebrew#13689. Signed-off-by: Max Howell <mxcl@me.com> There are subtle distinctions between writable? and writable_real? we don't understand precisely why we need this, but it fixes the bugs :/
Library/Homebrew/extend/pathname.rb
@@ -353,7 +353,7 @@ def make_relative_symlink src To list all files that would be deleted: brew link -n formula_name EOS - elsif !dirname.writable? + elsif !dirname.writable_real? raise <<-EOS.undent Could not symlink file: #{src.expand_path...
true
Other
Homebrew
brew
bcde6432f3b7e42870ee4b3ee7a6eb06021c62e7.json
Fix issues with writable? detection in brew doctor Closes Homebrew/homebrew#13689. Signed-off-by: Max Howell <mxcl@me.com> There are subtle distinctions between writable? and writable_real? we don't understand precisely why we need this, but it fixes the bugs :/
Library/Homebrew/global.rb
@@ -16,7 +16,7 @@ def cache # we do this for historic reasons, however the cache *should* be the same # directory whichever user is used and whatever instance of brew is executed home_cache = Pathname.new("~/Library/Caches/Homebrew").expand_path - if home_cache.directory? and home_cache.writable? + ...
true
Other
Homebrew
brew
1f622843844e5d52d598c2f8be360a13416454c9.json
Restore check for broken xcode-select path How did this get removed? Had a bug today where user had this but no doctor check so I was confused!
Library/Homebrew/cmd/doctor.rb
@@ -392,8 +392,14 @@ def check_xcode_prefix def check_xcode_select_path # with the advent of CLT-only support, we don't need xcode-select - return if MacOS::CLT.installed? - unless File.file? "#{MacOS::Xcode.folder}/usr/bin/xcodebuild" and not MacOS::Xcode.bad_xcode_select_path? + + if MacOS::Xcode.bad_xcode_s...
false
Other
Homebrew
brew
28c9b8f601d3cc707ba5222ef4265dc35d797f90.json
Put the CLT advice warning in the right place Refs Homebrew/homebrew#13982.
Library/Homebrew/cmd/doctor.rb
@@ -213,10 +213,7 @@ def check_for_latest_xcode else return <<-EOS.undent Experimental support for using the "Command Line Tools" without Xcode. - You have only installed Xcode. If stuff is not building, try installing - the Command Line Tools package. - You do not ...
false
Other
Homebrew
brew
bbcbbcdaa1552ae3c5203c760c2efb7b7137b41c.json
Remove X11 doctor check Now that X11 components are specified as dependencies, users will be prompted to install these components when necessary, and this check is no longer needed. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/doctor.rb
@@ -167,17 +167,6 @@ def check_for_stray_las s end -def check_for_x11 - unless MacOS::XQuartz.installed? then <<-EOS.undent - X11 is not installed. - You don't have X11 installed as part of your OS X installation. - This is not required for all formulae, but is expected by some. - You can download th...
false
Other
Homebrew
brew
b51fe2241383130324ebc291e8d48855b14737cc.json
Warn user not to edit before first update Because, if you do, your changes will be lost.
Library/Homebrew/cmd/edit.rb
@@ -2,6 +2,14 @@ module Homebrew extend self def edit + unless (HOMEBREW_PREFIX/'.git').directory? + raise <<-EOS.undent + Changes will be lost! + The first time you `brew update', all local changes will be lost, you should + thus `brew update' before you `brew edit'! + EOS + ...
false
Other
Homebrew
brew
2056e24a12a48b9776e78992cfe77494d64ca3f8.json
mdfind: Handle multiple results Turns out mdfind can return multiple results on the commandline, if more than one app bundle matches. Fixes Homebrew/homebrew#13789.
Library/Homebrew/macos.rb
@@ -269,7 +269,7 @@ def app_with_bundle_id id end def mdfind attribute, id - path = `mdfind "#{attribute} == '#{id}'"`.strip + path = `mdfind "#{attribute} == '#{id}'"`.split("\n").first.strip Pathname.new(path) unless path.empty? end
false
Other
Homebrew
brew
fe32e6343d25df14012378ddecd8e84d84adc7ec.json
Invoke non interactive shell from brew edit Fixes Homebrew/homebrew#12779. Closes Homebrew/homebrew#12784. utils.rb invokes bash as a non interactive shell to run the editor when you run brew edit. Non-interactive shells are not intended to capture user input and for running scripts. Whilst the invocation of the edi...
Library/Homebrew/utils.rb
@@ -178,7 +178,7 @@ def exec_editor *args # Invoke bash to evaluate env vars in $EDITOR # This also gets us proper argument quoting. # See: https://github.com/mxcl/homebrew/issues/5123 - system "bash", "-c", which_editor + ' "$@"', "--", *args + system "bash", "-i", "-c", which_editor + ' "$@"', "--", *args ...
false
Other
Homebrew
brew
0c237a86797eabd181b5dd889e8981ab1648320e.json
Add conflicts_with DSL method conflicts_with is a thin wrapper around Requirement which simplifies marking conflicts between formulae. Closes Homebrew/homebrew#13687. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/Homebrew/cmd/info.rb
@@ -68,6 +68,11 @@ def info_formula f end puts "Depends on: #{f.deps*', '}" unless f.deps.empty? + conflicts = [] + f.external_deps.each do |dep| + conflicts << dep.formula if dep.is_a? ConflictRequirement + end + puts "Conflicts with: #{conflicts*', '}" unless conflicts.empty? if f....
true
Other
Homebrew
brew
0c237a86797eabd181b5dd889e8981ab1648320e.json
Add conflicts_with DSL method conflicts_with is a thin wrapper around Requirement which simplifies marking conflicts between formulae. Closes Homebrew/homebrew#13687. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/Homebrew/dependencies.rb
@@ -287,3 +287,23 @@ def message end end + +class ConflictRequirement < Requirement + attr_reader :formula + + def initialize formula, message + @formula = formula + @message = message + end + + def message; @message; end + + def satisfied? + keg = Formula.factory(@formula).prefix + not keg.exist...
true
Other
Homebrew
brew
0c237a86797eabd181b5dd889e8981ab1648320e.json
Add conflicts_with DSL method conflicts_with is a thin wrapper around Requirement which simplifies marking conflicts between formulae. Closes Homebrew/homebrew#13687. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Library/Homebrew/formula.rb
@@ -626,6 +626,21 @@ def depends_on dep dependencies.add(dep) end + def conflicts_with formula, opts={} + message = <<-EOS.undent + #{formula} cannot be installed alongside #{name.downcase}. + EOS + message << "This is because #{opts[:reason]}\n" if opts[:reason] + if !ARGV.for...
true
Other
Homebrew
brew
3822267d2c9981192b909a1fb74d997f536cb579.json
Synchronize Keg#link and #unlink counts Keg#link would sometimes count a linked file when doing mkpath, even if the target directory already exists; #unlink would never count it. This meant that "brew ln" and "brew unlink" counts for the same keg could be out of sync with each other.
Library/Homebrew/extend/pathname.rb
@@ -442,6 +442,7 @@ def rmdir $d+=1 end def mkpath + return if exist? super puts "mkpath #{to_s}" if ARGV.verbose? $d+=1
false
Other
Homebrew
brew
5a62582b39b7df44c8068970728f0a2f800bf39f.json
Requirement: add modify_build_environment method Rather than doing type introspection in build.rb, just define a method to perform the necessary environment setup for Requirements. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/build.rb
@@ -56,7 +56,7 @@ end def install f - ENV.x11 if f.external_deps.any? { |dep| dep.is_a? X11Dependency } + f.external_deps.each { |dep| dep.modify_build_environment } f.recursive_deps.uniq.each do |dep| dep = Formula.factory dep
true
Other
Homebrew
brew
5a62582b39b7df44c8068970728f0a2f800bf39f.json
Requirement: add modify_build_environment method Rather than doing type introspection in build.rb, just define a method to perform the necessary environment setup for Requirements. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/dependencies.rb
@@ -118,6 +118,7 @@ class Requirement def satisfied?; false; end def fatal?; false; end def message; ""; end + def modify_build_environment; nil end end @@ -188,4 +189,8 @@ def message; <<-EOS.undent EOS end + def modify_build_environment + ENV.x11 + end + end
true
Other
Homebrew
brew
86b1b2878d368aba361e1d9ba4a55e452f51216a.json
Revamp fish completion The fish completion hadn't been updated since 2009; this brings it up to date. Changes include: * Create the list of commands the same way as in bash completion * Add every option for every current command, with descriptions * Fixes a bug in fish_complete_brew_command * Allow fish_complete_brew...
Library/Contributions/brew_fish_completion.fish
@@ -1,24 +1,51 @@ -# This script contains basic completion of brew commands for -# fish (http://fishshell.org). To install it either put it -# in <your-fish-install-location>/share/fish/completions -# or ~/.config/fish/completions - and name it 'brew.fish' +# fish (http://fishshell.org) completion script for brew(1) +#...
false
Other
Homebrew
brew
4eeb0e64413065c2454c206a2733a8010204b45a.json
Use new Xcode module Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/doctor.rb
@@ -677,7 +677,7 @@ def check_git_newline_settings end def check_for_autoconf - return if MacOS::Xcode.version >= "4.3" + return unless MacOS::Xcode.provides_autotools? autoconf = which('autoconf') safe_autoconfs = %w[/usr/bin/autoconf /Developer/usr/bin/autoconf]
true
Other
Homebrew
brew
4eeb0e64413065c2454c206a2733a8010204b45a.json
Use new Xcode module Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/dependencies.rb
@@ -61,7 +61,7 @@ def parse_symbol_spec spec, tag case spec when :autoconf, :automake, :bsdmake, :libtool # Xcode no longer provides autotools or some other build tools - MacOS.xcode_version >= "4.3" ? Dependency.new(spec.to_s) : nil + Dependency.new(spec.to_s) unless MacOS::Xcode.provides_au...
true
Other
Homebrew
brew
4eeb0e64413065c2454c206a2733a8010204b45a.json
Use new Xcode module 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 - self['ACLOCAL_PATH'] = "#{HOMEBREW_PREFIX}/share/aclocal" if MacOS::Xcode.version < "4.3" + self['ACLOCAL_PATH'] = "#{HOMEBREW_PREFIX}/share/aclocal" if MacOS::Xcode.provides_autotool...
true
Other
Homebrew
brew
a784d2e045af20938b64a580be920362a74cd6ce.json
Move Xcode and CLT modules to a new file Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/macos.rb
@@ -277,156 +277,4 @@ def pkgutil_info id end end -module MacOS::Xcode extend self - - V4_BUNDLE_ID = "com.apple.dt.Xcode" - V3_BUNDLE_ID = "com.apple.Xcode" - V4_BUNDLE_PATH = Pathname.new("/Applications/Xcode.app") - V3_BUNDLE_PATH = Pathname.new("/Developer/Applications/Xcode.app") - - # Locate the "curre...
true