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
f40650ecd0ff54b6a710791db42884a3b982d0c1.json
Set the remote config manually See 5cd6b35 and 8eefd4e.
Library/Homebrew/cmd/update.rb
@@ -79,7 +79,8 @@ def git_init_if_necessary if Dir[".git/*"].empty? safe_system "git", "init" safe_system "git", "config", "core.autocrlf", "false" - safe_system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew.git" + safe_system "git", "config", "remote.origin.url", ...
false
Other
Homebrew
brew
b7b8b88cea98ed4b24b813f13d7b06b538090fa6.json
Replace the build object rather than mutate it
Library/Homebrew/build_options.rb
@@ -1,7 +1,6 @@ require 'options' class BuildOptions - attr_accessor :args attr_accessor :universal def initialize(args, options) @@ -15,7 +14,7 @@ def initialize_copy(other) end def include? name - args.include? '--' + name + @args.include?("--#{name}") end def with? val
true
Other
Homebrew
brew
b7b8b88cea98ed4b24b813f13d7b06b538090fa6.json
Replace the build object rather than mutate it
Library/Homebrew/dependency.rb
@@ -29,10 +29,9 @@ def hash end def to_formula - f = Formulary.factory(name) - # Add this dependency's options to the formula's build args - f.build.args = f.build.args.concat(options) - f + formula = Formulary.factory(name) + formula.build = BuildOptions.new(options, formula.options) + for...
true
Other
Homebrew
brew
b7b8b88cea98ed4b24b813f13d7b06b538090fa6.json
Replace the build object rather than mutate it
Library/Homebrew/formula_installer.rb
@@ -303,15 +303,9 @@ def expand_dependencies(deps) end def effective_build_options_for(dependent, inherited_options=[]) - if dependent == f - build = dependent.build.dup - build.args |= options - build - else - build = dependent.build.dup - build.args |= inherited_options - b...
true
Other
Homebrew
brew
045a02aa74bf4924ae7d2d2108a2cb89d75a6897.json
Use public api when adding legacy options
Library/Homebrew/formula.rb
@@ -597,7 +597,7 @@ def self.method_added method specs.each do |spec| instance.options.each do |opt, desc| - spec.options << Option.new(opt[/^--(.+)$/, 1], desc) + spec.option(opt[/^--(.+)$/, 1], desc) end end
false
Other
Homebrew
brew
2f1d40a76437f94720c9969d11ff10555efc5809.json
Disconnect defined options from the build object
Library/Homebrew/build_options.rb
@@ -1,7 +1,5 @@ require 'options' -# This class holds the build-time options defined for a Formula, -# and provides named access to those options during install. class BuildOptions include Enumerable
true
Other
Homebrew
brew
2f1d40a76437f94720c9969d11ff10555efc5809.json
Disconnect defined options from the build object
Library/Homebrew/cmd/info.rb
@@ -127,7 +127,7 @@ def info_formula f end end - unless f.build.empty? + unless f.options.empty? ohai "Options" Homebrew.dump_options_for_formula f end
true
Other
Homebrew
brew
2f1d40a76437f94720c9969d11ff10555efc5809.json
Disconnect defined options from the build object
Library/Homebrew/cmd/options.rb
@@ -14,9 +14,9 @@ def options def puts_options(formulae) formulae.each do |f| - next if f.build.empty? + next if f.options.empty? if ARGV.include? '--compact' - puts f.build.as_flags.sort * " " + puts f.options.as_flags.sort * " " else puts f.name if formulae.len...
true
Other
Homebrew
brew
2f1d40a76437f94720c9969d11ff10555efc5809.json
Disconnect defined options from the build object
Library/Homebrew/formula.rb
@@ -101,6 +101,10 @@ def patchlist active_spec.patches end + def options + active_spec.options + end + def option_defined?(name) active_spec.option_defined?(name) end @@ -440,7 +444,7 @@ def to_hash "caveats" => caveats } - hsh["options"] = build.map { |opt| + hsh["options"...
true
Other
Homebrew
brew
2f1d40a76437f94720c9969d11ff10555efc5809.json
Disconnect defined options from the build object
Library/Homebrew/formula_installer.rb
@@ -461,7 +461,7 @@ def sanitized_ARGV_options when f.devel then args << "--devel" end - f.build.each do |opt, _| + f.options.each do |opt, _| name = opt.name[/\A(.+)=\z$/, 1] value = ARGV.value(name) args << "--#{name}=#{value}" if name && value
true
Other
Homebrew
brew
2f1d40a76437f94720c9969d11ff10555efc5809.json
Disconnect defined options from the build object
Library/Homebrew/tab.rb
@@ -71,7 +71,7 @@ def self.for_formula f def self.dummy_tab f=nil Tab.new :used_options => [], - :unused_options => (f.build.as_flags rescue []), + :unused_options => (f.options.as_flags rescue []), :built_as_bottle => false, :poured_from_bottle => false, ...
true
Other
Homebrew
brew
d122ae8eea053b6f1074c34ce55ebc3dc26e0801.json
Handle legacy options in the method_added hook We only need to process the legacy options at load time, not each time the class is instantiated, and only when there is an options method defined.
Library/Homebrew/formula.rb
@@ -37,7 +37,6 @@ def initialize(name, path, spec) @active_spec = determine_active_spec(spec) validate_attributes :url, :name, :version - active_spec.add_legacy_options(options) @pkg_version = PkgVersion.new(version, revision) @pin = FormulaPin.new(self) end @@ -213,9 +212,6 @@ def post_inst...
true
Other
Homebrew
brew
d122ae8eea053b6f1074c34ce55ebc3dc26e0801.json
Handle legacy options in the method_added hook We only need to process the legacy options at load time, not each time the class is instantiated, and only when there is an options method defined.
Library/Homebrew/software_spec.rb
@@ -127,10 +127,6 @@ def add_dep_option(dep) options << Option.new("without-#{name}", "Build without #{name} support") end end - - def add_legacy_options(list) - list.each { |opt, desc| options << Option.new(opt[/^--(.+)$/, 1], desc) } - end end class HeadSoftwareSpec < SoftwareSpec
true
Other
Homebrew
brew
f306e56d214587b5ef6f6b5505b34280da19a075.json
Add a test for legacy options
Library/Homebrew/test/test_formula.rb
@@ -258,4 +258,20 @@ def test_raises_when_non_formula_constant_exists Object.send(:remove_const, const) end end + + def test_legacy_options + f = formula do + url "foo-1.0" + + def options + [["--foo", "desc"], ["--bar", "desc"]] + end + + option "baz" + end + + asser...
false
Other
Homebrew
brew
47fedf2951d9579ffc3245b577d1ce51b147169a.json
Update tap README template
Library/Contributions/cmd/brew-tap-readme.rb
@@ -15,7 +15,7 @@ You can also install via URL: ``` -brew install https://raw.github.com/Homebrew/homebrew-#{name}/master/<formula>.rb +brew install https://raw.githubusercontent.com/Homebrew/homebrew-#{name}/master/<formula>.rb ``` Docs
false
Other
Homebrew
brew
2a5218dacc4bc6ef574279d5ddf069c33b8b3802.json
Remove unnecessary lasgn
Library/Homebrew/build.rb
@@ -201,7 +201,7 @@ def detect_stdlibs # of software installs an executable that links against libstdc++ # and dylibs against libc++, libc++-only dependencies can safely # link against it. - stdlibs = keg.detect_cxx_stdlibs :skip_executables => true + keg.detect_cxx_stdlibs(:skip_executables => tru...
false
Other
Homebrew
brew
47a82b036e43e7119fb52123a908b3af8e3af76a.json
Move tab creation outside of the debug loop
Library/Homebrew/build.rb
@@ -163,8 +163,6 @@ def install begin f.install - stdlibs = detect_stdlibs - Tab.create(f, ENV.compiler, stdlibs.first, f.build).write rescue Exception => e if ARGV.debug? debrew e, f @@ -173,6 +171,9 @@ def install end end +...
false
Other
Homebrew
brew
e0f86a1a86ec3c42e53fa4b6d29753925aaf2e09.json
Pull effective arch detection into a method
Library/Homebrew/extend/ENV/std.rb
@@ -301,17 +301,19 @@ def set_cpu_flags flags, default=DEFAULT_FLAGS, map=Hardware::CPU.optimization_f remove flags, %r{-mssse3} remove flags, %r{-msse4(\.\d)?} append flags, xarch unless xarch.empty? + append flags, map.fetch(effective_arch, default) + end + def effective_arch if ARGV.build_...
false
Other
Homebrew
brew
2c9ad4578458a728ce28ef6eee8cd7c03dd9de30.json
doctor: retire Mono warning We haven't actually had any complaints about this in awhile; it appears that cmake no longer picks up this specific framework. Refs Homebrew/homebrew#11030.
Library/Homebrew/cmd/doctor.rb
@@ -878,7 +878,7 @@ def check_for_linked_keg_only_brews def check_for_other_frameworks # Other frameworks that are known to cause problems when present - %w{Mono.framework expat.framework libexpat.framework}. + %w{expat.framework libexpat.framework}. map{ |frmwrk| "/Library/Frameworks/#{frmwrk}" }. se...
false
Other
Homebrew
brew
af804f74759c44f220b4d88b1c0b27218f33110e.json
Remove another unnecessary default argument
Library/Homebrew/formula.rb
@@ -693,8 +693,8 @@ def skip_clean_paths @skip_clean_paths ||= Set.new end - def keg_only reason, explanation=nil - @keg_only_reason = KegOnlyReason.new(reason, explanation.to_s.chomp) + def keg_only reason, explanation="" + @keg_only_reason = KegOnlyReason.new(reason, explanation) en...
true
Other
Homebrew
brew
af804f74759c44f220b4d88b1c0b27218f33110e.json
Remove another unnecessary default argument
Library/Homebrew/formula_support.rb
@@ -4,9 +4,7 @@ # Used to annotate formulae that duplicate OS X provided software # or cause conflicts when linked in. class KegOnlyReason - attr_reader :reason, :explanation - - def initialize reason, explanation=nil + def initialize(reason, explanation) @reason = reason @explanation = explanation e...
true
Other
Homebrew
brew
22d1f6516f977520ed67601ffde2bfecea746757.json
Remove a defensive to_s call This method is only used internally and we always pass strings.
Library/Homebrew/build_options.rb
@@ -21,7 +21,7 @@ def initialize_copy(other) end def add(name, description) - description ||= case name.to_s + description ||= case name when "universal" then "Build a universal binary" when "32-bit" then "Build 32-bit only" when "c++11" then "Build using C++11 mode"
false
Other
Homebrew
brew
dc9872eb834444664cc423a3e1ff167055ebd078.json
Remove default argument This method is called in two places, always with two arguments.
Library/Homebrew/build_options.rb
@@ -20,7 +20,7 @@ def initialize_copy(other) @args = other.args.dup end - def add name, description=nil + def add(name, description) description ||= case name.to_s when "universal" then "Build a universal binary" when "32-bit" then "Build 32-bit only"
false
Other
Homebrew
brew
acc1c35f35fb86957d56e19988fd4aeabae57b9e.json
Raise ArgumentError for argument errors
Library/Homebrew/software_spec.rb
@@ -78,8 +78,8 @@ def option_defined?(name) def option name, description=nil name = 'c++11' if name == :cxx11 name = name.to_s if Symbol === name - raise "Option name is required." if name.empty? - raise "Options should not start with dashes." if name[0, 1] == "-" + raise ArgumentError, "option na...
true
Other
Homebrew
brew
acc1c35f35fb86957d56e19988fd4aeabae57b9e.json
Raise ArgumentError for argument errors
Library/Homebrew/test/test_software_spec.rb
@@ -48,11 +48,11 @@ def test_option end def test_option_raises_when_begins_with_dashes - assert_raises(RuntimeError) { @spec.option('--foo') } + assert_raises(ArgumentError) { @spec.option("--foo") } end def test_option_raises_when_name_empty - assert_raises(RuntimeError) { @spec.option('') } +...
true
Other
Homebrew
brew
20452f3edc22ede05814a7355d65c9ef4547b3b0.json
Add more test coverage for option descriptions
Library/Homebrew/test/test_software_spec.rb
@@ -66,6 +66,16 @@ def test_cxx11_option_special_case refute @spec.option_defined?("cxx11") end + def test_option_description + @spec.option("bar", "description") + assert_equal "description", @spec.options.first.description + end + + def test_option_description_defaults_to_empty_string + @spec.op...
false
Other
Homebrew
brew
fa88b9697c56166f03264f69e2b7a63492fb2564.json
Add a test for cxx11 option special case
Library/Homebrew/test/test_software_spec.rb
@@ -60,6 +60,12 @@ def test_option_accepts_symbols assert @spec.option_defined?("foo") end + def test_cxx11_option_special_case + @spec.option(:cxx11) + assert @spec.option_defined?("c++11") + refute @spec.option_defined?("cxx11") + end + def test_depends_on @spec.depends_on('foo') ass...
false
Other
Homebrew
brew
22a98624d2d249add58c31833e1b4e452c242d03.json
utils: use the $stderr global variable. For easier capturing. Closes Homebrew/homebrew#31303. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/utils.rb
@@ -54,11 +54,11 @@ def oh1 title end def opoo warning - STDERR.puts "#{Tty.red}Warning#{Tty.reset}: #{warning}" + $stderr.puts "#{Tty.red}Warning#{Tty.reset}: #{warning}" end def onoe error - STDERR.puts "#{Tty.red}Error#{Tty.reset}: #{error}" + $stderr.puts "#{Tty.red}Error#{Tty.reset}: #{error}" end ...
false
Other
Homebrew
brew
f1cf62a4b5997fd86153d1c66963418bae46368c.json
Add predicate methods to Tab to match BuildOptions
Library/Homebrew/tab.rb
@@ -83,9 +83,9 @@ def self.dummy_tab f=nil def with? name if options.include? "with-#{name}" - used_options.include? "with-#{name}" + include? "with-#{name}" elsif options.include? "without-#{name}" - not used_options.include? "without-#{name}" + not include? "without-#{name}" el...
false
Other
Homebrew
brew
cf3c12dd5b23d8b44c56303ba1e4796be8b3b3c0.json
Add inspect to CxxStdlib
Library/Homebrew/cxxstdlib.rb
@@ -51,6 +51,10 @@ def type_string type.to_s.gsub(/cxx$/, 'c++') end + def inspect + "#<#{self.class.name}: #{compiler} #{type}>" + end + class AppleStdlib < CxxStdlib def apple_compiler? true
false
Other
Homebrew
brew
9aac71045c3f138a50d1dd042bb6bd7696f65ba6.json
Add inspect to CompilerFailure
Library/Homebrew/compilers.rb
@@ -52,6 +52,10 @@ def ===(compiler) name == compiler.name && version >= compiler.version end + def inspect + "#<#{self.class.name}: #{name} #{version}>" + end + MESSAGES = { :cxx11 => "This compiler does not support C++11" }
false
Other
Homebrew
brew
5a2ae61e66e517e1688ddcbc7c2ac822d780bbd5.json
Add another TODO
Library/Homebrew/extend/ENV/shared.rb
@@ -136,6 +136,8 @@ def validate_cc!(formula) # selector will be invoked if the formula fails with any version of clang. # I think we can safely remove this conditional and always invoke the # selector. + # The compiler priority logic in compilers.rb and default_compiler logic in + # os/mac.rb need...
false
Other
Homebrew
brew
eb528fd7cd01baac4fb0bcdf13ab2c0ab8f6c568.json
Eliminate a nil check
Library/Homebrew/compilers.rb
@@ -3,7 +3,16 @@ module CompilerConstants GNU_GCC_REGEXP = /^gcc-(4\.[3-9])$/ end -Compiler = Struct.new(:name, :version, :priority) +# TODO make this class private to CompilerSelector +class Compiler + attr_reader :name, :version, :priority + + def initialize(name, version=0, priority=0) + @name = name + ...
false
Other
Homebrew
brew
d54bce6a1af251a32f759e2017e0f4d1bc8d8c53.json
Remove dead code
Library/Homebrew/compilers.rb
@@ -121,12 +121,10 @@ def compiler def priority_for(cc) case cc - when :clang then @versions.clang_build_version >= 318 ? 3 : 0.5 - when :gcc then 2.5 - when :llvm then 2 + when :clang then @versions.clang_build_version >= 318 ? 3 : 0.5 + when :gcc then 2.5 + when :llvm then 2 ...
false
Other
Homebrew
brew
b6e9600b9fbcb1f86bc43d78fb461a1247e9aacd.json
Eliminate consideration of major_version The major version is implicit in the compiler name. Since the name is used when matching failures to compilers, we don't need to consider the major version separately.
Library/Homebrew/compilers.rb
@@ -3,13 +3,7 @@ module CompilerConstants GNU_GCC_REGEXP = /^gcc-(4\.[3-9])$/ end -class Compiler < Struct.new(:name, :version, :priority) - # The major version for non-Apple compilers. Used to indicate a compiler - # series; for instance, if the version is 4.8.2, it would return "4.8". - def major_version - ...
false
Other
Homebrew
brew
4580d86809095a236839d1de55e47e5dc98b7987.json
Use a separate class for GNU compiler failures major_version is now only used internally by the failure object
Library/Homebrew/compilers.rb
@@ -12,7 +12,7 @@ def major_version end class CompilerFailure - attr_reader :name, :major_version + attr_reader :name attr_rw :cause, :version # Allows Apple compiler `fails_with` statements to keep using `build` @@ -32,26 +32,35 @@ def self.create(spec, &block) name = "gcc-#{major_version}" ...
false
Other
Homebrew
brew
fded4d0385171877bc6e60a2f265a2095be652da.json
Remove an is_a check
Library/Homebrew/extend/ENV/shared.rb
@@ -130,7 +130,13 @@ def determine_cc # an alternate compiler, altering the value of environment variables. # If no valid compiler is found, raises an exception. def validate_cc!(formula) - if formula.fails_with? compiler + # FIXME + # The compiler object we pass to fails_with? has no version informat...
true
Other
Homebrew
brew
fded4d0385171877bc6e60a2f265a2095be652da.json
Remove an is_a check
Library/Homebrew/formula.rb
@@ -232,7 +232,6 @@ def keg_only_reason end def fails_with? cc - cc = Compiler.new(cc) unless cc.is_a? Compiler (self.class.cc_failures || []).any? do |failure| # Major version check distinguishes between, e.g., # GCC 4.7.1 and GCC 4.8.2, where a comparison is meaningless
true
Other
Homebrew
brew
5b38e891073fa324a09d31178c789b2453da54bf.json
Simplify compatibility logic
Library/Homebrew/cxxstdlib.rb
@@ -27,14 +27,8 @@ def compatible_with?(other) return false unless type == other.type - if apple_compiler? - return false unless other.apple_compiler? - else - return false if other.apple_compiler? - return false unless compiler.to_s[4..6] == other.compiler.to_s[4..6] - end - - true ...
false
Other
Homebrew
brew
018aeb05ab74629f761741e51436a358db6feb9d.json
Drop unnecessary parens
Library/Homebrew/cxxstdlib.rb
@@ -23,7 +23,7 @@ def initialize(type, compiler) # libstdc++ is compatible across Apple compilers, but # not between Apple and GNU compilers, or between GNU compiler versions def compatible_with?(other) - (type.nil? || other.type.nil?) || type == other.type + type.nil? || other.type.nil? || type == other...
false
Other
Homebrew
brew
c003e805bea98f6d0be62c0938ccad4f4a7e4ce0.json
add helpers for formula tests
Library/Homebrew/cmd/test.rb
@@ -25,6 +25,8 @@ module Homebrew FailedAssertion = Test::Unit::AssertionFailedError end + require "formula_assertions" + def test raise FormulaUnspecifiedError if ARGV.named.empty? @@ -47,6 +49,7 @@ def test puts "Testing #{f.name}" f.extend(Test::Unit::Assertions) + f.extend(...
true
Other
Homebrew
brew
c003e805bea98f6d0be62c0938ccad4f4a7e4ce0.json
add helpers for formula tests
Library/Homebrew/formula_assertions.rb
@@ -0,0 +1,23 @@ +require 'test/unit/assertions' + +module Homebrew + module Assertions + include Test::Unit::Assertions + + # Returns the output of running cmd, and asserts the exit status + def shell_output(cmd, result=0) + output = `#{cmd}` + assert_equal result, $?.exitstatus + output + ...
true
Other
Homebrew
brew
fad2e26395f09d78e51a9da5965e28d72b3c9cc2.json
Reduce direct accesses of the args collection
Library/Homebrew/build_options.rb
@@ -81,15 +81,15 @@ def without? name end def bottle? - args.include? '--build-bottle' + include? "build-bottle" end def head? - args.include? '--HEAD' + include? "HEAD" end def devel? - args.include? '--devel' + include? "devel" end def stable? @@ -98,19 +98,19 @@ def ...
false
Other
Homebrew
brew
5ccce044ca04b9586667b538f818d4a018f21fa7.json
Use the tab in place of build during tests
Library/Homebrew/formula.rb
@@ -479,9 +479,7 @@ def verify_download_integrity fn end def test - # Adding the used options allows us to use `build.with?` inside of tests - tab = Tab.for_name(name) - tab.used_options.each { |opt| build.args << opt unless build.has_opposite_of? opt } + @build = Tab.for_formula(self) ret = ni...
false
Other
Homebrew
brew
393e10849be14528ee1726e5659562a698686c92.json
Pass the build object into the Tab Since the Tab is written in the build process, the formula's build object will have the correct args attached to it already, so we don't need to reconstruct it.
Library/Homebrew/build.rb
@@ -186,8 +186,7 @@ def install # link against it. stdlibs = keg.detect_cxx_stdlibs :skip_executables => true - Tab.create(f, ENV.compiler, stdlibs.first, - Options.coerce(ARGV.options_only)).write + Tab.create(f, ENV.compiler, stdlibs.first, f.build).write ...
true
Other
Homebrew
brew
393e10849be14528ee1726e5659562a698686c92.json
Pass the build object into the Tab Since the Tab is written in the build process, the formula's build object will have the correct args attached to it already, so we don't need to reconstruct it.
Library/Homebrew/tab.rb
@@ -10,16 +10,13 @@ class Tab < OpenStruct FILENAME = 'INSTALL_RECEIPT.json' - def self.create f, compiler, stdlib, args - build = f.build.dup - build.args = args - + def self.create(formula, compiler, stdlib, build) Tab.new :used_options => build.used_options, :unused_options => build.u...
true
Other
Homebrew
brew
dd331245ab334b2e3fde162b51c3b8b63f065548.json
Remove unused accessor
Library/Homebrew/build_options.rb
@@ -7,7 +7,6 @@ class BuildOptions attr_accessor :args attr_accessor :universal - attr_accessor :cxx11 attr_reader :options protected :options @@ -104,7 +103,7 @@ def universal? # True if the user requested to enable C++11 mode. def cxx11? - cxx11 || args.include?('--c++11') && has_option?('...
false
Other
Homebrew
brew
ba4a4e41034be1bde963defa09c295aeabdf2d9c.json
Limit exposure of the options data structures
Library/Homebrew/cmd/doctor.rb
@@ -1006,7 +1006,7 @@ def check_for_non_prefixed_coreutils end def check_for_non_prefixed_findutils - default_names = Tab.for_name('findutils').used_options.include? 'default-names' + default_names = Tab.for_name('findutils').include? 'default-names' if default_names then <<-EOS.undent Putting non-prefixe...
false
Other
Homebrew
brew
c1ba34734db8b98693651300bd19300a90e2ddb8.json
Remove unused require
Library/Homebrew/build.rb
@@ -26,7 +26,6 @@ def main trap("INT", STD_TRAP) # restore default CTRL-C handler - require 'hardware' require 'keg' require 'extend/ENV'
false
Other
Homebrew
brew
a55e196f5f72ef0b1c829007c9b4a68de5c06ef0.json
Simplify internal representation of patches - remove support for IO objects, since we no longer access ::DATA directly - since we don't need to support IO objects, use a separate class for string patches and stop wrapping strings in StringIO ojects
Library/Homebrew/formula.rb
@@ -671,8 +671,8 @@ def option name, description=nil specs.each { |spec| spec.option(name, description) } end - def patch strip=:p1, io=nil, &block - specs.each { |spec| spec.patch(strip, io, &block) } + def patch strip=:p1, src=nil, &block + specs.each { |spec| spec.patch(strip, src, &blo...
true
Other
Homebrew
brew
a55e196f5f72ef0b1c829007c9b4a68de5c06ef0.json
Simplify internal representation of patches - remove support for IO objects, since we no longer access ::DATA directly - since we don't need to support IO objects, use a separate class for string patches and stop wrapping strings in StringIO ojects
Library/Homebrew/patch.rb
@@ -1,24 +1,19 @@ require 'resource' -require 'stringio' require 'erb' module Patch - def self.create(strip, io, &block) + def self.create(strip, src, &block) case strip when :DATA DATAPatch.new(:p1) - when IO, StringIO - IOPatch.new(strip, :p1) when String - IOPatch.new(String...
true
Other
Homebrew
brew
a55e196f5f72ef0b1c829007c9b4a68de5c06ef0.json
Simplify internal representation of patches - remove support for IO objects, since we no longer access ::DATA directly - since we don't need to support IO objects, use a separate class for string patches and stop wrapping strings in StringIO ojects
Library/Homebrew/software_spec.rb
@@ -90,8 +90,8 @@ def requirements dependency_collector.requirements end - def patch strip=:p1, io=nil, &block - patches << Patch.create(strip, io, &block) + def patch strip=:p1, src=nil, &block + patches << Patch.create(strip, src, &block) end def add_legacy_patches(list)
true
Other
Homebrew
brew
a55e196f5f72ef0b1c829007c9b4a68de5c06ef0.json
Simplify internal representation of patches - remove support for IO objects, since we no longer access ::DATA directly - since we don't need to support IO objects, use a separate class for string patches and stop wrapping strings in StringIO ojects
Library/Homebrew/test/test_patch.rb
@@ -9,28 +9,15 @@ def test_create_simple assert_equal :p2, patch.strip end - def test_create_io - patch = Patch.create(:p0, StringIO.new("foo")) - assert_kind_of IOPatch, patch - refute_predicate patch, :external? - assert_equal :p0, patch.strip - end - - def test_create_io_without_strip - p...
true
Other
Homebrew
brew
8a971f72686298ba44d427ba65823a6e70b2a4d8.json
Move the fixopt method into the Build class
Library/Homebrew/build.rb
@@ -208,19 +208,19 @@ def install end end end -end -def fixopt f - path = if f.linked_keg.directory? and f.linked_keg.symlink? - f.linked_keg.resolved_path - elsif f.prefix.directory? - f.prefix - elsif (kids = f.rack.children).size == 1 and kids.first.directory? - kids.first - else - r...
false
Other
Homebrew
brew
90f69372ce046f52d9da0ee3b059d3526c12c3e6.json
Remove inheritance patch classes
Library/Homebrew/patch.rb
@@ -48,22 +48,19 @@ def self.normalize_legacy_patches(list) patches end - - attr_reader :whence - - def external? - whence == :resource - end end -class IOPatch < Patch +class IOPatch attr_writer :owner attr_reader :strip + def external? + false + end + def initialize(io, strip) ...
false
Other
Homebrew
brew
5b8e564d7053220498ac8430cbffe69cfd5ec986.json
Add test for reporting tap updates
Library/Homebrew/test/fixtures/updater_fixture.yaml
@@ -43,3 +43,15 @@ update_git_diff_output_with_changed_filetype: | update_git_diff_output_with_restructured_tap: | R100 git.rb Formula/git.rb R100 lua.rb Formula/lua.rb +update_git_diff_output_with_tap_formulae_changes: | + M Rakefile + M README.md + M Requirements/some_requirement.rb + D another_ruby_file.r...
true
Other
Homebrew
brew
5b8e564d7053220498ac8430cbffe69cfd5ec986.json
Add test for reporting tap updates
Library/Homebrew/test/test_updater.rb
@@ -100,4 +100,22 @@ def test_update_homebrew_with_restructured_tap assert_equal %w{foo/bar/git foo/bar/lua}, @report.select_formula(:A) assert_equal %w{foo/bar/git foo/bar/lua}, @report.select_formula(:D) end + + def test_update_homebrew_with_tap_formulae_changes + repo = HOMEBREW_LIBRARY.join("Taps",...
true
Other
Homebrew
brew
87850d00cda177e15d94c48655b182cc74cb7af2.json
Remove obsolete hacks from updater report
Library/Homebrew/cmd/update.rb
@@ -254,25 +254,7 @@ def dump end def tapped_formula_for key - fetch(key, []).select do |path| - case path.to_s - when HOMEBREW_TAP_PATH_REGEX - valid_formula_location?("#{$1}/#{$2}/#{$3}") - else - false - end - end.compact - end - - def valid_formula_location?(relativ...
false
Other
Homebrew
brew
6baf357f8c196dcf26cc3f4a877bd992dbb55e3a.json
update: remove unused rename detection Right now this code only produces false positives. When we have real support for renames, we can implement it more carefully. Closes Homebrew/homebrew#31126.
Library/Homebrew/cmd/update.rb
@@ -172,12 +172,8 @@ def report map = Hash.new{ |h,k| h[k] = [] } if initial_revision && initial_revision != current_revision - `git diff-tree -r --name-status -M85% #{initial_revision} #{current_revision}`.each_line do |line| - status, path, renamed = line.split - if renamed - s...
true
Other
Homebrew
brew
6baf357f8c196dcf26cc3f4a877bd992dbb55e3a.json
update: remove unused rename detection Right now this code only produces false positives. When we have real support for renames, we can implement it more carefully. Closes Homebrew/homebrew#31126.
Library/Homebrew/test/fixtures/updater_fixture.yaml
@@ -12,7 +12,6 @@ update_git_diff_output_with_formulae_changes: | A Library/Formula/ddrescue.rb A Library/Formula/dict.rb A Library/Formula/lua.rb - R094 Library/Formula/shapefile.rb Library/Formula/shapelib.rb M Library/Formula/xar.rb M Library/Formula/yajl.rb M Library/Homebrew/ARGV+yeast.rb
true
Other
Homebrew
brew
6baf357f8c196dcf26cc3f4a877bd992dbb55e3a.json
update: remove unused rename detection Right now this code only produces false positives. When we have real support for renames, we can implement it more carefully. Closes Homebrew/homebrew#31126.
Library/Homebrew/test/test_updater.rb
@@ -56,7 +56,7 @@ def perform_update(diff_output="") @updater.in_repo_expect("git config core.autocrlf false") @updater.in_repo_expect("git pull -q origin refs/heads/master:refs/remotes/origin/master") @updater.in_repo_expect("git rev-parse -q --verify HEAD", "3456cdef") - @updater.in_repo_exp...
true
Other
Homebrew
brew
2cf116464dcdd68c10e8a9e6f918568cf594a588.json
update: simplify diff parsing
Library/Homebrew/cmd/update.rb
@@ -168,20 +168,17 @@ def reset_on_interrupt end end - # Matches raw git diff format (see `man git-diff-tree`) - DIFFTREE_RX = /^:[0-7]{6} [0-7]{6} [0-9a-fA-F]{40} [0-9a-fA-F]{40} ([ACDMRTUX])\d{0,3}\t(.+?)(?:\t(.+))?$/ - def report map = Hash.new{ |h,k| h[k] = [] } if initial_revision && ini...
true
Other
Homebrew
brew
2cf116464dcdd68c10e8a9e6f918568cf594a588.json
update: simplify diff parsing
Library/Homebrew/test/fixtures/updater_fixture.yaml
@@ -1,49 +1,49 @@ update_git_diff_output_without_formulae_changes: | - :100644 100644 9dde0708e2db78e1aa697782bd2ab2ddfd8da984 ee0a81cbe3757e9a4b5aab1c41457f65fed9f258 M Library/Homebrew/ARGV+yeast.rb - :100644 100644 741f11dcd29ec909a94fa54df4bcdd2c1d5bb47b 7535134e865994e8ad66ba02a924a1e6c1271b9e A Library/Homebre...
true
Other
Homebrew
brew
2cf116464dcdd68c10e8a9e6f918568cf594a588.json
update: simplify diff parsing
Library/Homebrew/test/test_updater.rb
@@ -56,7 +56,7 @@ def perform_update(diff_output="") @updater.in_repo_expect("git config core.autocrlf false") @updater.in_repo_expect("git pull -q origin refs/heads/master:refs/remotes/origin/master") @updater.in_repo_expect("git rev-parse -q --verify HEAD", "3456cdef") - @updater.in_repo_exp...
true
Other
Homebrew
brew
7078af82184d09e977a7aa8a186dfb643395fbfa.json
Pass the string directly to the output method
Library/Homebrew/cmd/doctor.rb
@@ -1143,11 +1143,9 @@ def doctor EOS end - lines = out.to_s.split('\n') puts - opoo lines.shift + opoo out Homebrew.failed = true - puts lines first_warning = false end end
false
Other
Homebrew
brew
d2aeadb1cd087081c7631622e01d8522e63e27eb.json
Pass array to puts instead of iterating over it
Library/Homebrew/cmd/doctor.rb
@@ -1118,7 +1118,7 @@ def doctor checks = Checks.new if ARGV.include? '--list-checks' - checks.methods.grep(/^check_/).sort.each { |m| puts m } + puts checks.methods.grep(/^check_/).sort exit end
false
Other
Homebrew
brew
74ad97ce7f3325fc0a16c5ec3262e191a92667cd.json
Remove intermediate method
Library/Homebrew/cmd/config.rb
@@ -117,10 +117,6 @@ def dump_build_config(f) f.puts "X11: #{describe_x11}" end - def write_build_config(f) - Homebrew.dump_build_config(f) - end - def dump_verbose_config(f) f.puts "HOMEBREW_VERSION: #{HOMEBREW_VERSION}" f.puts "ORIGIN: #{origin}"
true
Other
Homebrew
brew
74ad97ce7f3325fc0a16c5ec3262e191a92667cd.json
Remove intermediate method
Library/Homebrew/formula.rb
@@ -556,7 +556,7 @@ def system cmd, *args Kernel.system "/usr/bin/tail", "-n", "5", logfn unless ARGV.verbose? f.puts require 'cmd/config' - Homebrew.write_build_config(f) + Homebrew.dump_build_config(f) raise BuildError.new(self, cmd, args) end end
true
Other
Homebrew
brew
a150403eb9878045696e5860a1a7488838a7a0d2.json
brew-gist-logs: dump config directly
Library/Contributions/cmd/brew-gist-logs.rb
@@ -1,6 +1,8 @@ require 'formula' +require 'cmd/config' require 'net/http' require 'net/https' +require 'stringio' def gist_logs f if ARGV.include? '--new-issue' @@ -37,7 +39,9 @@ def load_logs name end def append_config files - files['config.out'] = {:content => `brew config 2>&1`} + s = StringIO.new + ...
false
Other
Homebrew
brew
d706bcf153ca09932b9166a4d664a33aed77d693.json
Remove the patch from the cache after applying it
Library/Contributions/cmd/brew-pull.rb
@@ -79,6 +79,8 @@ def tap arg rescue ErrorDuringExecution system 'git', 'am', '--abort' odie 'Patch failed to apply: aborted.' + ensure + patchpath.unlink end changed_formulae = []
false
Other
Homebrew
brew
6f02314cba77825db1fbcc186e96ff9ec49f7f58.json
Add a factory method that accepts a formula object
Library/Homebrew/cmd/bottle.rb
@@ -125,7 +125,7 @@ def bottle_formula f bottle_revision = max ? max + 1 : 0 end - filename = Bottle::Filename.new(f.name, f.pkg_version, bottle_tag, bottle_revision) + filename = Bottle::Filename.create(f, bottle_tag, bottle_revision) if bottle_filename_formula_name(filename).empty? r...
true
Other
Homebrew
brew
6f02314cba77825db1fbcc186e96ff9ec49f7f58.json
Add a factory method that accepts a formula object
Library/Homebrew/software_spec.rb
@@ -116,6 +116,10 @@ class Bottle class Filename attr_reader :name, :version, :tag, :revision + def self.create(formula, tag, revision) + new(formula.name, formula.pkg_version, tag, revision) + end + def initialize(name, version, tag, revision) @name = name @version = version @@ ...
true
Other
Homebrew
brew
6f02314cba77825db1fbcc186e96ff9ec49f7f58.json
Add a factory method that accepts a formula object
Library/Homebrew/test/test_bottle_filename.rb
@@ -1,4 +1,5 @@ require "testing_env" +require "formula" require "software_spec" class BottleFilenameTests < Homebrew::TestCase @@ -17,4 +18,14 @@ def test_to_str assert_equal expected, fn(0).to_s assert_equal expected, fn(0).to_str end + + def test_create + f = formula { + url "https://examp...
true
Other
Homebrew
brew
49a97c280a35fe07bce036467da85ace0c006fa7.json
Ask the filename object for the prefix
Library/Homebrew/bottles.rb
@@ -19,11 +19,6 @@ def bottle_file_outdated? f, file bottle_ext && bottle_url_ext && bottle_ext != bottle_url_ext end -def bottle_suffix revision - revision = revision > 0 ? ".#{revision}" : "" - ".bottle#{revision}.tar.gz" -end - def bottle_native_regex /(\.#{bottle_tag}\.bottle\.(\d+\.)?tar\.gz)$/o end
true
Other
Homebrew
brew
49a97c280a35fe07bce036467da85ace0c006fa7.json
Ask the filename object for the prefix
Library/Homebrew/cmd/bottle.rb
@@ -192,10 +192,7 @@ def bottle_formula f puts output if ARGV.include? '--rb' - bottle_base = filename.to_s.gsub(bottle_suffix(bottle_revision), '') - File.open "#{bottle_base}.bottle.rb", 'w' do |file| - file.write output - end + File.open("#{filename.prefix}.bottle.rb", "w") { |...
true
Other
Homebrew
brew
49a97c280a35fe07bce036467da85ace0c006fa7.json
Ask the filename object for the prefix
Library/Homebrew/software_spec.rb
@@ -124,9 +124,18 @@ def initialize(name, version, tag, revision) end def to_s - "#{name}-#{version}.#{tag}#{bottle_suffix(revision)}" + prefix + suffix end alias_method :to_str, :to_s + + def prefix + "#{name}-#{version}.#{tag}" + end + + def suffix + s = revision > 0...
true
Other
Homebrew
brew
49a97c280a35fe07bce036467da85ace0c006fa7.json
Ask the filename object for the prefix
Library/Homebrew/test/test_bottle_filename.rb
@@ -6,6 +6,12 @@ def fn(revision) Bottle::Filename.new("foo", "1.0", :tag, revision) end + def test_prefix_suffix + assert_equal "foo-1.0.tag", fn(0).prefix + assert_equal ".bottle.tar.gz", fn(0).suffix + assert_equal ".bottle.1.tar.gz", fn(1).suffix + end + def test_to_str expected = "foo-...
true
Other
Homebrew
brew
1cc37470947ed594dbb42a4138b34d33c74cb17d.json
Move bottle URL construction to the bottle object
Library/Homebrew/bottles.rb
@@ -28,11 +28,6 @@ def bottle_native_regex /(\.#{bottle_tag}\.bottle\.(\d+\.)?tar\.gz)$/o end -def bottle_url(root_url, *filename_args) - filename = Bottle::Filename.new(*filename_args) - "#{root_url}/#{filename}" -end - def bottle_tag if MacOS.version >= :lion MacOS.cat
true
Other
Homebrew
brew
1cc37470947ed594dbb42a4138b34d33c74cb17d.json
Move bottle URL construction to the bottle object
Library/Homebrew/software_spec.rb
@@ -143,7 +143,8 @@ def initialize(formula, spec) checksum, tag = spec.checksum_for(bottle_tag) - @resource.url = bottle_url(spec.root_url, formula.name, formula.pkg_version, tag, spec.revision) + filename = Filename.new(formula.name, formula.pkg_version, tag, spec.revision) + @resource.url = build_ur...
true
Other
Homebrew
brew
a5895ad1fe1ae4ae296c71483e7a77d87606cdd8.json
Check nil? || empty? instead of to_s.empty?
Library/Homebrew/extend/ENV/shared.rb
@@ -47,20 +47,22 @@ def remove_from_cflags val def append keys, value, separator = ' ' value = value.to_s Array(keys).each do |key| - unless self[key].to_s.empty? - self[key] = self[key] + separator + value - else + old = self[key] + if old.nil? || old.empty? self[key] =...
false
Other
Homebrew
brew
598e7010f98c261df7c0a17c79dea554aebd1334.json
Remove dead code This method is identical to the superclass implementation.
Library/Homebrew/download_strategy.rb
@@ -288,10 +288,6 @@ def initialize name, resource @url = "#{@url}?use_mirror=#{mirror}" if mirror end - def tarball_path - @tarball_path ||= HOMEBREW_CACHE/"#{name}-#{resource.version}#{ext}" - end - def stage ohai "Pouring #{tarball_path.basename}" super
false
Other
Homebrew
brew
22038d5269d591ecc6646eba8b474d6320f7c476.json
Remove special case for now-deprecated GitHub URLs
Library/Homebrew/download_strategy.rb
@@ -203,18 +203,12 @@ def basename_without_params end def ext - # GitHub uses odd URLs for zip files, so check for those - rx=%r[https?://(www\.)?github\.com/.*/(zip|tar)ball/] - if rx.match @url - if $2 == 'zip' - '.zip' - else - '.tgz' - end - else - # Strip any ?...
false
Other
Homebrew
brew
ecc9407fed2ab64c45c9499f896f0191a741c8ff.json
Remove deprecated options from brew-diy
Library/Homebrew/cmd/diy.rb
@@ -2,26 +2,10 @@ module Homebrew def diy - %w[name version].each do |opt| - if ARGV.include? "--set-#{opt}" - opoo "--set-#{opt} is deprecated, please use --#{opt}=<#{opt}> instead" - end - end - path = Pathname.getwd - version = ARGV.value "version" - version ||= if ARGV.incl...
false
Other
Homebrew
brew
8df33f74467641de025cabbc3ace4433bb15be76.json
diy: use configure as the heuristic for autotools Closes Homebrew/homebrew#30912.
Library/Homebrew/cmd/diy.rb
@@ -27,7 +27,7 @@ def diy if File.file? "CMakeLists.txt" puts "-DCMAKE_INSTALL_PREFIX=#{prefix}" - elsif File.file? "Makefile.am" + elsif File.file? "configure" puts "--prefix=#{prefix}" else raise "Couldn't determine build system"
false
Other
Homebrew
brew
d4b6d8ec962f80b9bb121b808162c094b289ec9e.json
Remove commentary from error message It might be best not to use the word "lame" here, as it's often considered to be an ableist slur. Closes Homebrew/homebrew#30915. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/extend/ARGV.rb
@@ -42,7 +42,6 @@ def kegs Multiple kegs installed to #{rack} However we don't know which one you refer to. Please delete (with rm -rf!) all but one and then try again. - Sorry, we know this is lame. EOS end end
false
Other
Homebrew
brew
3c366a56d7af3e51daac0c530a8b43ab005f31d1.json
Add key? to BottleCollector
Library/Homebrew/bottles.rb
@@ -69,7 +69,7 @@ def initialize end def fetch_checksum_for(tag) - return [@bottles[tag], tag] if @bottles[tag] + return [@bottles[tag], tag] if key?(tag) find_altivec_tag(tag) || find_or_later_tag(tag) end @@ -86,14 +86,18 @@ def []=(key, value) @bottles[key] = value end + def key?(k...
false
Other
Homebrew
brew
197dbe56011a656784e4c1dae734fabc3a3d512f.json
Remove dead code Formula objects are always constructed with an explicit name, so we no longer need to special case an empty name or the name "__UNKNOWN__".
Library/Homebrew/download_strategy.rb
@@ -1,5 +1,4 @@ require 'utils/json' -require 'erb' class AbstractDownloadStrategy attr_reader :name, :resource @@ -53,11 +52,7 @@ def extract_ref(specs) end def cache_filename(tag=cache_tag) - if name.empty? || name == '__UNKNOWN__' - "#{ERB::Util.url_encode(@url)}--#{tag}" - else - "#{n...
true
Other
Homebrew
brew
197dbe56011a656784e4c1dae734fabc3a3d512f.json
Remove dead code Formula objects are always constructed with an explicit name, so we no longer need to special case an empty name or the name "__UNKNOWN__".
Library/Homebrew/test/test_download_strategies.rb
@@ -50,16 +50,6 @@ def test_explicit_name downloader = @strategy.new("baz", @resource) assert_equal "baz--foo", downloader.cache_filename("foo") end - - def test_empty_name - downloader = @strategy.new("", @resource) - assert_equal escaped("foo"), downloader.cache_filename("foo") - end - - def tes...
true
Other
Homebrew
brew
a3dad588a855238b3576b59e90fd062b19cf55e0.json
Remove default tag value from bottle_filename We always call this method with an explicit tag.
Library/Homebrew/bottles.rb
@@ -4,7 +4,6 @@ require 'bottle_version' def bottle_filename options={} - options = { :tag => bottle_tag }.merge(options) suffix = ".#{options[:tag]}#{bottle_suffix(options[:revision])}" "#{options[:name]}-#{options[:version]}#{suffix}" end
false
Other
Homebrew
brew
de42ad52a545e36b0225d5d7c4c1a96c491c642b.json
Move pjsip to the boneyard. Will accept an updated pull request to update this to the current version. Closes Homebrew/homebrew#27235.
Library/Homebrew/tap_migrations.rb
@@ -45,6 +45,7 @@ "octave" => "homebrew/science", "opencv" => "homebrew/science", "pan" => "homebrew/boneyard", + "pjsip" => "homebrew/boneyard", "pocl" => "homebrew/science", "qfits" => "homebrew/boneyard", "qrupdate" => "homebrew/science",
false
Other
Homebrew
brew
1e184138489707dcbaef73dd23a600d63ab661cf.json
Fix reference to ISSUES_URL Fixes Homebrew/homebrew#30848.
Library/brew.rb
@@ -165,7 +165,7 @@ def require? path rescue Exception => e onoe e puts "#{Tty.white}Please report this bug:" - puts " #{Tty.em}#{ISSUES_URL}#{Tty.reset}" + puts " #{Tty.em}#{OS::ISSUES_URL}#{Tty.reset}" puts e.backtrace exit 1 else
false
Other
Homebrew
brew
272cb4db26fb896ac175507c4698e8d715b9c93c.json
Remove default value from bottle_suffix parameter We always call this method with an argument, so we can simplify it.
Library/Homebrew/bottles.rb
@@ -25,8 +25,8 @@ def bottle_file_outdated? f, file bottle_ext && bottle_url_ext && bottle_ext != bottle_url_ext end -def bottle_suffix revision=nil - revision = revision.to_i > 0 ? ".#{revision}" : "" +def bottle_suffix revision + revision = revision > 0 ? ".#{revision}" : "" ".bottle#{revision}.tar.gz" en...
false
Other
Homebrew
brew
74ae43c69098edda6b42ac29686b1ad054519132.json
Use accessor method in test
Library/Homebrew/test/test_software_spec.rb
@@ -117,8 +117,8 @@ def test_checksum_setters end checksums.each_pair do |cat, sha1| - hsh, _ = @spec.collector.fetch_bottle_for(cat) - assert_equal Checksum.new(:sha1, sha1), hsh + checksum, _ = @spec.checksum_for(cat) + assert_equal Checksum.new(:sha1, sha1), checksum end end
false
Other
Homebrew
brew
237fa3164dcb56f6de3b875ed9fe9b47c7b0712b.json
Use a hash to cache compiler version lookups
Library/Homebrew/os/mac.rb
@@ -121,16 +121,12 @@ def clang_build_version end def non_apple_gcc_version(cc) - path = HOMEBREW_PREFIX.join("opt/gcc/bin/#{cc}") - path = nil unless path.exist? - - return unless path ||= locate(cc) - - ivar = "@#{cc.gsub(/(-|\.)/, '')}_version" - return instance_variable_get(ivar...
false
Other
Homebrew
brew
7b1ca1d152b732fad3fa74651da8c4baff273b15.json
Compare cellar and prefix against constants
Library/Homebrew/cmd/bottle.rb
@@ -12,12 +12,12 @@ <% if root_url != BottleSpecification::DEFAULT_ROOT_URL %> root_url "<%= root_url %>" <% end %> - <% if prefix.to_s != "/usr/local" %> + <% if prefix != BottleSpecification::DEFAULT_PREFIX %> prefix "<%= prefix %>" <% end %> <% if cellar.is_a? Symbol %> cella...
false
Other
Homebrew
brew
58464287bc35282a5001a1f9a3f69cecc7c552c7.json
Use pkg_version accessor
Library/Homebrew/cmd/bottle.rb
@@ -244,12 +244,9 @@ def merge end end - version = f.version.to_s - version += "_#{f.revision}" if f.revision.to_i > 0 - HOMEBREW_REPOSITORY.cd do safe_system "git", "commit", "--no-edit", "--verbose", - "--message=#{f.name}: #{update_or_add} #{version}...
false
Other
Homebrew
brew
1eafe3bc354626b3d54164c263a5c57313d8eeeb.json
Handle conflicts where links point at symlinks Fixes Homebrew/homebrew#30664.
Library/Homebrew/keg.rb
@@ -322,11 +322,12 @@ def delete_pyc_files! private def resolve_any_conflicts dst, mode - # if it isn't a directory then a severe conflict is about to happen. Let - # it, and the exception that is generated will message to the user about - # the situation - if dst.symlink? and dst.directory? - ...
true
Other
Homebrew
brew
1eafe3bc354626b3d54164c263a5c57313d8eeeb.json
Handle conflicts where links point at symlinks Fixes Homebrew/homebrew#30664.
Library/Homebrew/test/test_keg.rb
@@ -217,4 +217,20 @@ def test_symlinks_are_linked_directly assert_predicate link.resolved_path, :symlink? assert_predicate link.lstat, :symlink? end + + def test_links_to_symlinks_are_not_removed + a = HOMEBREW_CELLAR.join("a", "1.0") + b = HOMEBREW_CELLAR.join("b", "1.0") + + a.join("lib", "exam...
true
Other
Homebrew
brew
1fb16775328d6022643856de146d54d4654e880e.json
Linuxbrew: Move ISSUES_URL to os from global Closes Homebrew/linuxbrew#103 Closes Homebrew/homebrew#30830. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/exceptions.rb
@@ -177,7 +177,7 @@ def fetch_issues def dump if not ARGV.verbose? puts - puts "#{Tty.red}READ THIS#{Tty.reset}: #{Tty.em}#{ISSUES_URL}#{Tty.reset}" + puts "#{Tty.red}READ THIS#{Tty.reset}: #{Tty.em}#{OS::ISSUES_URL}#{Tty.reset}" if formula.tap? tap_issues_url = "https://github....
true
Other
Homebrew
brew
1fb16775328d6022643856de146d54d4654e880e.json
Linuxbrew: Move ISSUES_URL to os from global Closes Homebrew/linuxbrew#103 Closes Homebrew/homebrew#30830. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Library/Homebrew/global.rb
@@ -98,7 +98,6 @@ module Homebrew alias_method :failed?, :failed end -ISSUES_URL = "https://github.com/Homebrew/homebrew/wiki/troubleshooting" HOMEBREW_PULL_OR_COMMIT_URL_REGEX = 'https:\/\/github.com\/(\w+)\/homebrew(-\w+)?\/(pull\/(\d+)|commit\/\w{4,40})' require 'compat' unless ARGV.include? "--no-compat" ...
true