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 | 0ec7e3928734cab72e29e5e5dc6ebf558f18312b.json | Add ENV.refurbish_args helper
Rationale: our arg refurbishment is normally only turned on when
called via the `make` wrapper, for compatibility reasons. However,
there are numberous places we'd like this to be turned on elsewhere,
like software that builds via `python setup.py` where bad flags from
the system python c... | Library/Homebrew/extend/ENV/super.rb | @@ -295,6 +295,10 @@ def libstdcxx
end
end
+ def refurbish_args
+ append 'HOMEBREW_CCCFG', "O", ''
+ end
+
# m32 on superenv does not add any CC flags. It prevents "-m32" from being erased.
def m32
append 'HOMEBREW_CCCFG', "3", '' | true |
Other | Homebrew | brew | 7c5e0eb507f65418a8e721fa584de05f8122a7c5.json | Put constant strings in a constant | Library/Homebrew/keg.rb | @@ -17,6 +17,18 @@ def initialize path
case d when 'LinkedKegs' then HOMEBREW_LIBRARY/d else HOMEBREW_PREFIX/d end
end
+ # These paths relative to the keg's share directory should always be real
+ # directories in the prefix, never symlinks.
+ SHARE_PATHS = %w[
+ aclocal doc info locale man
+ man/man... | false |
Other | Homebrew | brew | 1f0d424459e3c3a3002d5a6788904b8e4abdf9f0.json | link: fix output ordering when exceptions are raised | Library/Homebrew/cmd/link.rb | @@ -52,6 +52,17 @@ def keg_only?(name)
# an exception is thrown, its output starts on a new line.
def print str, &block
Kernel.print str
+
+ STDERR.extend Module.new {
+ def puts(*args)
+ unless $did_puts
+ STDOUT.puts
+ $did_puts = true
+ end
+ super
+ end... | false |
Other | Homebrew | brew | ad7911bb7518574b8faac9d418ab7d5fdcf55c11.json | Replace files atomically when relocating, take two | Library/Homebrew/keg_fix_install_names.rb | @@ -38,16 +38,14 @@ def relocate_install_names old_prefix, new_prefix, old_cellar, new_cellar, optio
end
end
- (pkgconfig_files | libtool_files | script_files).each do |file|
- file.ensure_writable do
- file.open('rb') do |f|
- s = f.read
- s.gsub!(old_cellar, new_cellar)
... | false |
Other | Homebrew | brew | f6b5c83482b9ebbd390831f41767f9dd9b33162f.json | Fix conflicting symlink advice
Closes Homebrew/homebrew#27899. | Library/Homebrew/extend/pathname.rb | @@ -298,23 +298,22 @@ def make_relative_symlink src
# NOTE only system ln -s will create RELATIVE symlinks
quiet_system 'ln', '-s', src.relative_path_from(self.dirname), self.basename
if not $?.success?
- if self.exist?
+ if symlink? && exist? || symlink?
raise <<-EOS.unden... | false |
Other | Homebrew | brew | 7b389fbfed442fda8a013af9bdf5b65a4f5934dd.json | Replace files atomically in inreplace | Library/Homebrew/utils/inreplace.rb | @@ -2,12 +2,10 @@ module Utils
module Inreplace
def inreplace paths, before=nil, after=nil
Array(paths).each do |path|
- f = File.open(path, 'rb')
- s = f.read
+ s = File.open(path, "rb", &:read)
if before.nil? && after.nil?
- s.extend(StringInreplaceExtension)
- ... | false |
Other | Homebrew | brew | 91d31ae1f43cade6fac808b6042133c328638274.json | Replace files atomically when relocating | Library/Homebrew/keg_fix_install_names.rb | @@ -40,13 +40,10 @@ def relocate_install_names old_prefix, new_prefix, old_cellar, new_cellar, optio
(pkgconfig_files | libtool_files | script_files).each do |file|
file.ensure_writable do
- file.open('rb') do |f|
- s = f.read
- s.gsub!(old_cellar, new_cellar)
- s.gsub!(o... | false |
Other | Homebrew | brew | 03fca453c444cc8c37caf50f9ae380b7f85509c8.json | Put tempfile into binmode before writing | Library/Homebrew/extend/pathname.rb | @@ -98,6 +98,7 @@ def write content
def atomic_write content
require "tempfile"
tf = Tempfile.new(basename.to_s)
+ tf.binmode
tf.write(content)
tf.close
| false |
Other | Homebrew | brew | 50f394032f78f9b1e1a151c20008489a596d4ae9.json | Write plists atomically | Library/Homebrew/formula_installer.rb | @@ -551,9 +551,7 @@ def link
def install_plist
return unless f.plist
- # A plist may already exist if we are installing from a bottle
- f.plist_path.unlink if f.plist_path.exist?
- f.plist_path.write f.plist
+ f.plist_path.atomic_write(f.plist)
f.plist_path.chmod 0644
end
| false |
Other | Homebrew | brew | 6e86976920f97eafaa8fcd2819b1ab3d63375059.json | Revert "doctor: use double quotes for setting PATH."
I'm an idiot.
This reverts commit f890e4973840a66a522189c8e5530bff61d17162. | Library/Homebrew/cmd/doctor.rb | @@ -474,7 +474,7 @@ def check_user_path_1
Consider setting your PATH so that #{HOMEBREW_PREFIX}/bin
occurs before /usr/bin. Here is a one-liner:
- echo export PATH="#{HOMEBREW_PREFIX}/bin:$PATH" >> ~/.bash_profile
+ echo export PATH='#{HOMEBREW_PREFIX}/bin:$PATH... | false |
Other | Homebrew | brew | 0d898edc3761dd2675d86c436a589be49407d55b.json | doctor: use double quotes for setting PATH.
Closes Homebrew/homebrew#27619. | Library/Homebrew/cmd/doctor.rb | @@ -474,7 +474,7 @@ def check_user_path_1
Consider setting your PATH so that #{HOMEBREW_PREFIX}/bin
occurs before /usr/bin. Here is a one-liner:
- echo export PATH='#{HOMEBREW_PREFIX}/bin:$PATH' >> ~/.bash_profile
+ echo export PATH="#{HOMEBREW_PREFIX}/bin:$PATH... | false |
Other | Homebrew | brew | e4f291084aaa97cad176f13268420b2fbc899ab0.json | bottle_version: handle pazpar2 style. | Library/Homebrew/bottle_version.rb | @@ -9,12 +9,16 @@ def self._parse spec
# e.g. x264-r2197.4.mavericks.bottle.tar.gz
# e.g. lz4-r114.mavericks.bottle.tar.gz
- m = /(r\d+\.?\d*)/.match(stem)
+ m = /-(r\d+\.?\d*)/.match(stem)
+ return m.captures.first unless m.nil?
+
+ # e.g. 1.6.39 from pazpar2-1.6.39.mavericks.bottle.tar.gz
+ ... | true |
Other | Homebrew | brew | e4f291084aaa97cad176f13268420b2fbc899ab0.json | bottle_version: handle pazpar2 style. | Library/Homebrew/test/test_bottle_versions.rb | @@ -30,4 +30,9 @@ def test_lz4_style
assert_version_detected 'r114',
'/usr/local/lz4-r114.mavericks.bottle.tar.gz'
end
+
+ def test_pazpar2_style
+ assert_version_detected '1.6.39',
+ '/usr/local/pazpar2-1.6.39.mavericks.bottle.tar.gz'
+ end
end | true |
Other | Homebrew | brew | da0df8eabea0caf939af80ed7f0226a4b1c0fefd.json | Expose some keg methods | Library/Homebrew/keg_fix_install_names.rb | @@ -91,8 +91,6 @@ def each_unique_file_matching string
end
end
- private
-
def install_name_tool(*args)
system(MacOS.locate("install_name_tool"), *args)
end | false |
Other | Homebrew | brew | 497123f7ecc6b82225b0c0afc81b2411679d64cc.json | LD64Dependency: adjust initializer signature
The method signature of Dependency changed in
1fdf69b90382c43493a5f62f0020729289db6c70, however LD64Dependency was
missed in the update. This resulted in failures in merge_repeats(),
which creates many dependency objects using all three arguments. | Library/Homebrew/requirements/ld64_dependency.rb | @@ -4,7 +4,7 @@
# formula is used as gcc's ld in place of the old version
# that comes with the OS.
class LD64Dependency < Dependency
- def initialize(name='ld64', tags=[:build])
+ def initialize(name='ld64', tags=[:build], env_proc=nil)
@env_proc = proc { ENV.ld64 }
super
end | false |
Other | Homebrew | brew | 26c93c95446976da121ad76929f2224d3088bf1f.json | Drop inaccurate comment
require "time"
Time.parse(Time.now.to_s) | Library/Homebrew/tab.rb | @@ -24,7 +24,7 @@ def self.create f, compiler, stdlib, args
:built_as_bottle => !!ARGV.build_bottle?,
:poured_from_bottle => false,
:tapped_from => f.tap,
- :time => Time.now.to_i, # to_s would be better but Ruby has no from_s function :P
+ :time => Time.now.... | false |
Other | Homebrew | brew | f0966cf6b6b74f71aa640b8408e2d373aea7e469.json | Use canonicalized path for loaded install receipts | Library/Homebrew/tab.rb | @@ -32,7 +32,7 @@ def self.create f, compiler, stdlib, args
def self.from_file path
tab = Tab.new Utils::JSON.load(File.read(path))
- tab.tabfile = path
+ tab.tabfile = path.realpath
tab
end
| false |
Other | Homebrew | brew | a8eb84812ae62292427cafa48a2c65e8e6693d3c.json | Write install receipts atomically | Library/Homebrew/tab.rb | @@ -118,7 +118,7 @@ def to_json
end
def write
- tabfile.write to_json
+ tabfile.atomic_write(to_json)
end
def to_s | false |
Other | Homebrew | brew | c34ed98eaf64f0dafcbbba2980de09e1eaa97029.json | dependency_collector: use ArgumentError exception.
Avoids errors with `brew versions` when bottling.
References Homebrew/homebrew#27615. | Library/Homebrew/dependency_collector.rb | @@ -123,7 +123,7 @@ def parse_symbol_spec(spec, tags)
when :ld64 then LD64Dependency.new if MacOS.version < :leopard
when :ant then ant_dep(spec, tags)
else
- raise "Unsupported special dependency #{spec.inspect}"
+ raise ArgumentError, "Unsupported special dependency #{spec.inspec... | false |
Other | Homebrew | brew | 3b0eef09e9df01d2a65b596af63a39b8c3b5719c.json | Remove unnecessary swearing. | Library/Homebrew/extend/ENV/super.rb | @@ -225,7 +225,7 @@ def determine_cccfg
end
def determine_developer_dir
- # If Xcode path is fucked then this is basically a fix. In the case where
+ # If Xcode path is broken then this is basically a fix. In the case where
# nothing is valid, it still fixes most usage to supply a valid path that
... | true |
Other | Homebrew | brew | 3b0eef09e9df01d2a65b596af63a39b8c3b5719c.json | Remove unnecessary swearing. | Library/Homebrew/os/mac/xcode.rb | @@ -209,7 +209,7 @@ def outdated?
version < latest_version
end
- # Version string (a pretty damn long one) of the CLT package.
+ # Version string (a pretty long one) of the CLT package.
# Note, that different ways to install the CLTs lead to different
# version numbers.
... | true |
Other | Homebrew | brew | 9a87cb85da70e69d5a06ebf786217f280466a0bd.json | example-formula: remove double quotes, cleanup. | Library/Contributions/example-formula.rb | @@ -1,23 +1,21 @@
-require 'formula'
+require "formula"
# This is a non-functional example formula to showcase all features and
# therefore, its overly complex and dupes stuff just to comment on it.
# You may want to use `brew create` to start your own new formula!
# Documentation: https://github.com/Homebrew/hom... | false |
Other | Homebrew | brew | dc8218fdb50a303f5441e7a54866932f67669b0f.json | audit: catch new style gist URLs | Library/Homebrew/cmd/audit.rb | @@ -304,7 +304,8 @@ def audit_patches
def audit_patch(patch)
case patch.url
- when %r[raw\.github\.com], %r[gist\.github\.com/raw], %r[gist\.github\.com/.+/raw]
+ when %r[raw\.github\.com], %r[gist\.github\.com/raw], %r[gist\.github\.com/.+/raw],
+ %r[gist\.githubusercontent\.com/.+/raw]
unl... | false |
Other | Homebrew | brew | 7f33a84ce6e006ef50fd308ee0e2a145a8b481d5.json | Expand paths before making relative symlink
Fixes Homebrew/homebrew#27702.
Fixes Homebrew/homebrew#27704. | Library/Homebrew/extend/pathname.rb | @@ -80,9 +80,10 @@ def install_symlink *sources
end
def install_symlink_p src, new_basename=src
+ src = Pathname(src).expand_path(self)
dst = join File.basename(new_basename)
mkpath
- FileUtils.ln_s Pathname(src).relative_path_from(dst.parent), dst
+ FileUtils.ln_s src.relative_path_from(dst.... | false |
Other | Homebrew | brew | aa7ed10968508f0390fba88c3bb2f2b0e8db9415.json | Make relative symlinks in Pathname#install_symlink
Closes Homebrew/homebrew#27672. | Library/Homebrew/extend/pathname.rb | @@ -79,14 +79,10 @@ def install_symlink *sources
end
end
- def install_symlink_p src, new_basename = nil
- if new_basename.nil?
- dst = self+File.basename(src)
- else
- dst = self+File.basename(new_basename)
- end
+ def install_symlink_p src, new_basename=src
+ dst = join File.basename... | true |
Other | Homebrew | brew | aa7ed10968508f0390fba88c3bb2f2b0e8db9415.json | Make relative symlinks in Pathname#install_symlink
Closes Homebrew/homebrew#27672. | Library/Homebrew/test/test_pathname.rb | @@ -194,6 +194,8 @@ def test_install_symlink
assert((@dst+'bin').directory?)
assert((@dst+'bin/a.txt').exist?)
assert((@dst+'bin/b.txt').exist?)
+
+ assert((@dst+'bin').readlink.relative?)
end
end
| true |
Other | Homebrew | brew | e0c1f5aef69470ed70ba4ec352e187b7ecc9b46d.json | Remove redundant method
This already happens in the superclass. | Library/Homebrew/patch.rb | @@ -139,11 +139,6 @@ def initialize(strip, url)
resource.download_strategy = CurlDownloadStrategy
end
- def owner= owner
- super
- resource.version = ERB::Util.url_encode(resource.url)
- end
-
def fetch
clear_cache
super | false |
Other | Homebrew | brew | d3c8e2f9cb78b5b78f95729e8c60fb5ad6daf90d.json | brew-pull: handle syntax errors in formulae. | Library/Contributions/cmd/brew-pull.rb | @@ -81,8 +81,10 @@ def tap arg
status, filename = line.split
# Don't try and do anything to removed files.
if (status =~ /A|M/) && (filename =~ %r{Formula/.+\.rb$}) || tap(url)
- formula = File.basename(filename, '.rb')
- changed_formulae << Formula.factory(formula)
+ formula_name = File.b... | false |
Other | Homebrew | brew | e236901e56addff6c887db15c7db47360e463359.json | Use canonicalized name in NoSuchKegError message
cf. Homebrew/homebrew#22778. | Library/Homebrew/extend/ARGV.rb | @@ -19,15 +19,17 @@ def kegs
require 'formula'
@kegs ||= downcased_unique_named.collect do |name|
canonical_name = Formula.canonical_name(name)
- rack = HOMEBREW_CELLAR + if canonical_name.include? "/"
+
+ if canonical_name.include? "/"
# canonical_name returns a path if it was a for... | false |
Other | Homebrew | brew | 251bd707a25cc81fbe54052f4d48134e1b19ea37.json | Remove use of Forwardable from ExternalPatch | Library/Homebrew/patch.rb | @@ -1,7 +1,6 @@
require 'resource'
require 'stringio'
require 'erb'
-require 'forwardable'
class Patch
def self.create(strip, io=nil, &block)
@@ -85,13 +84,8 @@ def inspect
end
class ExternalPatch < Patch
- extend Forwardable
-
attr_reader :resource, :strip
- def_delegators :@resource, :fetch, :veri... | false |
Other | Homebrew | brew | afec712a869c4f857781b05bd97b5d141848702b.json | python_dependency: move bottle check into method. | Library/Homebrew/requirements/python_dependency.rb | @@ -7,7 +7,7 @@ class PythonDependency < Requirement
satisfy :build_env => false do
# Always build bottles against Homebrew Python as they still work
# against a 2.7 system Python.
- next if ARGV.build_bottle?
+ next if build_bottle?
python = which_python
next unless python
version = p... | false |
Other | Homebrew | brew | c91c2c10d8f4850c7d82434e3832beb7fdd2d187.json | Add inspect methods to patch classes | Library/Homebrew/patch.rb | @@ -78,6 +78,10 @@ def apply
# in case we are indirectly referenced by an exception later.
@io = nil
end
+
+ def inspect
+ "#<#{self.class}: #{strip.inspect}>"
+ end
end
class ExternalPatch < Patch
@@ -108,6 +112,10 @@ def apply
safe_system "/usr/bin/patch", "-g", "0", "-f", "-d", dir, "-#{... | false |
Other | Homebrew | brew | a5a78ce3c6ad2d26707e7e159c74c3bbc1189341.json | Drop version from cached patch filenames | Library/Homebrew/patch.rb | @@ -96,8 +96,8 @@ def initialize(strip, &block)
def owner= owner
resource.owner = owner
- resource.name = "patch-#{resource.checksum}"
- resource.version = owner.version
+ resource.name = "patch"
+ resource.version = resource.checksum
end
def apply
@@ -119,7 +119,7 @@ def initializ... | false |
Other | Homebrew | brew | 4f051abc3e2072af9f650b13269491d158b38157.json | Teach audit about new patches implementation | Library/Homebrew/cmd/audit.rb | @@ -292,19 +292,24 @@ def audit_specs
"#{name} resource #{resource.name.inspect}: #{problem}"
}
end
+
+ spec.patches.select(&:external?).each { |p| audit_patch(p) }
end
end
def audit_patches
- Patches.new(f.patches).select(&:external?).each do |p|
- case p.url
- ... | true |
Other | Homebrew | brew | 4f051abc3e2072af9f650b13269491d158b38157.json | Teach audit about new patches implementation | Library/Homebrew/patch.rb | @@ -86,18 +86,14 @@ class ExternalPatch < Patch
attr_reader :resource, :strip
def_delegators :@resource, :fetch, :verify_download_integrity,
- :cached_download, :clear_cache
+ :cached_download, :clear_cache, :url
def initialize(strip, &block)
@strip = strip
@resource = Resource.new(&bloc... | true |
Other | Homebrew | brew | 86cdd812a2517e6dddfe9628220e5806ca6557fb.json | Teach fetch to download patches | Library/Homebrew/cmd/fetch.rb | @@ -21,9 +21,8 @@ def fetch
fetch_formula(f.bottle)
else
fetch_formula(f)
- f.resources.each do |r|
- fetch_resource(r)
- end
+ f.resources.each { |r| fetch_resource(r) }
+ f.patchlist.select(&:external?).each { |p| fetch_patch(p) }
end
end
en... | true |
Other | Homebrew | brew | 86cdd812a2517e6dddfe9628220e5806ca6557fb.json | Teach fetch to download patches | Library/Homebrew/formula.rb | @@ -117,6 +117,10 @@ def clear_cache
active_spec.clear_cache
end
+ def patchlist
+ active_spec.patches
+ end
+
# if the dir is there, but it's empty we consider it not installed
def installed?
(dir = installed_prefix).directory? && dir.children.length > 0 | true |
Other | Homebrew | brew | 86cdd812a2517e6dddfe9628220e5806ca6557fb.json | Teach fetch to download patches | Library/Homebrew/patch.rb | @@ -1,6 +1,7 @@
require 'resource'
require 'stringio'
require 'erb'
+require 'forwardable'
class Patch
def self.create(strip, io=nil, &block)
@@ -80,8 +81,13 @@ def apply
end
class ExternalPatch < Patch
+ extend Forwardable
+
attr_reader :resource, :strip
+ def_delegators :@resource, :fetch, :verify... | true |
Other | Homebrew | brew | 16fde6fbdb094d0e31f63d69f596461ba294000f.json | Rewrite postfix conditional | Library/Homebrew/formula_installer.rb | @@ -419,7 +419,7 @@ def summary
end
def build_time
- @build_time ||= Time.now - @start_time unless interactive? or @start_time.nil?
+ @build_time ||= Time.now - @start_time if @start_time && !interactive?
end
def sanitized_ARGV_options | false |
Other | Homebrew | brew | ce5e2aa65ccd8ef129fb879d8bdcdacf78122c0b.json | Make debug an installer mode | Library/Homebrew/cmd/install.rb | @@ -114,6 +114,7 @@ def install_formula f
fi.interactive &&= :git if ARGV.flag? "--git"
fi.verbose = ARGV.verbose?
fi.verbose &&= :quieter if ARGV.quieter?
+ fi.debug = ARGV.debug?
fi.prelude
fi.install
fi.caveats | true |
Other | Homebrew | brew | ce5e2aa65ccd8ef129fb879d8bdcdacf78122c0b.json | Make debug an installer mode | Library/Homebrew/cmd/upgrade.rb | @@ -61,6 +61,7 @@ def upgrade_formula f
installer.build_from_source = ARGV.build_from_source?
installer.verbose = ARGV.verbose?
installer.verbose &&= :quieter if ARGV.quieter?
+ installer.debug = ARGV.debug?
installer.prelude
oh1 "Upgrading #{f.name}" | true |
Other | Homebrew | brew | ce5e2aa65ccd8ef129fb879d8bdcdacf78122c0b.json | Make debug an installer mode | Library/Homebrew/extend/ARGV.rb | @@ -183,7 +183,6 @@ def filter_for_dependencies
old_args = clone
flags_to_clear = %w[
- --debug -d
--devel
--HEAD
] | true |
Other | Homebrew | brew | ce5e2aa65ccd8ef129fb879d8bdcdacf78122c0b.json | Make debug an installer mode | Library/Homebrew/formula_installer.rb | @@ -25,7 +25,7 @@ def self.mode_attr_accessor(*names)
mode_attr_accessor :show_summary_heading, :show_header
mode_attr_accessor :build_from_source, :build_bottle, :force_bottle
mode_attr_accessor :ignore_deps, :only_deps, :interactive
- mode_attr_accessor :verbose
+ mode_attr_accessor :verbose, :debug
d... | true |
Other | Homebrew | brew | ce5e2aa65ccd8ef129fb879d8bdcdacf78122c0b.json | Make debug an installer mode | Library/Homebrew/test/test_ARGV.rb | @@ -49,7 +49,7 @@ def test_flag?
end
def test_filter_for_dependencies_clears_flags
- @argv << "--debug"
+ @argv << "--HEAD" << "--devel"
@argv.filter_for_dependencies { assert @argv.empty? }
end
| true |
Other | Homebrew | brew | 908d2ba7929356f4379aab722e8678ba3ea31443.json | Make interactive an installer mode | Library/Homebrew/cmd/install.rb | @@ -110,6 +110,8 @@ def install_formula f
fi.build_bottle = ARGV.build_bottle?
fi.build_from_source = ARGV.build_from_source?
fi.force_bottle = ARGV.force_bottle?
+ fi.interactive = ARGV.interactive?
+ fi.interactive &&= :git if ARGV.flag? "--git"
fi.prelude
fi.install
fi.caveats | true |
Other | Homebrew | brew | 908d2ba7929356f4379aab722e8678ba3ea31443.json | Make interactive an installer mode | Library/Homebrew/extend/ARGV.rb | @@ -185,7 +185,6 @@ def filter_for_dependencies
flags_to_clear = %w[
--debug -d
--devel
- --interactive -i
--HEAD
]
flags_to_clear.concat %w[--verbose -v] if quieter? | true |
Other | Homebrew | brew | 908d2ba7929356f4379aab722e8678ba3ea31443.json | Make interactive an installer mode | Library/Homebrew/formula_installer.rb | @@ -24,7 +24,7 @@ def self.mode_attr_accessor(*names)
attr_accessor :options
mode_attr_accessor :show_summary_heading, :show_header
mode_attr_accessor :build_from_source, :build_bottle, :force_bottle
- mode_attr_accessor :ignore_deps, :only_deps
+ mode_attr_accessor :ignore_deps, :only_deps, :interactive
... | true |
Other | Homebrew | brew | d1e6f04651ea87654d13c6a786e57581eb22ec15.json | Remove unnecessary check for pour_bottle?
@start_time will be nil if we're pouring a bottle, so we don't need to
also check pour_bottle?. | Library/Homebrew/formula_installer.rb | @@ -407,7 +407,7 @@ def summary
end
def build_time
- @build_time ||= Time.now - @start_time unless pour_bottle? or ARGV.interactive? or @start_time.nil?
+ @build_time ||= Time.now - @start_time unless ARGV.interactive? or @start_time.nil?
end
def sanitized_ARGV_options | false |
Other | Homebrew | brew | fba5bf85b020300d29dcdedfdac1e3943b217941.json | brew-unpack: use extend instead of reopening Formula | Library/Contributions/cmd/brew-unpack.rb | @@ -23,24 +23,19 @@ def self.load(filename)
end
end
-# Need to tweak the Formula class slightly so that patching is option and `DATA`
-# patches work correctly.
-class Formula
- # Create a reference to the original Formula.patch method and then override
- # so that paching only happens if the user asks.
- alia... | false |
Other | Homebrew | brew | 35093b7a372e492fa28f0f23dff159c018b26a6f.json | Revert "software_spec: set a name for bottles."
This reverts commit 7cdcd13aa08ed91a73837b73dc185ad9147f7130. | Library/Homebrew/software_spec.rb | @@ -102,11 +102,11 @@ class Bottle
attr_reader :resource, :prefix, :cellar, :revision
- def_delegators :resource, :name, :url, :fetch, :verify_download_integrity
+ def_delegators :resource, :url, :fetch, :verify_download_integrity
def_delegators :resource, :downloader, :cached_download, :clear_cache
de... | false |
Other | Homebrew | brew | 5d11b5e7a5b05728f05b143c6b07ab8b9bca8989.json | software_spec: set a name for bottles.
Avoids errors on `brew fetch --retry` with bottles. | Library/Homebrew/software_spec.rb | @@ -102,11 +102,11 @@ class Bottle
attr_reader :resource, :prefix, :cellar, :revision
- def_delegators :resource, :url, :fetch, :verify_download_integrity
+ def_delegators :resource, :name, :url, :fetch, :verify_download_integrity
def_delegators :resource, :downloader, :cached_download, :clear_cache
de... | false |
Other | Homebrew | brew | 0e52cc6188b13b80ac6059361b628ff7e998f987.json | bottle: remove pyc files before bottling.
Allows more `cellar :any` bottles. | Library/Homebrew/cmd/bottle.rb | @@ -136,6 +136,7 @@ def bottle_formula f
begin
keg.relocate_install_names prefix, Keg::PREFIX_PLACEHOLDER,
cellar, Keg::CELLAR_PLACEHOLDER, :keg_only => f.keg_only?
+ keg.delete_pyc_files!
HOMEBREW_CELLAR.cd do
# Use gzip, faster to compress than bzip2, faster to ... | false |
Other | Homebrew | brew | 916e751596535177510f0c2043ecc16c392f12e2.json | keg: add delete_pyc_files! method. | Library/Homebrew/keg.rb | @@ -196,6 +196,13 @@ def optlink
from.make_relative_symlink(self)
end
+ def delete_pyc_files!
+ Pathname.new(self).find do |pn|
+ next if pn.extname != '.pyc'
+ pn.delete
+ end
+ end
+
protected
def resolve_any_conflicts dst | false |
Other | Homebrew | brew | 0fd32118c7107cfc7c895b9a1aa9a95ef2986423.json | requirements: remove unneeded Python27Dependency.
PythonDependency now implies this. | Library/Homebrew/requirements.rb | @@ -118,12 +118,3 @@ class GitDependency < Requirement
default_formula 'git'
satisfy { which('git') }
end
-
-class Python27Dependency < Requirement
- fatal true
- default_formula 'python'
- satisfy do
- # Note that python -V outputs to stderr
- `python -V 2>&1` =~ /^Python 2.7/
- end
-end | false |
Other | Homebrew | brew | d8ef8d4f82417459af359109d33d2d2a4e1cb693.json | caveats: recommend Python .pth file instead.
This is better than PYTHONPATH as it doesn't mess with incompatible
versions of Python.
Closes Homebrew/homebrew#27138. | Library/Homebrew/caveats.rb | @@ -46,17 +46,22 @@ def zsh_completion_caveats
end
def python_caveats
+ return unless keg
+ return unless keg.python_site_packages_installed?
+ return if Formula["python"].installed?
site_packages = if f.keg_only?
"#{f.opt_prefix}/lib/python2.7/site-packages"
else
"#{HOMEBREW_PR... | false |
Other | Homebrew | brew | 5bd5e055415c31d13cd96742a4109e35b9523502.json | Recognize Xcode 5.1 and CLT 5.1
Closes Homebrew/homebrew#27389.
Fixes Homebrew/homebrew#27390. | Library/Homebrew/os/mac.rb | @@ -249,6 +249,7 @@ def preferred_arch
"5.0" => { :clang => "5.0", :clang_build => 500 },
"5.0.1" => { :clang => "5.0", :clang_build => 500 },
"5.0.2" => { :clang => "5.0", :clang_build => 500 },
+ "5.1" => { :clang => "5.1", :clang_build => 503 },
}
def compilers_standard? | true |
Other | Homebrew | brew | 5bd5e055415c31d13cd96742a4109e35b9523502.json | Recognize Xcode 5.1 and CLT 5.1
Closes Homebrew/homebrew#27389.
Fixes Homebrew/homebrew#27390. | Library/Homebrew/os/mac/xcode.rb | @@ -26,12 +26,12 @@ def latest_version
when "10.5" then "3.1.4"
when "10.6" then "3.2.6"
when "10.7" then "4.6.3"
- when "10.8" then "5.0.2"
- when "10.9" then "5.0.2"
+ when "10.8" then "5.1"
+ when "10.9" th... | true |
Other | Homebrew | brew | 7b6fa8b7bb6538650c6915ec19b17c243ea36229.json | Inline install_bottle? logic into the installer | Library/Homebrew/bottles.rb | @@ -8,22 +8,6 @@ def bottle_filename options={}
"#{options[:name]}-#{options[:version]}#{bottle_native_suffix(options)}"
end
-def install_bottle? f, options={:warn=>false}
- return true if f.local_bottle_path
- return true if ARGV.force_bottle?
- return false unless f.pour_bottle?
- return false unless f.bott... | true |
Other | Homebrew | brew | 7b6fa8b7bb6538650c6915ec19b17c243ea36229.json | Inline install_bottle? logic into the installer | Library/Homebrew/formula_installer.rb | @@ -38,7 +38,28 @@ def initialize ff
def pour_bottle? install_bottle_options={:warn=>false}
return false if @pour_failed
return false if build_from_source || build_bottle
- options.empty? && install_bottle?(f, install_bottle_options)
+ return false unless options.empty?
+
+ return true if f.local_... | true |
Other | Homebrew | brew | 2182ce4d16db17d951ac56911c01dfae2c4236fc.json | Remove some obsoleted hacks from the installer | Library/Homebrew/formula_installer.rb | @@ -247,10 +247,6 @@ def expand_requirements
end
def expand_dependencies(deps)
- # FIXME: can't check this inside the block for the top-level dependent
- # because it depends on the contents of ARGV.
- pour_bottle = pour_bottle?
-
inherited_options = {}
expanded_deps = ARGV.filter_for_depen... | false |
Other | Homebrew | brew | 7da459874fa289d3ebe8b82693e85893499a3148.json | Make bottle implementation more generic | Library/Homebrew/bottles.rb | @@ -3,20 +3,18 @@
require 'extend/ARGV'
require 'bottle_version'
-def bottle_filename f, options={}
+def bottle_filename options={}
options = { :tag => bottle_tag }.merge(options)
- name = f.name.downcase
- version = PkgVersion.new(f.stable.version, f.revision)
- options[:revision] ||= f.bottle.revision.to_i ... | true |
Other | Homebrew | brew | 7da459874fa289d3ebe8b82693e85893499a3148.json | Make bottle implementation more generic | Library/Homebrew/formula.rb | @@ -18,7 +18,7 @@ class Formula
extend BuildEnvironmentDSL
attr_reader :name, :path, :homepage, :build
- attr_reader :stable, :bottle, :devel, :head, :active_spec
+ attr_reader :stable, :devel, :head, :active_spec
attr_reader :pkg_version, :revision
# The current working directory during builds and te... | true |
Other | Homebrew | brew | 7da459874fa289d3ebe8b82693e85893499a3148.json | Make bottle implementation more generic | Library/Homebrew/software_spec.rb | @@ -12,6 +12,7 @@ class SoftwareSpec
attr_reader :name
attr_reader :build, :resources, :owner
attr_reader :dependency_collector
+ attr_reader :bottle_specification
def_delegators :@resource, :stage, :fetch, :verify_download_integrity
def_delegators :@resource, :cached_download, :clear_cache
@@ -23,6 +... | true |
Other | Homebrew | brew | 7da459874fa289d3ebe8b82693e85893499a3148.json | Make bottle implementation more generic | Library/Homebrew/test/test_formula.rb | @@ -182,7 +182,6 @@ def initialize(name="spec_test_ball", path=nil)
assert_equal f.stable, f.active_spec
assert_instance_of SoftwareSpec, f.stable
- assert_instance_of Bottle, f.bottle
assert_instance_of SoftwareSpec, f.devel
assert_instance_of HeadSoftwareSpec, f.head
end
@@ -216,15 +215,15... | true |
Other | Homebrew | brew | 7da459874fa289d3ebe8b82693e85893499a3148.json | Make bottle implementation more generic | Library/Homebrew/test/test_formula_spec_selection.rb | @@ -34,17 +34,6 @@ def test_selects_devel_when_requested
assert_spec_selected :devel
end
- def test_selects_bottle_when_available
- formula do
- def install_bottle?(*); true; end
-
- url 'foo-1.0'
- bottle { sha1 TEST_SHA1 => bottle_tag }
- end
-
- assert_spec_selected :bottle
- end
... | true |
Other | Homebrew | brew | 7da459874fa289d3ebe8b82693e85893499a3148.json | Make bottle implementation more generic | Library/Homebrew/test/test_software_spec.rb | @@ -98,9 +98,9 @@ def test_verify_download_integrity
end
end
-class BottleTests < Test::Unit::TestCase
+class BottleSpecificationTests < Test::Unit::TestCase
def setup
- @spec = Bottle.new
+ @spec = BottleSpecification.new
end
def test_checksum_setters | true |
Other | Homebrew | brew | 42e60f7c59d3c479670d357f7a10356e0b195410.json | Make build_bottle an explicit installer mode | Library/Homebrew/cmd/install.rb | @@ -106,6 +106,7 @@ def install_formula f
fi = FormulaInstaller.new(f)
fi.ignore_deps = ARGV.ignore_deps? || ARGV.interactive?
fi.only_deps = ARGV.only_deps?
+ fi.build_bottle = ARGV.build_bottle?
fi.prelude
fi.install
fi.caveats | true |
Other | Homebrew | brew | 42e60f7c59d3c479670d357f7a10356e0b195410.json | Make build_bottle an explicit installer mode | Library/Homebrew/extend/ARGV.rb | @@ -144,7 +144,7 @@ def bottle_arch
def build_from_source?
include? '--build-from-source' or !ENV['HOMEBREW_BUILD_FROM_SOURCE'].nil? \
- or build_head? or build_devel? or build_universal? or build_bottle?
+ or build_head? or build_devel? or build_universal?
end
def flag? flag
@@ -184,7 +184,... | true |
Other | Homebrew | brew | 42e60f7c59d3c479670d357f7a10356e0b195410.json | Make build_bottle an explicit installer mode | Library/Homebrew/formula.rb | @@ -80,11 +80,15 @@ def set_spec(name)
end
end
+ def select_bottle?
+ !ARGV.build_bottle? && install_bottle?(self)
+ end
+
def determine_active_spec
case
when head && ARGV.build_head? then head # --HEAD
when devel && ARGV.build_devel? then devel # --devel
- when bott... | true |
Other | Homebrew | brew | 42e60f7c59d3c479670d357f7a10356e0b195410.json | Make build_bottle an explicit installer mode | Library/Homebrew/formula_installer.rb | @@ -118,7 +118,7 @@ def install
return if only_deps
- if ARGV.build_bottle? && (arch = ARGV.bottle_arch) && !Hardware::CPU.optimization_flags.include?(arch)
+ if build_bottle && (arch = ARGV.bottle_arch) && !Hardware::CPU.optimization_flags.include?(arch)
raise "Unrecognized architecture for --bot... | true |
Other | Homebrew | brew | b14ff8d16395c2691bda2852afe5fbbdada54398.json | dependency_collector: pass second tag as import.
Closes Homebrew/homebrew#27346. | Library/Homebrew/dependency_collector.rb | @@ -88,7 +88,7 @@ def parse_string_spec(spec, tags)
if tags.empty?
Dependency.new(spec, tags)
elsif (tag = tags.first) && LANGUAGE_MODULES.include?(tag)
- LanguageModuleDependency.new(tag, spec)
+ LanguageModuleDependency.new(tag, spec, tags[1])
elsif HOMEBREW_TAP_FORMULA_REGEX === spec
... | false |
Other | Homebrew | brew | 686f829f2f5584939c989b58d93e8e17b4d60fcc.json | language_module_dependency: handle nil import_name | Library/Homebrew/requirements/language_module_dependency.rb | @@ -3,10 +3,10 @@
class LanguageModuleDependency < Requirement
fatal true
- def initialize language, module_name, import_name=module_name
+ def initialize language, module_name, import_name=nil
@language = language
@module_name = module_name
- @import_name = import_name
+ @import_name = import_n... | false |
Other | Homebrew | brew | 53c2532c262826353c6dfe6e56d2a35ecc9d2a1c.json | SUPPORTERS: remove link on user request. | SUPPORTERS.md | @@ -450,7 +450,7 @@ These wonderful people supported our Kickstarter by giving us £10 or more:
* [Gerry Cardinal III](http://gerrycardinal.com/)
* [Andrew Kalek](http://anlek.com)
* [Bryan Coe](http://www.BryanACoe.com)
-* [360 Virtual Tours](http://www.360virtualtours.co.uk)
+* 360 Virtual Tours
* [James Turnbull]... | false |
Other | Homebrew | brew | f155b0570e97c51a88392b91062f4a74a85b1f1b.json | Revert "ENV: request no byte code Python when bottling."
This reverts commit b603c96276cf7fe1417d2355eebc47fb15da0b8c. | Library/Homebrew/extend/ENV/std.rb | @@ -53,8 +53,6 @@ def setup_build_environment(formula=nil)
self['CMAKE_FRAMEWORK_PATH'] = HOMEBREW_PREFIX/"Frameworks"
end
- self['PYTHONDONTWRITEBYTECODE'] = "1" if ARGV.build_bottle?
-
# Os is the default Apple uses for all its stuff so let's trust them
set_cflags "-Os #{SAFE_CFLAGS_FLAGS}"... | true |
Other | Homebrew | brew | f155b0570e97c51a88392b91062f4a74a85b1f1b.json | Revert "ENV: request no byte code Python when bottling."
This reverts commit b603c96276cf7fe1417d2355eebc47fb15da0b8c. | Library/Homebrew/extend/ENV/super.rb | @@ -84,7 +84,6 @@ def setup_build_environment(formula=nil)
self['CMAKE_LIBRARY_PATH'] = determine_cmake_library_path
self['ACLOCAL_PATH'] = determine_aclocal_path
self['M4'] = MacOS.locate("m4") if deps.include? "autoconf"
- self['PYTHONDONTWRITEBYTECODE'] = "1" if ARGV.build_bottle?
# The HOME... | true |
Other | Homebrew | brew | d476a84f4f1829cff818d18458d77f17c698fc92.json | FormulaLoader: pull shared behavior into superclass | Library/Homebrew/formulary.rb | @@ -38,8 +38,9 @@ class FormulaLoader
attr_reader :path
# Gets the formula instance.
- # Subclasses must define this.
- def get_formula; end
+ def get_formula
+ klass.new(name, path)
+ end
# Return the Class for this formula, `require`-ing it if
# it has not been parsed before.
... | false |
Other | Homebrew | brew | 452d671008db6d61b78e18f25db0c7308b8a24a2.json | add opt shortcuts to formula | Library/Homebrew/formula.rb | @@ -224,6 +224,13 @@ def opt_prefix
Pathname.new("#{HOMEBREW_PREFIX}/opt/#{name}")
end
+ def opt_bin; opt_prefix+'bin' end
+ def opt_include; opt_prefix+'include' end
+ def opt_lib; opt_prefix+'lib' end
+ def opt_libexec; opt_prefix+'libexec' end
+ def opt_sbin; opt_prefix+'sbin' en... | false |
Other | Homebrew | brew | 037acb81c82e852aa037b3f8ef70d5f480b34bd5.json | Fix cleanup for head-only formulae
Fixes Homebrew/homebrew#27265. | Library/Homebrew/cmd/cleanup.rb | @@ -68,8 +68,8 @@ def cleanup_cache
next
end
- v = f.stable.version || f.devel.version || f.head.version
- if v > version || ARGV.switch?('s') && !f.installed? || bottle_file_outdated?(f, file)
+ spec = f.stable || f.devel || f.head
+ if spec.version > version || ARGV.switch?('s') ... | false |
Other | Homebrew | brew | 6c378a69a29b3aa126d0c6f38f13b5cf7c7ac53e.json | update migrations for style | Library/Homebrew/tap_migrations.rb | @@ -1,24 +1,24 @@
TAP_MIGRATIONS = {
- 'octave' => 'homebrew/science',
- 'opencv' => 'homebrew/science',
- 'grads' => 'homebrew/binary',
- 'denyhosts' => 'homebrew/boneyard',
- 'ipopt' => 'homebrew/science',
- 'qfits' => 'homebrew/boneyard',
- 'blackbox' => 'homebrew/boneyard',
- 'libgtextutils' => 'homebrew/s... | false |
Other | Homebrew | brew | 44dc21ca5d231d7860f0abe82fcb1406eee955f7.json | Prepare bottle tooling for formula revisions | Library/Homebrew/bottles.rb | @@ -6,7 +6,7 @@
def bottle_filename f, options={}
options = { :tag => bottle_tag }.merge(options)
name = f.name.downcase
- version = f.stable.version
+ version = PkgVersion.new(f.stable.version, f.revision)
options[:revision] ||= f.bottle.revision.to_i if f.bottle
"#{name}-#{version}#{bottle_native_suffi... | true |
Other | Homebrew | brew | 44dc21ca5d231d7860f0abe82fcb1406eee955f7.json | Prepare bottle tooling for formula revisions | Library/Homebrew/cmd/bottle.rb | @@ -115,7 +115,7 @@ def bottle_formula f
if ARGV.include? '--no-revision'
bottle_revision = 0
else
- max = f.bottle_version_map('origin/master')[f.version].max
+ max = f.bottle_version_map('origin/master')[f.pkg_version].max
bottle_revision = max ? max + 1 : 0
end
@@ -143,7 +143... | true |
Other | Homebrew | brew | 44dc21ca5d231d7860f0abe82fcb1406eee955f7.json | Prepare bottle tooling for formula revisions | Library/Homebrew/formula.rb | @@ -49,14 +49,19 @@ def initialize name='__UNKNOWN__', path=self.class.path(name)
unless bottle.checksum.nil? || bottle.checksum.empty?
@bottle = bottle
bottle.url ||= bottle_url(self, bottle.current_tag)
- bottle.version = stable.version
+ bottle.version = PkgVersion.new(stable.v... | true |
Other | Homebrew | brew | 17032a600c374f76d8571cf643b4f9a861d26758.json | Teach commands to work with revisions | Library/Homebrew/cmd/cleanup.rb | @@ -31,7 +31,7 @@ def cleanup_cellar
def cleanup_formula f
if f.installed?
- eligible_kegs = f.rack.subdirs.map { |d| Keg.new(d) }.select { |k| f.version > k.version }
+ eligible_kegs = f.rack.subdirs.map { |d| Keg.new(d) }.select { |k| f.pkg_version > k.version }
eligible_kegs.each do |keg|
... | true |
Other | Homebrew | brew | 17032a600c374f76d8571cf643b4f9a861d26758.json | Teach commands to work with revisions | Library/Homebrew/cmd/outdated.rb | @@ -5,7 +5,7 @@ module Homebrew extend self
def outdated
outdated_brews do |f, versions|
if $stdout.tty? and not ARGV.flag? '--quiet'
- puts "#{f.name} (#{versions*', '} < #{f.version})"
+ puts "#{f.name} (#{versions*', '} < #{f.pkg_version})"
else
puts f.name
end
@@ ... | true |
Other | Homebrew | brew | 17032a600c374f76d8571cf643b4f9a861d26758.json | Teach commands to work with revisions | Library/Homebrew/cmd/upgrade.rb | @@ -36,14 +36,14 @@ def upgrade
unless outdated.empty?
oh1 "Upgrading #{outdated.length} outdated package#{outdated.length.plural_s}, with result:"
- puts outdated.map{ |f| "#{f.name} #{f.version}" } * ", "
+ puts outdated.map{ |f| "#{f.name} #{f.pkg_version}" } * ", "
else
oh1 "No p... | true |
Other | Homebrew | brew | 7e8c693218499811897ebc502aa2cac5c7ab59cc.json | Consolidate bottle defaults and remove a method | Library/Homebrew/bottles.rb | @@ -67,13 +67,8 @@ def bottle_regex
Pathname::BOTTLE_EXTNAME_RX
end
-def bottle_root_url f
- root_url = f.bottle.root_url
- root_url ||= 'https://downloads.sf.net/project/machomebrew/Bottles'
-end
-
def bottle_url f, tag=bottle_tag
- "#{bottle_root_url(f)}/#{bottle_filename(f, {:tag => tag})}"
+ "#{f.bottle.... | true |
Other | Homebrew | brew | 7e8c693218499811897ebc502aa2cac5c7ab59cc.json | Consolidate bottle defaults and remove a method | Library/Homebrew/software_spec.rb | @@ -98,7 +98,7 @@ def initialize
@revision = 0
@prefix = '/usr/local'
@cellar = '/usr/local/Cellar'
- @root_url = nil
+ @root_url = 'https://downloads.sf.net/project/machomebrew/Bottles'
end
# Checksum methods in the DSL's bottle block optionally take | true |
Other | Homebrew | brew | d55dc8d01e61afdb6d3ec3eb32af3d6d5ed9879c.json | audit: find env/export as a full word, not as a prefix
Closes Homebrew/homebrew#27219. | Library/Homebrew/cmd/audit.rb | @@ -424,7 +424,7 @@ def audit_line(line)
problem "Use \"\#{ENV.cxx}\" instead of hard-coding \"#{$3}\""
end
- if line =~ /system\s+['"](env|export)/
+ if line =~ /system\s+['"](env|export)\s+/
problem "Use ENV instead of invoking '#{$1}' to modify the environment"
end
| false |
Other | Homebrew | brew | 150b9c98179a3c6f37cd2bcebc7faa1f553d76dc.json | add options to fetch completion | Library/Contributions/brew_bash_completion.sh | @@ -191,6 +191,7 @@ _brew_fetch ()
__brewcomp "
--deps --force
--devel --HEAD
+ --build-from-source --force-bottle
$(brew options --compact "$prv" 2>/dev/null)
"
return | false |
Other | Homebrew | brew | e35adf15467feaac5f272918cbc167d0dca3da3d.json | brew-man: view the target file directly | Library/Contributions/cmd/brew-man | @@ -47,5 +47,5 @@ done
if test "$1" = '--verbose' || test "$1" = '-v'
then
- man brew
+ man $target_file
fi | false |
Other | Homebrew | brew | edd03fbe69047b84137c8e97d7494e25ecb7a4e2.json | Add wxPython as separate formula
Closes Homebrew/homebrew#25651.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/blacklist.rb | @@ -11,10 +11,6 @@ def blacklisted? name
Some build scripts fail to detect it correctly, please check existing
formulae for solutions.
EOS
- when 'wxpython' then <<-EOS.undent
- The Python bindings (import wx) for wxWidgets are installed by:
- brew install wxwidgets
- EOS
when 'tex', 'te... | false |
Other | Homebrew | brew | fdf5ecf4bbd01da5cd90bda0e10c6ac1873bc14b.json | Use name of formula rather than name of dependency
Closes Homebrew/homebrew#27192.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/leaves.rb | @@ -13,9 +13,9 @@ def leaves
f.deps.each do |dep|
if dep.optional? || dep.recommended?
tab = Tab.for_formula(f)
- deps << dep.name if tab.with?(dep.name)
+ deps << dep.to_formula.name if tab.with?(dep.to_formula.name)
else
- deps << dep.name
+ deps... | false |
Other | Homebrew | brew | 4c0db19538d69cc2d00f8455b94c85d75c9a4203.json | Extract installer setup to prelude method | Library/Homebrew/cmd/install.rb | @@ -104,6 +104,7 @@ def perform_preinstall_checks
def install_formula f
fi = FormulaInstaller.new(f)
+ fi.prelude
fi.install
fi.caveats
fi.finish | true |
Other | Homebrew | brew | 4c0db19538d69cc2d00f8455b94c85d75c9a4203.json | Extract installer setup to prelude method | Library/Homebrew/cmd/upgrade.rb | @@ -59,6 +59,7 @@ def upgrade_formula f
installer = FormulaInstaller.new(f)
installer.options |= Tab.for_formula(f).used_options
installer.show_header = false
+ installer.prelude
oh1 "Upgrading #{f.name}"
| true |
Other | Homebrew | brew | 4c0db19538d69cc2d00f8455b94c85d75c9a4203.json | Extract installer setup to prelude method | Library/Homebrew/formula_installer.rb | @@ -30,17 +30,19 @@ def initialize ff
@poured_bottle = false
@pour_failed = false
-
- verify_deps_exist unless ignore_deps
- lock
- check_install_sanity
end
def pour_bottle? install_bottle_options={:warn=>false}
return false if @pour_failed
options.empty? && install_bottle?(f, i... | true |
Other | Homebrew | brew | e8727a4eeea08b21b10e561685c898100e3697b6.json | Show full name when a installing a tap dependency | Library/Homebrew/formula_installer.rb | @@ -311,7 +311,7 @@ def install_dependency(dep, inherited_options)
fi.ignore_deps = true
fi.only_deps = false
fi.show_header = false
- oh1 "Installing #{f} dependency: #{Tty.green}#{df}#{Tty.reset}"
+ oh1 "Installing #{f} dependency: #{Tty.green}#{dep.name}#{Tty.reset}"
outdated_keg.unlink if ... | false |
Other | Homebrew | brew | 21e57856528a18ffb28393592165d7809ffdd319.json | bottle: fix bottling Git tag case. | Library/Homebrew/cmd/bottle.rb | @@ -220,7 +220,7 @@ def merge
odie 'Bottle block update failed!' unless string
else
update_or_add = 'add'
- string = s.sub!(/( (url|sha1|sha256|head|version) ['"]\S*['"]\n+)+/m, '\0' + output + "\n")
+ string = s.sub!(/( (url|sha1|sha256|head|version) ['"][\S... | false |
Other | Homebrew | brew | 9a83f63c21880f782233b23abac2f820a2c3c18d.json | Prefer Formula#name method over Formula#to_s | Library/Homebrew/build.rb | @@ -123,8 +123,8 @@ def install
end
if superenv?
- ENV.keg_only_deps = keg_only_deps.map(&:to_s)
- ENV.deps = deps.map { |d| d.to_formula.to_s }
+ ENV.keg_only_deps = keg_only_deps.map(&:name)
+ ENV.deps = deps.map { |d| d.to_formula.name }
ENV.x11 = reqs.any? { |rq| rq.kind_of?(X... | false |
Other | Homebrew | brew | 3b76987fd79be6c0ed6516bcfb3b6f870909bf9d.json | Remove another reference to subformulae | Library/Contributions/example-formula.rb | @@ -10,9 +10,7 @@
# Ruby classes have to start Upper case and dashes are not allowed.
# So we transform: `example-formula.rb` into `ExampleFormula`. Further,
# Homebrew does enforce that the name of the file and the class correspond.
-# Check with `brew search` that the name is free. A file may contain multiple
-# c... | false |
Other | Homebrew | brew | 75dd75bd2421996a5fc5519ce2540e545ee8aa74.json | Replace subformula example with a resource example | Library/Contributions/example-formula.rb | @@ -202,6 +202,16 @@ def pour_bottle?
cause 'multiple configure and compile errors'
end
+ ## Resources
+
+ # Additional downloads can be defined as resources and accessed in the
+ # install method. Resources can also be defined inside a stable, devel, or
+ # head block. This mechanism replaces ad-hoc "sub... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.