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
57337a07489379792a5da54b7eabf86c7ef4c317.json
Fix serialization of used_options
Library/Homebrew/formula.rb
@@ -504,7 +504,7 @@ def to_hash hsh["installed"] << { "version" => keg.basename.to_s, - "used_options" => tab.used_options, + "used_options" => tab.used_options.map(&:flag), "built_as_bottle" => tab.built_bottle } end
false
Other
Homebrew
brew
866b3cf6a891b4d58969fc4471b7b4cb0cd39ed2.json
Add test for String#get_make_var
Library/Homebrew/test/test_inreplace.rb
@@ -57,4 +57,10 @@ def test_remove_make_vars s1.remove_make_var! ["FLAG", "FLAG2"] assert_equal "OTHER=def\nOTHER2=def", s1 end + + def test_get_make_var + s = "CFLAGS = -Wall -O2\nLDFLAGS = -lcrypto -lssl" + s.extend(StringInreplaceExtension) + assert_equal "-Wall -O2", s.get_make_var("CFLAGS") ...
false
Other
Homebrew
brew
b8b014036ee394084992ad2f0dda06c25964b0be.json
Remove redundant return
Library/Homebrew/extend/string.rb
@@ -66,6 +66,5 @@ def remove_make_var! flags def get_make_var flag m = match Regexp.new("^#{flag}[ \\t]*=[ \\t]*(.*)$") return m[1] if m - return nil end end
false
Other
Homebrew
brew
02ad6442e771d63a365cd9502e1c994780a1b12b.json
GitDownloadStrategy: extract checkout from #stage
Library/Homebrew/download_strategy.rb
@@ -321,6 +321,8 @@ def fetch Dir.chdir(@clone) do config_repo fetch_repo + checkout + update_submodules if submodules? end elsif @clone.exist? puts "Removing invalid .git repo from cache" @@ -336,12 +338,6 @@ def stage Dir.chdir @clone do if @spec a...
false
Other
Homebrew
brew
3d5bda3f0a90783a53c89a6a64a27bcd05036557.json
Simplify this regexp
Library/Homebrew/requirement.rb
@@ -59,7 +59,7 @@ def hash def infer_name klass = self.class.to_s klass.sub!(/(Dependency|Requirement)$/, '') - klass.sub!(/^(\w+::){0,}/, '') + klass.sub!(/^(\w+::)*/, '') klass.downcase end
false
Other
Homebrew
brew
71f85300b4da4a1e3bd161646a7cd91fb1436734.json
Establish a convention for Requirement names The name attribute of requirements is used when generating options for the :optional and :recommended dependency tags. Unless otherwise specified, the name attribute of a Requirement will be populated by stripping any module prefixes from the beginning and "Dependency" or ...
Library/Homebrew/dependency_collector.rb
@@ -85,9 +85,9 @@ def parse_symbol_spec spec, tag Dependency.new(spec.to_s, tag) when :x11 then X11Dependency.new(spec.to_s, tag) when :xcode then XcodeDependency.new(tag) - when :mysql then MysqlInstalled.new(tag) - when :postgresql then PostgresqlInstalled.new(tag) - when :t...
true
Other
Homebrew
brew
71f85300b4da4a1e3bd161646a7cd91fb1436734.json
Establish a convention for Requirement names The name attribute of requirements is used when generating options for the :optional and :recommended dependency tags. Unless otherwise specified, the name attribute of a Requirement will be populated by stripping any module prefixes from the beginning and "Dependency" or ...
Library/Homebrew/requirement.rb
@@ -13,6 +13,7 @@ class Requirement def initialize(*tags) @tags = tags.flatten.compact @tags << :build if self.class.build + @name ||= infer_name end # The message to show when the requirement is not met. @@ -55,6 +56,13 @@ def hash private + def infer_name + klass = self.class.to_s +...
true
Other
Homebrew
brew
71f85300b4da4a1e3bd161646a7cd91fb1436734.json
Establish a convention for Requirement names The name attribute of requirements is used when generating options for the :optional and :recommended dependency tags. Unless otherwise specified, the name attribute of a Requirement will be populated by stripping any module prefixes from the beginning and "Dependency" or ...
Library/Homebrew/requirements.rb
@@ -253,7 +253,7 @@ def message; <<-EOS.undent end end -class MysqlInstalled < Requirement +class MysqlDependency < Requirement fatal true satisfy { which 'mysql_config' } @@ -274,7 +274,7 @@ def message; <<-EOS.undent end end -class PostgresqlInstalled < Requirement +class PostgresqlDependency < Re...
true
Other
Homebrew
brew
71f85300b4da4a1e3bd161646a7cd91fb1436734.json
Establish a convention for Requirement names The name attribute of requirements is used when generating options for the :optional and :recommended dependency tags. Unless otherwise specified, the name attribute of a Requirement will be populated by stripping any module prefixes from the beginning and "Dependency" or ...
Library/Homebrew/test/test_requirement.rb
@@ -92,4 +92,12 @@ def test_dsl_build req = Class.new(Requirement) { build true }.new assert req.build? end + + def test_infer_name_from_class + klass, const = self.class, :FooRequirement + klass.const_set(const, Class.new(Requirement)) + assert_equal "foo", klass.const_get(const).new.name + ens...
true
Other
Homebrew
brew
a63fa4356a9901f6c141811cbfdeb132b19e201d.json
Remove dead code This code only existed to support very old formula syntax, which was otherwise removed in e6b97bebd99779b52462dcd387191d804fc95b93.
Library/Homebrew/formula.rb
@@ -698,11 +698,7 @@ def build @build ||= BuildOptions.new(ARGV.options_only) end - def url val=nil, specs={} - if val.nil? - return @stable.url if @stable - return @url if @url - end + def url val, specs={} @stable ||= SoftwareSpec.new @stable.url(val, specs) ...
false
Other
Homebrew
brew
248891fde17ec66751b460dfc2137ba9fb819395.json
Avoid nil in URL specs
Library/Homebrew/download_strategy.rb
@@ -4,13 +4,7 @@ class AbstractDownloadStrategy def initialize name, package @url = package.url - @specs = package.specs - - case @specs - when Hash - @spec = @specs.keys.first # only use first spec - @ref = @specs.values.first - end + @spec, @ref = package.specs.dup.shift end ...
true
Other
Homebrew
brew
248891fde17ec66751b460dfc2137ba9fb819395.json
Avoid nil in URL specs
Library/Homebrew/formula.rb
@@ -698,7 +698,7 @@ def build @build ||= BuildOptions.new(ARGV.options_only) end - def url val=nil, specs=nil + def url val=nil, specs={} if val.nil? return @stable.url if @stable return @url if @url @@ -724,7 +724,7 @@ def devel &block @devel.instance_eval(&block) ...
true
Other
Homebrew
brew
248891fde17ec66751b460dfc2137ba9fb819395.json
Avoid nil in URL specs
Library/Homebrew/formula_support.rb
@@ -9,6 +9,7 @@ def initialize url=nil, version=nil @url = url @version = version @mirrors = [] + @specs = {} end def download_strategy @@ -42,13 +43,11 @@ def #{cksum}(val=nil) } end - def url val=nil, specs=nil + def url val=nil, specs={} return @url if val.nil? @url = ...
true
Other
Homebrew
brew
248891fde17ec66751b460dfc2137ba9fb819395.json
Avoid nil in URL specs
Library/Homebrew/test/test_formula.rb
@@ -82,9 +82,9 @@ def test_formula_specs assert_equal 'file:///foo.com/testball-0.2.tbz', f.devel.url assert_equal 'https://github.com/mxcl/homebrew.git', f.head.url - assert_nil f.stable.specs - assert_nil f.bottle.specs - assert_nil f.devel.specs + assert_empty f.stable.specs + assert_empty...
true
Other
Homebrew
brew
7b8f4b3d19bd2f27096fe0d7b15666abc7072e2f.json
kill dead code
Library/Homebrew/download_strategy.rb
@@ -596,8 +596,6 @@ def self.detect(url, strategy=nil) end end - private - def self.detect_from_url(url) case url # We use a special URL pattern for cvs
false
Other
Homebrew
brew
8e2b8c1419c7c95274dae4e012a1068301676ffd.json
CurlDownloadStrategy: remove pointless type introspection
Library/Homebrew/download_strategy.rb
@@ -73,23 +73,20 @@ def fetch unless @tarball_path.exist? begin _fetch - rescue Exception => e - if e.kind_of? ErrorDuringExecution - raise CurlDownloadStrategyError, "Download failed: #{@url}" - else - raise - end + rescue ErrorDuringExecution + ...
false
Other
Homebrew
brew
b38d555030ea8c09fd3fd0bba9c11f458908ec99.json
Fix Regexp encoding under 1.9/2.0
Library/Homebrew/extend/pathname.rb
@@ -179,18 +179,15 @@ def compression_type # Get enough of the file to detect common file types # POSIX tar magic has a 257 byte offset - magic_bytes = nil - File.open(self) { |f| magic_bytes = f.read(262) } - # magic numbers stolen from /usr/share/file/magic/ - case magic_bytes - when /^PK...
false
Other
Homebrew
brew
12d2900231a53f1f886736eb038e63e72822ef5d.json
Show permission changes in debug mode
Library/Homebrew/cleaner.rb
@@ -52,13 +52,12 @@ def clean_file_permissions path else 0444 end - # Uncomment this block to show permission changes using brew install -v - # if ARGV.verbose? - # old_perms = path.stat.mode - # if perms != old_perms - # puts "Fixing #{path} permissions from #{old_perms.to_s(8)}...
false
Other
Homebrew
brew
cf82e190900f4309ea0f81afcee8c3f8d9691711.json
ConflictRequirement: pass argument to superclass initalizer
Library/Homebrew/requirements.rb
@@ -219,7 +219,7 @@ def initialize formula, name, opts={} @formula = formula @name = name @opts = opts - super() + super(formula) end def message
false
Other
Homebrew
brew
551005acdb9ed1aa2e5b9befcfa0f741ad71e27d.json
Revert "brew: use a shell wrapper script for brew" This reverts commit 225546a3ee2d3f22e185e47d4db6f6716a56669b.
bin/brew
@@ -1,14 +0,0 @@ -#!/bin/sh - -THIS_FILE="$0" -[ -n "$(readlink $THIS_FILE)" ] && THIS_FILE=$(readlink $THIS_FILE) - -BREW_DIRECTORY=$(dirname "$THIS_FILE")/../Library -BREW_SYSTEM=$(uname -s | tr "[:upper:]" "[:lower:]") - -if [ "$BREW_SYSTEM" = "darwin" ] -then - exec "$BREW_DIRECTORY/brew.rb" "$@" -else - exec ruby ...
false
Other
Homebrew
brew
d547102253d21f11e2ab772c282f96945928c1fa.json
debrew: restore ARGV even when IRB.setup raises
Library/Homebrew/debrew/irb.rb
@@ -6,9 +6,12 @@ module IRB def IRB.start_within(binding) unless @setup_done # make IRB ignore our command line arguments - saved_args = ARGV.shift(ARGV.size) - IRB.setup(nil) - ARGV.concat(saved_args) + begin + saved_args = ARGV.shift(ARGV.size) + IRB.setup(nil) + ...
false
Other
Homebrew
brew
faa066b109c937aae242c58b6d915925c23dbdf4.json
brew: use a shell wrapper script for brew This allows us to force using the system Ruby on OSX but allow the development of Homebrew for Linux or Windows to not rely on OSX paths. Closes Homebrew/homebrew#17548.
bin/brew
@@ -0,0 +1,14 @@ +#!/bin/sh + +THIS_FILE="$0" +[ -n "$(readlink $THIS_FILE)" ] && THIS_FILE=$(readlink $THIS_FILE) + +BREW_DIRECTORY=$(dirname "$THIS_FILE")/../Library +BREW_SYSTEM=$(uname -s | tr "[:upper:]" "[:lower:]") + +if [ "$BREW_SYSTEM" = "darwin" ] +then + exec "$BREW_DIRECTORY/brew.rb" "$@" +else + exec ruby ...
false
Other
Homebrew
brew
0b425178ec51c076b0acddd7f38b3cc2302dfccd.json
Reduce footprint of readline hack
Library/Homebrew/debrew.rb
@@ -1,23 +1,18 @@ -def can_use_readline? - not ENV['HOMEBREW_NO_READLINE'] -end - require 'debrew/menu' require 'debrew/raise_plus' -require 'debrew/irb' if can_use_readline? - -class Object - include RaisePlus -end -def has_debugger? +unless ENV['HOMEBREW_NO_READLINE'] begin require 'rubygems' requi...
false
Other
Homebrew
brew
603bcb6cc80c3a725868766a8ee3a9a7b284d56d.json
audit: allow alpha.gnu.org URLs
Library/Homebrew/cmd/audit.rb
@@ -185,7 +185,7 @@ def audit_urls urls = [(f.stable.url rescue nil), (f.devel.url rescue nil), (f.head.url rescue nil)].compact # Check GNU urls; doesn't apply to mirrors - if urls.any? { |p| p =~ %r[^(https?|ftp)://(.+)/gnu/] } + if urls.any? { |p| p =~ %r[^(https?|ftp)://(?!alpha).+/gnu/] } ...
false
Other
Homebrew
brew
ba2717fb19c0cb74b1bbda979a995a33611fad50.json
Version: remove pointless private call
Library/Homebrew/version.rb
@@ -91,18 +91,16 @@ def to_s end alias_method :to_str, :to_s - def self.parse spec - version = _parse(spec) - Version.new(version, true) unless version.nil? - end - protected def to_a @array ||= @version.scan(/\d+|[a-zA-Z]+/).map { |e| VersionElement.new(e) } end - private + def self...
false
Other
Homebrew
brew
15562c8876f5ad8acbe8a73516e60e3bdda3c3af.json
Version: kill silly class method Overriding <=> directly is much simpler.
Library/Homebrew/version.rb
@@ -188,13 +188,6 @@ def self._parse spec m = /\.v(\d+[a-z]?)/.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 @@ -220,13 +213,14 @@ ...
false
Other
Homebrew
brew
45158034740e259b0cec619c25f34d528685b78e.json
Add tests for raise monkey patch
Library/Homebrew/debrew/raise_plus.rb
@@ -11,6 +11,8 @@ def restart(&block) module RaisePlus alias :original_raise :raise + private + def raise(*args) exception = case when args.size == 0
true
Other
Homebrew
brew
45158034740e259b0cec619c25f34d528685b78e.json
Add tests for raise monkey patch
Library/Homebrew/test/test_raise_plus.rb
@@ -0,0 +1,45 @@ +require 'testing_env' +require 'debrew/raise_plus' + +class RaisePlusTests < Test::Unit::TestCase + include RaisePlus + + def test_raises_runtime_error_when_no_args + assert_raises(RuntimeError) { raise } + end + + def test_raises_runtime_error_with_string_arg + raise "foo" + rescue Excepti...
true
Other
Homebrew
brew
1283bd8381795d76f5a2539954c466f9a4de4e52.json
xcrun: remove suggestion that doesn't work Closes Homebrew/homebrew#17443.
Library/ENV/4.3/xcrun
@@ -25,7 +25,6 @@ try "/usr/bin/#{arg0}" abort <<-EOS Your Xcode and or CLT are mis-configured. Try some or all of the following: - xcrun --kill-cache xcodebuild -license sudo xcode-select -switch /path/to/Xcode.app EOS
false
Other
Homebrew
brew
bad80d58f9bafc5ab80d7b1062712ce60a8f9eff.json
Architecture: add flag for ppc support
Library/Homebrew/mach.rb
@@ -3,6 +3,10 @@ def universal? self.include? :i386 and self.include? :x86_64 end + def ppc? + self.include? :ppc7400 or self.include? :ppc64 + end + def remove_ppc! self.delete :ppc7400 self.delete :ppc64
false
Other
Homebrew
brew
82ecc01ac0944e1c9071352b2ef2f3b4fcb36d6c.json
Fix typo in XQuartz comment
Library/Homebrew/macos/xquartz.rb
@@ -40,7 +40,7 @@ def provided_by_apple? end # This should really be private, but for compatibility reasons it must - # remain public. New code should use MacOS::XQuartz.{bin,lib,include} + # remain public. New code should use MacOS::X11.{bin,lib,include} # instead, as that accounts for Xcode-only systems....
false
Other
Homebrew
brew
ea15442b9a9d594f8e62923473ff738f921b46bc.json
Move ruby methods to FileUtils extension
Library/Homebrew/extend/fileutils.rb
@@ -81,4 +81,13 @@ def copy_metadata(path) end end + RUBY_BIN = '/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin' + + def rake *args + system "#{RUBY_BIN}/rake", *args + end + + def ruby *args + system "#{RUBY_BIN}/ruby", *args + end end
true
Other
Homebrew
brew
ea15442b9a9d594f8e62923473ff738f921b46bc.json
Move ruby methods to FileUtils extension
Library/Homebrew/formula.rb
@@ -289,18 +289,6 @@ def std_cmake_args ] end - def ruby_bin - '/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin' - end - - def rake *args - system "#{ruby_bin}/rake", *args - end - - def ruby *args - system "#{ruby_bin}/ruby", *args - end - def self.class_s name #remove i...
true
Other
Homebrew
brew
2dac10a71146d44cfa8dd985a9187ed5384d9e7f.json
Fix args to ruby method
Library/Homebrew/formula.rb
@@ -297,7 +297,7 @@ def rake *args system "#{ruby_bin}/rake", *args end - def ruby + def ruby *args system "#{ruby_bin}/ruby", *args end
false
Other
Homebrew
brew
3957a35c338c029512621b78a4b65c3ecdee22bc.json
audit: inspect dep name, not dep object
Library/Homebrew/cmd/audit.rb
@@ -133,7 +133,7 @@ def audit_deps begin dep_f = dep.to_formula rescue - problem "Can't find dependency #{dep.inspect}." + problem "Can't find dependency #{dep.name.inspect}." end dep.options.reject do |opt|
false
Other
Homebrew
brew
c166ce3f581bda226b8fde4852dcf5775255d713.json
Move MD5 deprecation warning into Pathname#md5 This way it will print when the verification takes place, making it a bit more obvious which formula it refers to.
Library/Homebrew/compat/compatibility.rb
@@ -265,10 +265,6 @@ def md5(val=nil) if val.nil? @checksum if checksum.nil? or @checksum.hash_type == :md5 else - opoo <<-EOS.undent - MD5 support is deprecated and will be removed in a future version. - Please switch this formula to #{Checksum::TYPES.map { |t| t.to_s.upcase } * ' or '}...
false
Other
Homebrew
brew
fba1d2129b87ebd1c1f801851205443b9dec79e0.json
build: accept X11 proxies as X11 deps
Library/Homebrew/build.rb
@@ -84,7 +84,7 @@ def install f if superenv? ENV.deps = keg_only_deps.map(&:to_s) ENV.all_deps = f.recursive_dependencies.map(&:to_s) - ENV.x11 = f.recursive_requirements.detect{|rq| rq.class == X11Dependency } + ENV.x11 = f.recursive_requirements.detect { |rq| rq.kind_of?(X11Dependency) } ENV.s...
false
Other
Homebrew
brew
c5f73a01bec87f6c4d3c6b29676b82cc922187af.json
Update documentation for Dependency.expand
Library/Homebrew/dependency.rb
@@ -54,11 +54,11 @@ def universal! tags << 'universal' if to_formula.build.has_option? 'universal' end - # Expand the dependencies of f recursively, optionally yielding - # [f, dep] to allow callers to apply arbitrary filters to the list. - # The default filter, which is used when a block is not supplied, ...
false
Other
Homebrew
brew
9ba9e749b81b4275dc1e530422582b9f1ee73ee9.json
Remove MD5 support. Closes Homebrew/homebrew#17317.
Library/Contributions/cmds/brew-md5-to-sha1
@@ -1,24 +0,0 @@ -#!/bin/sh -# Change every formula's MD5 to a SHA1. - -HOMEBREW_PREFIX=$(brew --config | grep HOMEBREW_PREFIX | sed -e 's/HOMEBREW_PREFIX: //') -cd $HOMEBREW_PREFIX/Library/Formula -FORMULAE=$(grep "^ md5 " -rl . | sed -e 's/\.\///' -e 's/\.rb$//') - -for FORMULA in $FORMULAE -do - echo "Fetching and ...
true
Other
Homebrew
brew
9ba9e749b81b4275dc1e530422582b9f1ee73ee9.json
Remove MD5 support. Closes Homebrew/homebrew#17317.
Library/Homebrew/checksums.rb
@@ -1,7 +1,7 @@ class Checksum attr_reader :hash_type, :hexdigest - TYPES = [:md5, :sha1, :sha256] + TYPES = [:sha1, :sha256] def initialize type=:sha1, val=nil @hash_type = type
true
Other
Homebrew
brew
9ba9e749b81b4275dc1e530422582b9f1ee73ee9.json
Remove MD5 support. Closes Homebrew/homebrew#17317.
Library/Homebrew/cmd/audit.rb
@@ -244,13 +244,10 @@ def audit_specs next if cksum.nil? len = case cksum.hash_type - when :md5 then 32 when :sha1 then 40 when :sha256 then 64 end - problem "md5 is broken, deprecated: use sha1 instead" if cksum.hash_type == :md5 - if cksum.empty? ...
true
Other
Homebrew
brew
9ba9e749b81b4275dc1e530422582b9f1ee73ee9.json
Remove MD5 support. Closes Homebrew/homebrew#17317.
Library/Homebrew/extend/pathname.rb
@@ -216,11 +216,6 @@ def incremental_hash(hasher) incr_hash.hexdigest end - def md5 - require 'digest/md5' - incremental_hash(Digest::MD5) - end - def sha1 require 'digest/sha1' incremental_hash(Digest::SHA1)
true
Other
Homebrew
brew
9ba9e749b81b4275dc1e530422582b9f1ee73ee9.json
Remove MD5 support. Closes Homebrew/homebrew#17317.
Library/Homebrew/test/test_checksums.rb
@@ -12,24 +12,6 @@ def bad_checksum f end end - def test_md5 - valid_md5 = TestBall.new - valid_md5.stable.instance_eval do - md5 '060844753f2a3b36ecfc3192d307dab2' - end - - good_checksum valid_md5 - end - - def test_badmd5 - invalid_md5 = TestBall.new - invalid_md5.stable.instance_...
true
Other
Homebrew
brew
9ba9e749b81b4275dc1e530422582b9f1ee73ee9.json
Remove MD5 support. Closes Homebrew/homebrew#17317.
Library/Homebrew/test/test_formula.rb
@@ -110,11 +110,8 @@ def test_formula_specs assert_match /[0-9a-fA-F]{40}/, f.stable.checksum.hexdigest assert_match /[0-9a-fA-F]{64}/, f.devel.checksum.hexdigest - assert_nil f.stable.md5 assert_nil f.stable.sha256 - assert_nil f.bottle.md5 assert_nil f.bottle.sha256 - assert_nil f.devel...
true
Other
Homebrew
brew
1bc460403bc690460eac6da739e50321642d5754.json
Make local bottle installation more robust. Use versions to better get hold of the filename.
Library/Homebrew/formula.rb
@@ -394,7 +394,8 @@ def self.factory name install_type = :from_url elsif name.match bottle_regex bottle_filename = Pathname(name).realpath - name = bottle_filename.basename.to_s.rpartition('-').first + version = Version.parse(bottle_filename).to_s + name = bottle_filename.basename.to_s...
false
Other
Homebrew
brew
eec8cc6a12b6676e8a8da3a7cced4547d8bd3c8b.json
jpeg: support version format.
Library/Homebrew/test/test_versions.rb
@@ -243,6 +243,10 @@ def test_apache_version_style assert_version_detected '1.2.0-rc2', 'http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.0/apache-cassandra-1.2.0-rc2-bin.tar.gz' end + def test_jpeg_style + assert_version_detected '8d', 'http://www.ijg.org/files/jpegsrc.v8d.tar.gz' + end + # d...
true
Other
Homebrew
brew
eec8cc6a12b6676e8a8da3a7cced4547d8bd3c8b.json
jpeg: support version format.
Library/Homebrew/version.rb
@@ -183,6 +183,10 @@ def self._parse spec # e.g. http://mirrors.jenkins-ci.org/war/1.486/jenkins.war m = /\/(\d\.\d+)\//.match(spec.to_s) return m.captures.first unless m.nil? + + # e.g. http://www.ijg.org/files/jpegsrc.v8d.tar.gz + m = /\.v(\d+[a-z]?)/.match(stem) + return m.captures.first unle...
true
Other
Homebrew
brew
1fbc32d8423f0518f295f1fa4e7485b7db4600ff.json
brew-help: Add options to example usage Also, move the line containing `info`, `home` and `options` to the top of the list as users should be running these before installation. Ref. Homebrew/homebrew#13224.
Library/Homebrew/cmd/help.rb
@@ -1,12 +1,12 @@ HOMEBREW_HELP = <<-EOS Example usage: + brew [info | home | options ] [FORMULA...] brew install FORMULA... brew uninstall FORMULA... brew search [foo] brew list [FORMULA...] brew update brew upgrade [FORMULA...] - brew [info | home] [FORMULA...] Troubleshooting: brew doctor
false
Other
Homebrew
brew
8ccda70344f5b19b4781a7e48b3dbf4ba2641d15.json
Improve the explanation of the verbose flags. Closes Homebrew/homebrew#17181.
Library/Contributions/manpages/brew.1.md
@@ -15,7 +15,8 @@ didn't include with OS X. For the full command list, see the COMMANDS section. -With `--verbose`, many commands print extra debugging information. +With `--verbose` or `-v`, many commands print extra debugging information. +Note that these flags should only appear after a command. * `install...
true
Other
Homebrew
brew
8ccda70344f5b19b4781a7e48b3dbf4ba2641d15.json
Improve the explanation of the verbose flags. Closes Homebrew/homebrew#17181.
share/man/man1/brew.1
@@ -19,7 +19,10 @@ Homebrew is the easiest and most flexible way to install the UNIX tools Apple di For the full command list, see the COMMANDS section\. . .P -With \fB\-\-verbose\fR, many commands print extra debugging information\. +With \fB\-\-verbose\fR or \fB\-v\fR, many commands print extra debugging informati...
true
Other
Homebrew
brew
599b012702127b821826d3e9f5c5f5521b82fd16.json
Add pour_bottle? method to Formula. Allows a formula to selectively disable bottle pouring. e.g. the default Boost bottle does not work with a brewed Python. Fixes Homebrew/homebrew#17142
Library/Homebrew/bottles.rb
@@ -15,6 +15,7 @@ def install_bottle? f and f.downloader.local_bottle_path not ARGV.build_from_source? \ and MacOS.bottles_supported? \ + and f.pour_bottle? \ and f.build.used_options.empty? \ and bottle_current?(f) end
true
Other
Homebrew
brew
599b012702127b821826d3e9f5c5f5521b82fd16.json
Add pour_bottle? method to Formula. Allows a formula to selectively disable bottle pouring. e.g. the default Boost bottle does not work with a brewed Python. Fixes Homebrew/homebrew#17142
Library/Homebrew/formula.rb
@@ -162,6 +162,13 @@ def cached_download @downloader.cached_location end + # Can be overridden to selectively disable bottles from formulae. + # Defaults to true so overridden version does not have to check if bottles + # are supported. + def pour_bottle? + true + end + # tell the user about any ca...
true
Other
Homebrew
brew
667abe8185ab2af150a8cd79f00a56a6b95f52ad.json
Update clang version regexp in CLT check
Library/Homebrew/macos/xcode.rb
@@ -164,7 +164,7 @@ def installed? end def latest_version? - `/usr/bin/clang -v 2>&1` =~ %r{tags/Apple/clang-(\d+)\.(\d+)\.(\d+)} + `/usr/bin/clang --version` =~ %r{clang-(\d+)\.(\d+)\.(\d+)} $1.to_i >= 425 and $3.to_i >= 24 end
false
Other
Homebrew
brew
0a7d2b82b4156d3e429216013ba26465612099ac.json
remove vim from the blacklist
Library/Homebrew/blacklist.rb
@@ -1,6 +1,6 @@ def blacklisted? name case name.downcase - when /^vim?$/, 'screen', /^rubygems?$/ then <<-EOS.undent + when 'screen', /^rubygems?$/ then <<-EOS.undent Apple distributes #{name} with OS X, you can find it in /usr/bin. EOS when 'libarchive', 'libpcap' then <<-EOS.undent
false
Other
Homebrew
brew
35394ad584f2c7659b53175178144ea533fea8b2.json
Fix clang version detection on Xcode 4.6+
Library/Homebrew/macos.rb
@@ -127,14 +127,14 @@ def llvm_build_version def clang_version @clang_version ||= if locate("clang") - `#{locate("clang")} --version` =~ /clang version (\d\.\d)/ + `#{locate("clang")} --version` =~ /(?:clang|LLVM) version (\d\.\d)/ $1 end end def clang_build_version @clang_b...
false
Other
Homebrew
brew
246b60573f8726e9304e263d13bcfe1095704645.json
Fix compiler map key
Library/Homebrew/macos.rb
@@ -192,7 +192,7 @@ def prefer_64_bit? "4.5" => { :llvm_build => 2336, :clang => "4.1", :clang_build => 421 }, "4.5.1" => { :llvm_build => 2336, :clang => "4.1", :clang_build => 421 }, "4.5.2" => { :llvm_build => 2336, :clang => "4.1", :clang_build => 421 }, - "4.6.0" => { :llvm_build => 2336, :clan...
false
Other
Homebrew
brew
667b53ffb0702183a76274ed9f4a590344efdc5e.json
doctor: fix transposed git command Closes Homebrew/homebrew#17338. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/cmd/doctor.rb
@@ -746,7 +746,7 @@ def check_for_git_origin Without a correctly configured origin, Homebrew won't update properly. You can solve this by adding the Homebrew remote: cd #{HOMEBREW_REPOSITORY} - git add remote origin https://github.com/mxcl/homebrew.git + git remote add origin https:...
false
Other
Homebrew
brew
5ac4e4f0714ffb364ac528d1a9b6697ae1693bf6.json
upgrade: use standard Tab accessor Yes, the formula object does refer to a version that has not yet been installed, but we were not looking into Formula#prefix, but #linked_keg, which is version agnostic (since the original patch was committed, we Tab#for_formula learned to look into #opt_prefix as well). The rest of ...
Library/Homebrew/cmd/upgrade.rb
@@ -43,10 +43,7 @@ def upgrade end def upgrade_formula f - # Generate using `for_keg` since the formula object points to a newer version - # that doesn't exist yet. Use `opt_prefix` to guard against keg-only installs. - # Also, guard against old installs that may not have an `opt_prefix` symlink. - ...
false
Other
Homebrew
brew
18836d93d8f9f99c1e4d4fbaf9843e9f223f1742.json
uses: utilize modern dependency API
Library/Homebrew/cmd/uses.rb
@@ -12,20 +12,17 @@ def uses uses = Formula.select do |f| ARGV.formulae.all? do |ff| if ARGV.flag? '--recursive' - f.recursive_deps.include? ff + f.recursive_dependencies.any? { |dep| dep.name == ff.name } else - f.deps.include? ff + f.deps.any? { |dep| ...
false
Other
Homebrew
brew
fe802f05ef60118b67a6999e3eb2c17fdef08645.json
missing: ignore unused optional and recommended deps
Library/Homebrew/cmd/doctor.rb
@@ -872,7 +872,7 @@ def check_tmpdir def check_missing_deps return unless HOMEBREW_CELLAR.exist? s = Set.new - Homebrew.missing_deps(Homebrew.installed_brews).each do |_, deps| + Homebrew.missing_deps(Formula.installed).each do |_, deps| s.merge deps end
true
Other
Homebrew
brew
fe802f05ef60118b67a6999e3eb2c17fdef08645.json
missing: ignore unused optional and recommended deps
Library/Homebrew/cmd/missing.rb
@@ -1,21 +1,21 @@ require 'formula' +require 'tab' module Homebrew extend self - def installed_brews - formulae = [] - HOMEBREW_CELLAR.subdirs.each do |rack| - f = Formula.factory rack.basename.to_s rescue nil - formulae << f if f and f.rack.exist? and f.rack.subdirs.length > 0 - end - formul...
true
Other
Homebrew
brew
cf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129.json
FormulaInstaller: construct new ARGV from an Options collection The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to...
Library/Homebrew/build_options.rb
@@ -7,7 +7,7 @@ class BuildOptions include Enumerable def initialize args - @args = Array.new(args).extend(HomebrewArgvExtension) + @args = Options.coerce(args) @options = Options.new end @@ -37,7 +37,7 @@ def as_flags end def include? name - @args.include? '--' + name + args.inclu...
true
Other
Homebrew
brew
cf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129.json
FormulaInstaller: construct new ARGV from an Options collection The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to...
Library/Homebrew/dependencies.rb
@@ -138,7 +138,7 @@ def recommended? end def options - Options.new((tags - RESERVED_TAGS).map { |o| Option.new(o) }) + Options.coerce(tags - RESERVED_TAGS) end end
true
Other
Homebrew
brew
cf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129.json
FormulaInstaller: construct new ARGV from an Options collection The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to...
Library/Homebrew/formula.rb
@@ -690,7 +690,7 @@ def #{cksum}(val=nil) end def build - @build ||= BuildOptions.new(ARGV) + @build ||= BuildOptions.new(ARGV.options_only) end def url val=nil, specs=nil
true
Other
Homebrew
brew
cf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129.json
FormulaInstaller: construct new ARGV from an Options collection The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to...
Library/Homebrew/formula_installer.rb
@@ -17,7 +17,7 @@ def initialize ff @f = ff @show_header = false @ignore_deps = ARGV.ignore_deps? || ARGV.interactive? - @options = [] + @options = Options.new @@attempted ||= Set.new @@ -247,6 +247,17 @@ def build_time @build_time ||= Time.now - @start_time unless pour_bottle? or ARG...
true
Other
Homebrew
brew
cf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129.json
FormulaInstaller: construct new ARGV from an Options collection The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to...
Library/Homebrew/options.rb
@@ -4,9 +4,8 @@ class Option attr_reader :name, :description, :flag def initialize(name, description=nil) - @name = name.to_s[/^(?:--)?(.+)$/, 1] + @name, @flag = split_name(name) @description = description.to_s - @flag = "--#{@name}" end def to_s @@ -29,6 +28,19 @@ def eql?(other) def ...
true
Other
Homebrew
brew
cf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129.json
FormulaInstaller: construct new ARGV from an Options collection The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to...
Library/Homebrew/tab.rb
@@ -77,11 +77,11 @@ def universal? end def used_options - Options.new(super.map { |o| Option.new(o) }) + Options.coerce(super) end def unused_options - Options.new(super.map { |o| Option.new(o) }) + Options.coerce(super) end def options
true
Other
Homebrew
brew
cf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129.json
FormulaInstaller: construct new ARGV from an Options collection The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to...
Library/Homebrew/test/test_build_options.rb
@@ -3,7 +3,7 @@ class BuildOptionsTests < Test::Unit::TestCase def setup - args = %w{--with-foo --with-bar --without-qux}.extend(HomebrewArgvExtension) + args = %w{--with-foo --with-bar --without-qux} @build = BuildOptions.new(args) @build.add("with-foo") @build.add("with-bar")
true
Other
Homebrew
brew
cf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129.json
FormulaInstaller: construct new ARGV from an Options collection The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to...
Library/Homebrew/test/test_options.rb
@@ -38,6 +38,12 @@ def test_description assert_empty @option.description assert_equal "foo", Option.new("foo", "foo").description end + + def test_preserves_short_options + option = Option.new("-d") + assert_equal "-d", option.flag + assert_equal "d", option.name + end end class OptionsTests...
true
Other
Homebrew
brew
046d802d0994be84802c6c50b6336b27b6d8ddd5.json
FormulaInstaller: allow formulae to pass options to deps Formulae can now pass build options to dependencies. The following syntax is supported: depends_on 'foo' => 'with-bar' depends_on 'foo' => ['with-bar', 'with-baz'] If a dependency is already installed but lacks the required build options, an exception is r...
Library/Homebrew/build_options.rb
@@ -3,7 +3,7 @@ # This class holds the build-time options defined for a Formula, # and provides named access to those options during install. class BuildOptions - attr_writer :args + attr_accessor :args include Enumerable def initialize args
true
Other
Homebrew
brew
046d802d0994be84802c6c50b6336b27b6d8ddd5.json
FormulaInstaller: allow formulae to pass options to deps Formulae can now pass build options to dependencies. The following syntax is supported: depends_on 'foo' => 'with-bar' depends_on 'foo' => ['with-bar', 'with-baz'] If a dependency is already installed but lacks the required build options, an exception is r...
Library/Homebrew/dependencies.rb
@@ -138,7 +138,7 @@ def recommended? end def options - tags.reject { |tag| RESERVED_TAGS.include? tag }.map { |tag| '--'+tag.to_s } + Options.new((tags - RESERVED_TAGS).map { |o| Option.new(o) }) end end @@ -171,13 +171,24 @@ def hash end def to_formula - Formula.factory(name) + f = Fo...
true
Other
Homebrew
brew
046d802d0994be84802c6c50b6336b27b6d8ddd5.json
FormulaInstaller: allow formulae to pass options to deps Formulae can now pass build options to dependencies. The following syntax is supported: depends_on 'foo' => 'with-bar' depends_on 'foo' => ['with-bar', 'with-baz'] If a dependency is already installed but lacks the required build options, an exception is r...
Library/Homebrew/formula_installer.rb
@@ -8,6 +8,7 @@ class FormulaInstaller attr :f attr :tab, true + attr :options, true attr :show_summary_heading, true attr :ignore_deps, true attr :show_header, true @@ -116,20 +117,6 @@ def check_requirements end end - def dep_needed? dep - dep_f = dep.to_formula - if dep_f.installed?...
true
Other
Homebrew
brew
046d802d0994be84802c6c50b6336b27b6d8ddd5.json
FormulaInstaller: allow formulae to pass options to deps Formulae can now pass build options to dependencies. The following syntax is supported: depends_on 'foo' => 'with-bar' depends_on 'foo' => ['with-bar', 'with-baz'] If a dependency is already installed but lacks the required build options, an exception is r...
Library/Homebrew/test/test_dependency.rb
@@ -1,5 +1,6 @@ require 'testing_env' require 'dependencies' +require 'options' class DependableTests < Test::Unit::TestCase def setup @@ -8,7 +9,7 @@ def setup end def test_options - assert_equal %w{--foo --bar}.sort, @dep.options.sort + assert_equal %w{--foo --bar}.sort, @dep.options.as_flags.so...
true
Other
Homebrew
brew
046d802d0994be84802c6c50b6336b27b6d8ddd5.json
FormulaInstaller: allow formulae to pass options to deps Formulae can now pass build options to dependencies. The following syntax is supported: depends_on 'foo' => 'with-bar' depends_on 'foo' => ['with-bar', 'with-baz'] If a dependency is already installed but lacks the required build options, an exception is r...
Library/Homebrew/test/test_dependency_collector.rb
@@ -1,5 +1,6 @@ require 'testing_env' require 'dependencies' +require 'options' require 'extend/set' module DependencyCollectorTestExtension
true
Other
Homebrew
brew
6193167f5878bbc09b3417dc2b836be3b10d5b1e.json
Add support for optional and recommended deps Optional deps are not installed by default but generate a corresponding "with-foo" option for the formula. Recommended deps _are_ installed by default, and generate a corresponding "without-foo" option.
Library/Homebrew/build_options.rb
@@ -40,6 +40,20 @@ def include? name @args.include? '--' + name end + def with? name + if has_option? "with-#{name}" + include? "with-#{name}" + elsif has_option? "without-#{name}" + not include? "without-#{name}" + else + false + end + end + + def without? name + not with? na...
true
Other
Homebrew
brew
6193167f5878bbc09b3417dc2b836be3b10d5b1e.json
Add support for optional and recommended deps Optional deps are not installed by default but generate a corresponding "with-foo" option for the formula. Recommended deps _are_ installed by default, and generate a corresponding "without-foo" option.
Library/Homebrew/formula.rb
@@ -829,6 +829,15 @@ def test &block # This method is called once by `factory` before creating any instances. # It allows the DSL to finalize itself, reducing complexity in the constructor. def finalize_dsl + # Synthesize options for optional dependencies + dependencies.deps.select(&:optional?)...
true
Other
Homebrew
brew
6193167f5878bbc09b3417dc2b836be3b10d5b1e.json
Add support for optional and recommended deps Optional deps are not installed by default but generate a corresponding "with-foo" option for the formula. Recommended deps _are_ installed by default, and generate a corresponding "without-foo" option.
Library/Homebrew/test/test_build_options.rb
@@ -27,6 +27,13 @@ def test_include assert !@build.include?("--with-foo") end + def test_with_without + assert @build.with?("foo") + assert @build.with?("bar") + assert @build.with?("baz") + assert @build.without?("qux") + end + def test_used_options assert @build.used_options.include?("...
true
Other
Homebrew
brew
37a56fa5133e287c765f70edbfc7753c8e8e27b3.json
FormulaInstaller: implement installation locks FormulaInstaller now attempts to take a lock on a "foo.brewing" file for the formula and all of its dependencies before attempting installation. The lock is an advisory lock implemented using flock(), and as such it only locks out other processes that attempt to take the...
Library/Homebrew/cmd/link.rb
@@ -35,8 +35,10 @@ def link next end - print "Linking #{keg}... " do - puts "#{keg.link(mode)} symlinks created" + keg.lock do + print "Linking #{keg}... " do + puts "#{keg.link(mode)} symlinks created" + end end end end
true
Other
Homebrew
brew
37a56fa5133e287c765f70edbfc7753c8e8e27b3.json
FormulaInstaller: implement installation locks FormulaInstaller now attempts to take a lock on a "foo.brewing" file for the formula and all of its dependencies before attempting installation. The lock is an advisory lock implemented using flock(), and as such it only locks out other processes that attempt to take the...
Library/Homebrew/cmd/uninstall.rb
@@ -7,10 +7,12 @@ def uninstall if not ARGV.force? ARGV.kegs.each do |keg| - puts "Uninstalling #{keg}..." - keg.unlink - keg.uninstall - rm_opt_link keg.fname + keg.lock do + puts "Uninstalling #{keg}..." + keg.unlink + keg.uninstall + ...
true
Other
Homebrew
brew
37a56fa5133e287c765f70edbfc7753c8e8e27b3.json
FormulaInstaller: implement installation locks FormulaInstaller now attempts to take a lock on a "foo.brewing" file for the formula and all of its dependencies before attempting installation. The lock is an advisory lock implemented using flock(), and as such it only locks out other processes that attempt to take the...
Library/Homebrew/cmd/unlink.rb
@@ -3,8 +3,10 @@ def unlink raise KegUnspecifiedError if ARGV.named.empty? ARGV.kegs.each do |keg| - print "Unlinking #{keg}... " - puts "#{keg.unlink} links removed" + keg.lock do + print "Unlinking #{keg}... " + puts "#{keg.unlink} links removed" + end end end en...
true
Other
Homebrew
brew
37a56fa5133e287c765f70edbfc7753c8e8e27b3.json
FormulaInstaller: implement installation locks FormulaInstaller now attempts to take a lock on a "foo.brewing" file for the formula and all of its dependencies before attempting installation. The lock is an advisory lock implemented using flock(), and as such it only locks out other processes that attempt to take the...
Library/Homebrew/exceptions.rb
@@ -45,6 +45,18 @@ def initialize name end end +class OperationInProgressError < RuntimeError + def initialize name + message = <<-EOS.undent + Operation already in progress for #{name} + Another active Homebrew process is already using #{name}. + Please wait for it to finish or terminate it to...
true
Other
Homebrew
brew
37a56fa5133e287c765f70edbfc7753c8e8e27b3.json
FormulaInstaller: implement installation locks FormulaInstaller now attempts to take a lock on a "foo.brewing" file for the formula and all of its dependencies before attempting installation. The lock is an advisory lock implemented using flock(), and as such it only locks out other processes that attempt to take the...
Library/Homebrew/formula.rb
@@ -228,6 +228,21 @@ def brew end end + def lock + lockpath = HOMEBREW_CACHE_FORMULA/"#{@name}.brewing" + @lockfile = lockpath.open(File::RDWR | File::CREAT) + unless @lockfile.flock(File::LOCK_EX | File::LOCK_NB) + raise OperationInProgressError, @name + end + end + + def unlock + unle...
true
Other
Homebrew
brew
37a56fa5133e287c765f70edbfc7753c8e8e27b3.json
FormulaInstaller: implement installation locks FormulaInstaller now attempts to take a lock on a "foo.brewing" file for the formula and all of its dependencies before attempting installation. The lock is an advisory lock implemented using flock(), and as such it only locks out other processes that attempt to take the...
Library/Homebrew/formula_installer.rb
@@ -22,6 +22,7 @@ def initialize ff, tab=nil @@attempted ||= Set.new + lock check_install_sanity end @@ -226,6 +227,8 @@ def finish print "#{f.prefix}: #{f.prefix.abv}" print ", built in #{pretty_duration build_time}" if build_time puts + + unlock if hold_locks? end def b...
true
Other
Homebrew
brew
37a56fa5133e287c765f70edbfc7753c8e8e27b3.json
FormulaInstaller: implement installation locks FormulaInstaller now attempts to take a lock on a "foo.brewing" file for the formula and all of its dependencies before attempting installation. The lock is an advisory lock implemented using flock(), and as such it only locks out other processes that attempt to take the...
Library/Homebrew/keg.rb
@@ -61,6 +61,18 @@ def fname parent.basename.to_s end + def lock + path = HOMEBREW_CACHE_FORMULA/"#{fname}.brewing" + file = path.open(File::RDWR | File::CREAT) + unless file.flock(File::LOCK_EX | File::LOCK_NB) + raise OperationInProgressError, fname + end + yield + ensure + file.flo...
true
Other
Homebrew
brew
5088fdd54324b9ab053794909aab05fa2d81454b.json
Move BuildOptions to a separate file
Library/Homebrew/build_options.rb
@@ -0,0 +1,74 @@ +require 'options' + +# This class holds the build-time options defined for a Formula, +# and provides named access to those options during install. +class BuildOptions + attr_writer :args + include Enumerable + + def initialize args + @args = Array.new(args).extend(HomebrewArgvExtension) + @o...
true
Other
Homebrew
brew
5088fdd54324b9ab053794909aab05fa2d81454b.json
Move BuildOptions to a separate file
Library/Homebrew/formula.rb
@@ -6,6 +6,7 @@ require 'patches' require 'compilers' require 'build_environment' +require 'build_options' require 'extend/set'
true
Other
Homebrew
brew
5088fdd54324b9ab053794909aab05fa2d81454b.json
Move BuildOptions to a separate file
Library/Homebrew/formula_support.rb
@@ -1,7 +1,6 @@ require 'download_strategy' require 'checksums' require 'version' -require 'options' class SoftwareSpec attr_reader :checksum, :mirrors, :specs @@ -161,76 +160,3 @@ def to_s end.strip end end - -# This class holds the build-time options defined for a Formula, -# and provides named acce...
true
Other
Homebrew
brew
26b1b88c974cc902b0e9c2c2b8d17a16335d8462.json
BuildOptions: check has_option? for universal and 32-bit
Library/Homebrew/formula_support.rb
@@ -248,14 +248,14 @@ def stable? # True if the user requested a universal build. def universal? - @args.include? '--universal' + @args.include?('--universal') && has_option?('universal') end # Request a 32-bit only build. # This is needed for some use-cases though we prefer to build Universal ...
false
Other
Homebrew
brew
f3d3bc436829b5e9212e052cec50cded80cea2df.json
Move option comparison into BuildOptions
Library/Homebrew/bottles.rb
@@ -15,7 +15,7 @@ def install_bottle? f and f.downloader.local_bottle_path not ARGV.build_from_source? \ and MacOS.bottles_supported? \ - and ARGV.used_options(f).empty? \ + and f.build.used_options.empty? \ and bottle_current?(f) end
true
Other
Homebrew
brew
f3d3bc436829b5e9212e052cec50cded80cea2df.json
Move option comparison into BuildOptions
Library/Homebrew/extend/ARGV.rb
@@ -7,14 +7,6 @@ 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
f3d3bc436829b5e9212e052cec50cded80cea2df.json
Move option comparison into BuildOptions
Library/Homebrew/formula_support.rb
@@ -185,6 +185,7 @@ def hash # This class holds the build-time options defined for a Formula, # and provides named access to those options during install. class BuildOptions + attr_writer :args include Enumerable def initialize args @@ -253,4 +254,12 @@ def universal? def build_32_bit? @args.include...
true
Other
Homebrew
brew
f3d3bc436829b5e9212e052cec50cded80cea2df.json
Move option comparison into BuildOptions
Library/Homebrew/tab.rb
@@ -10,14 +10,16 @@ class Tab < OpenStruct FILENAME = 'INSTALL_RECEIPT.json' def self.create f, args + f.build.args = args + sha = HOMEBREW_REPOSITORY.cd do `git rev-parse --verify -q HEAD 2>/dev/null`.chuzzle end - Tab.new :used_options => args.used_options(f), - :unused_opt...
true
Other
Homebrew
brew
5fd9c568031d42b93b1f7a3bfc2a91d4e266aac2.json
Add tmux warning for launchctl caveats. References Homebrew/homebrew#13951.
Library/Homebrew/caveats.rb
@@ -95,6 +95,7 @@ def plist_caveats s << " launchctl load #{plist_link}" end end + s << '' << "WARNING: launchctl will fail when run under tmux." end s.join("\n") unless s.empty? end
false
Other
Homebrew
brew
de8d5cfc92459324be4da4ed202f575f53e73d18.json
manpage: remove outdated MD5 references.
Library/Contributions/manpages/brew.1.md
@@ -72,7 +72,7 @@ With `--verbose`, many commands print extra debugging information. If `--cmake` is passed, create a basic template for a CMake-style build. If `--no-fetch` is passed, Homebrew will not download <URL> to the cache and - will thus not add the MD5 to the formula for you. + will thus not...
true
Other
Homebrew
brew
de8d5cfc92459324be4da4ed202f575f53e73d18.json
manpage: remove outdated MD5 references.
share/man/man1/brew.1
@@ -78,7 +78,7 @@ Generate a formula for the downloadable file at \fIURL\fR and open it in \fBEDIT If \fB\-\-autotools\fR is passed, create a basic template for an Autotools\-style build\. If \fB\-\-cmake\fR is passed, create a basic template for a CMake\-style build\. . .IP -If \fB\-\-no\-fetch\fR is passed, Homebr...
true
Other
Homebrew
brew
239217e9440c923560416454615ee6104631c06d.json
brew-fetch: remove MD5 output.
Library/Homebrew/cmd/fetch.rb
@@ -28,7 +28,6 @@ def fetch next unless the_tarball.kind_of? Pathname puts "Downloaded to: #{the_tarball}" unless already_downloaded - puts "MD5: #{the_tarball.md5}" puts "SHA1: #{the_tarball.sha1}" puts "SHA256: #{the_tarball.sha2}"
false
Other
Homebrew
brew
293be41d5c83b972f1fafe00c32412cb6e46697b.json
superenv: Allow ENV.m32 (for 32bit builds) Superenv normally filters out "-m32" flag, preventing 32bit builds. Some software, however, still only work in 32bit mode. If ENV.m32 is called, superenv does not filter out the "-m32" flag. Also note, superenv, does not explicitly add the -m32 flag and expects the build sys...
Library/ENV/4.3/cc
@@ -101,8 +101,11 @@ class Cmd case arg = whittler.next when '-arch', /^-Xarch_/ whittler.next + when '-m32' + # If ENV.m32 was set, we allow the "-m32" flag, but we don't add anything + args << '-m32' if cccfg? '3' when /^-g\d?/, /^-gstabs\d+/, '-gstabs+', /^-ggdb\d?/, ...
true
Other
Homebrew
brew
293be41d5c83b972f1fafe00c32412cb6e46697b.json
superenv: Allow ENV.m32 (for 32bit builds) Superenv normally filters out "-m32" flag, preventing 32bit builds. Some software, however, still only work in 32bit mode. If ENV.m32 is called, superenv does not filter out the "-m32" flag. Also note, superenv, does not explicitly add the -m32 flag and expects the build sys...
Library/Homebrew/superenv.rb
@@ -68,6 +68,11 @@ def universal_binary append 'HOMEBREW_CCCFG', "u", '' end + # m32 on superenv does not add any flags. It prevents "-m32" from being erased. + def m32 + append 'HOMEBREW_CCCFG', "3", '' + end + private def determine_cc @@ -205,7 +210,7 @@ def brewed_python? ### NO LONGER NEC...
true
Other
Homebrew
brew
2c6a7bdca8fe86257a588716842c763d5204ed0f.json
Check ownership of logs folder Closes Homebrew/homebrew#16607.
Library/Homebrew/cmd/doctor.rb
@@ -370,6 +370,21 @@ def check_access_share 'fail during the link step.' end +def check_access_logs + folder = Pathname.new('~/Library/Logs/Homebrew') + if folder.exist? and not folder.writable_real? + <<-EOS.undent + #{folder} isn't writable. + This can happen if you "sudo make install" software t...
false
Other
Homebrew
brew
05eb740766d4b2611abd9a197d3fdf585db9f0ce.json
Add Homebrew-completions to search
Library/Homebrew/cmd/search.rb
@@ -39,6 +39,7 @@ def search threads << Thread.new { search_tap "Homebrew", "dupes", rx } threads << Thread.new { search_tap "Homebrew", "games", rx } threads << Thread.new { search_tap "Homebrew", "science", rx } + threads << Thread.new { search_tap "Homebrew", "completions", rx } ...
false