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 | 2f679153ee6c77ee1248047dad37d4070dd5f021.json | gist logs: fix error message
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Contributions/cmd/brew-gist-logs.rb | @@ -80,7 +80,7 @@ def post path, data
class HTTP_Error < RuntimeError
def initialize response
- super "Error: HTTP #{response.code} #{response.message}"
+ super "HTTP #{response.code} #{response.message}"
end
end
| false |
Other | Homebrew | brew | 92ac63fd9495e4fc75195191c36d5acebb8a6107.json | LanguageModuleDependency: remove code that only worked by accident
The array elements here are individual arguments to exec, not a string
to pass to the shell; this only appeared to work. In reality, `opam
list` accepts "|" as valid argument, and the command works fine without
grepping the output. | Library/Homebrew/requirements/language_module_dependency.rb | @@ -25,7 +25,7 @@ def the_test
when :jruby then %W{/usr/bin/env jruby -rubygems -e require\ '#{@import_name}'}
when :lua then %W{/usr/bin/env luarocks show #{@import_name}}
when :node then %W{/usr/bin/env node -e require('#{@import_name}');}
- when :ocaml then %W{/usr/bin/env opam list #{@impo... | false |
Other | Homebrew | brew | 0106cfdefff71293320c20a6bf18033bdf53aa08.json | man: add reinstall command. | Library/Contributions/manpages/brew.1.md | @@ -275,6 +275,9 @@ Note that these flags should only appear after a command.
Remove dead symlinks from the Homebrew prefix. This is generally not
needed, but can be useful when doing DIY installations.
+ * `reinstall` <formula>:
+ Uninstall then install <formula>
+
* `rm`, `remove`, `uninstall [--fo... | true |
Other | Homebrew | brew | 0106cfdefff71293320c20a6bf18033bdf53aa08.json | man: add reinstall command. | share/man/man1/brew.1 | @@ -300,6 +300,10 @@ Pin the specified \fIformulae\fR, preventing them from being upgraded when issui
Remove dead symlinks from the Homebrew prefix\. This is generally not needed, but can be useful when doing DIY installations\.
.
.TP
+\fBreinstall\fR \fIformula\fR
+Uninstall then install \fIformula\fR
+.
+.TP
\fBr... | true |
Other | Homebrew | brew | 9259b450f81dd6c7319eddc4addb1478a8bba500.json | man: use <br> instead of whitespace for linebreak. | Library/Contributions/manpages/brew.1.md | @@ -3,7 +3,7 @@ brew(1) -- The missing package manager for OS X
## SYNOPSIS
-`brew` --version
+`brew` --version<br>
`brew` command [--verbose|-v] [options] [formula] ...
## DESCRIPTION | true |
Other | Homebrew | brew | 9259b450f81dd6c7319eddc4addb1478a8bba500.json | man: use <br> instead of whitespace for linebreak. | share/man/man1/brew.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "December 2013" "Homebrew" "brew"
+.TH "BREW" "1" "January 2014" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for OS X | true |
Other | Homebrew | brew | 0d4260187237c1f8e24f9c223076e84ca4ee442d.json | Escape issue search string
Fixes Homebrew/homebrew#25779. | Library/Homebrew/utils.rb | @@ -277,10 +277,19 @@ def open url, headers={}, &block
end
def each_issue_matching(query, &block)
- uri = ISSUES_URI + query
+ uri = ISSUES_URI + uri_escape(query)
open(uri) { |f| Utils::JSON.load(f.read)['issues'].each(&block) }
end
+ def uri_escape(query)
+ if URI.respond_to?(:encode_www_f... | false |
Other | Homebrew | brew | 30e409adfd1b1b996eb3a7e6c482dd244bb84b95.json | search: handle tap not found and suggest update.
Closes Homebrew/homebrew#25706.
Closes Homebrew/homebrew#25682. | Library/Homebrew/cmd/search.rb | @@ -113,7 +113,10 @@ def search_tap user, repo, rx
end
end
results
- rescue GitHub::Error, Utils::JSON::Error
+ rescue OpenURI::HTTPError, GitHub::Error, Utils::JSON::Error
+ opoo <<-EOS.undent
+ Failed to search tap: #{user}/#{repo}. Please run `brew update`.
+ EOS
[]
end
| false |
Other | Homebrew | brew | 744a8944b0e79a79b0801616d2a6f339be0c8cca.json | caveats: show python caveats if modules installed. | Library/Homebrew/caveats.rb | @@ -7,11 +7,12 @@ def initialize(f)
def caveats
caveats = []
- caveats << f.caveats
+ caveats << f.caveats if f.caveats.to_s.length > 0
caveats << f.keg_only_text if f.keg_only? && f.respond_to?(:keg_only_text)
caveats << bash_completion_caveats
caveats << zsh_completion_caveats
cave... | true |
Other | Homebrew | brew | 744a8944b0e79a79b0801616d2a6f339be0c8cca.json | caveats: show python caveats if modules installed. | Library/Homebrew/keg.rb | @@ -92,6 +92,10 @@ def plist_installed?
end
end
+ def python_site_packages_installed?
+ (self/'lib/python2.7/site-packages').directory?
+ end
+
def version
require 'version'
Version.new(basename.to_s) | true |
Other | Homebrew | brew | cdbc7c9e53dccc17e65bb6f7f7a95a34dadf3b58.json | Pathname: add methods to write env scripts. | Library/Homebrew/extend/pathname.rb | @@ -383,6 +383,27 @@ def write_exec_script *targets
end
end
+ # Writes an exec script that sets environment variables
+ def write_env_script target, env
+ env_export = ''
+ env.each {|key, value| env_export += "#{key}=\"#{value}\" "}
+ self.write <<-EOS.undent
+ #!/bin/bash
+ #{env_export}exe... | false |
Other | Homebrew | brew | 996c7bd7d11035cd19a824e448b2bc940823bb3a.json | ENV: add method to prepend and create a PATH. | Library/Homebrew/extend/ENV/shared.rb | @@ -57,6 +57,12 @@ def prepend_path key, path
prepend key, path, File::PATH_SEPARATOR if File.directory? path
end
+ def prepend_create_path key, path
+ path = Pathname.new(path) unless path.is_a? Pathname
+ path.mkpath
+ prepend_path key, path
+ end
+
def remove keys, value
Array(keys).each... | false |
Other | Homebrew | brew | d7a61617512a120454fd3a7edd7126e050cc4633.json | Recommit ENV changes | Library/Homebrew/extend/ENV/std.rb | @@ -119,7 +119,7 @@ def gcc_4_0_1
self.cxx = "#{MacOS.dev_tools_path}/g++-4.0"
replace_in_cflags '-O4', '-O3'
set_cpu_cflags '-march=nocona -mssse3'
- @compiler = :gcc
+ @compiler = :gcc_4_0
end
alias_method :gcc_4_0, :gcc_4_0_1
@@ -131,7 +131,7 @@ def gcc
self.cc = MacOS.locate("gcc-... | true |
Other | Homebrew | brew | d7a61617512a120454fd3a7edd7126e050cc4633.json | Recommit ENV changes | Library/Homebrew/os/mac.rb | @@ -99,11 +99,12 @@ def sdk_path(v = version)
def default_cc
cc = locate 'cc'
- Pathname.new(cc).realpath.basename.to_s rescue nil
+ cc.realpath.basename.to_s rescue nil
end
def default_compiler
case default_cc
+ when /^gcc-4.0/ then :gcc_4_0
when /^gcc/ then :... | true |
Other | Homebrew | brew | 3cf2cc853d522b03fea16c599996bd55b3bc03bd.json | Revert "stdenv: fix self.cc check"
This reverts commit 0e1d52c0d3945ae0ac69383c7734e425b7fbf8f1. | Library/Homebrew/extend/ENV/std.rb | @@ -131,7 +131,7 @@ def gcc
self.cc = MacOS.locate("gcc-4.2")
self.cxx = MacOS.locate("g++-4.2")
- if cc.empty?
+ unless cc
self.cc = "#{HOMEBREW_PREFIX}/bin/gcc-4.2"
self.cxx = "#{HOMEBREW_PREFIX}/bin/g++-4.2"
raise "GCC could not be found" unless File.exist? cc | false |
Other | Homebrew | brew | 1dcf726a596001f204ff21f667447da15b76c030.json | Revert "stdenv: set correct compiler symbol for gcc 4.0"
This reverts commit f4dc5614953b3b90acc28c83262d56587b0616b1. | Library/Homebrew/extend/ENV/std.rb | @@ -119,7 +119,7 @@ def gcc_4_0_1
self.cxx = "#{MacOS.dev_tools_path}/g++-4.0"
replace_in_cflags '-O4', '-O3'
set_cpu_cflags '-march=nocona -mssse3'
- @compiler = :gcc_4_0
+ @compiler = :gcc
end
alias_method :gcc_4_0, :gcc_4_0_1
| false |
Other | Homebrew | brew | bdd2e71b3a66f9f4a434110ec7501d87cf7b256d.json | stdenv: set correct compiler symbol for gcc 4.0 | Library/Homebrew/extend/ENV/std.rb | @@ -119,7 +119,7 @@ def gcc_4_0_1
self.cxx = "#{MacOS.dev_tools_path}/g++-4.0"
replace_in_cflags '-O4', '-O3'
set_cpu_cflags '-march=nocona -mssse3'
- @compiler = :gcc
+ @compiler = :gcc_4_0
end
alias_method :gcc_4_0, :gcc_4_0_1
| false |
Other | Homebrew | brew | 5413ebca53f3850cb532437bdf2ff01cc56e040b.json | exceptions: remove unused AlreadyTappedError. | Library/Homebrew/exceptions.rb | @@ -228,11 +228,6 @@ def initialize f
end
end
-# raised in install_tap
-class AlreadyTappedError < RuntimeError
- def initialize; super "Already tapped!" end
-end
-
# raised in CurlDownloadStrategy.fetch
class CurlDownloadStrategyError < RuntimeError; end
| false |
Other | Homebrew | brew | 220c6fade13b159581a98ba5fcaab380c08f275a.json | README: add Gittip link.
Closes Homebrew/homebrew#20482. | README.md | @@ -23,10 +23,17 @@ License
-------
Code is under the [BSD 2 Clause (NetBSD) license][license].
+Donations
+---------
+We accept tips through [Gittip][tip].
+
+[](https://www.gittip.com/Homebrew/)
+
[home]:http://brew.sh
[wiki]:http://wiki.github.com/Homebrew/ho... | false |
Other | Homebrew | brew | 31ed0d6505f26d70350d348980f477e3a66440d9.json | Add python27 dependency
Fixes Homebrew/homebrew#25561.
Fixes Homebrew/homebrew#25410. | Library/Homebrew/requirements.rb | @@ -118,3 +118,12 @@ 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 | 410121d8edfc8fd35cbf3739854cb69652c82ea1.json | Replace template’s `j1` with `deparallelize`
Solely because I think `ENV.deparallelize` is *way* clearer than
`ENV.j1`, at least to the uninitiated.
Also, updating the template will reduce the number of `ENV.j1`s that
persist because the Homebrew maintainers want clean histories of
formulae. Ideally, this change shou... | Library/Homebrew/cmd/create.rb | @@ -137,7 +137,7 @@ class #{Formula.class_s name} < Formula
depends_on :x11 # if your formula requires any X11/XQuartz components
def install
- # ENV.j1 # if your formula's build system can't parallelize
+ # ENV.deparallelize # if your formula fails when building in parallel
<% if... | false |
Other | Homebrew | brew | ec2cd31c1d4327cb3ea8be3627b488387d5f7272.json | bottle: use formula path accessor | Library/Homebrew/cmd/bottle.rb | @@ -202,10 +202,9 @@ def merge
if ARGV.include? '--write'
f = Formula.factory formula_name
- formula_relative_path = "Library/Formula/#{f.name}.rb"
- formula_path = HOMEBREW_REPOSITORY+formula_relative_path
has_bottle_block = f.class.bottle.checksums.any?
- inreplace form... | false |
Other | Homebrew | brew | e29cbc5a48616ad22b5a07951887109f65cabada.json | Drop unnecessary Pathname creation | Library/Homebrew/keg_fix_install_names.rb | @@ -126,7 +126,7 @@ def each_install_name_for file, &block
def dylib_id_for file, options={}
# the shortpath ensures that library upgrades don’t break installed tools
- relative_path = Pathname.new(file).relative_path_from(self)
+ relative_path = file.relative_path_from(self)
shortpath = HOMEBREW_P... | false |
Other | Homebrew | brew | 2e22465aa41d0ff38f9d36562fccffa30eadd086.json | Apply the same filtering to -I paths as -L paths | Library/ENV/4.3/cc | @@ -134,25 +134,29 @@ class Cmd
when /^-I(.+)?/
# Support both "-Ifoo" (one argument) and "-I foo" (two arguments)
path = $1.chuzzle || whittler.next
- args << "-I#{path}" if iset.add?(path.cleanpath)
+ args << "-I#{path}" if keep?(path) and iset.add?(path.cleanpath)
when /... | false |
Other | Homebrew | brew | 095d83d10b6763ecc57f3967898113c98b920063.json | cleaner: reorganize clean_dir to avoid repeated conditional | Library/Homebrew/cleaner.rb | @@ -74,21 +74,17 @@ def clean_dir d
d.find do |path|
path.extend(NoisyPathname) if ARGV.verbose?
- if path.directory?
- # Stop cleaning this subtree if protected
- Find.prune if @f.skip_clean? path
- elsif not path.file?
- # Sanity?
+ Find.prune if @f.skip_clean? path
+... | false |
Other | Homebrew | brew | 676f29d7578c7abf1493ee5c3edc4692f9315006.json | Drop unnecessary string conversion in skip_clean | Library/Homebrew/formula.rb | @@ -766,10 +766,7 @@ def skip_clean *paths
return
end
- paths.each do |p|
- p = p.to_s unless p == :la # Keep :la in paths as a symbol
- skip_clean_paths << p
- end
+ skip_clean_paths.merge(paths)
end
def skip_clean_all? | false |
Other | Homebrew | brew | 5e1cbb50c1a9e566404f8401aea35d6d29028720.json | cleaner: add more tests for current behavior | Library/Homebrew/test/test_cleaner.rb | @@ -139,4 +139,63 @@ def test_skip_clean_symlink_when_target_pruned
assert symlink.symlink?
assert !symlink.exist?
end
+
+ def test_removes_la_files
+ file = @f.lib/'foo.la'
+
+ @f.lib.mkpath
+ touch file
+
+ Cleaner.new @f
+
+ assert !file.exist?
+ end
+
+ def test_skip_clean_la
+ fil... | false |
Other | Homebrew | brew | 8430307fa5c3e5c4699b1363da5c38ab3ef23822.json | cleaner: add tests to document current pruning behavior | Library/Homebrew/test/test_cleaner.rb | @@ -28,6 +28,36 @@ def test_clean_file
assert_equal 0100444, (@f.lib/'i386.dylib').stat.mode
end
+ def test_prunes_empty_directories
+ subdir = @f.bin/'subdir'
+ subdir.mkpath
+
+ Cleaner.new @f
+
+ assert !@f.bin.directory?
+ assert !subdir.directory?
+ end
+
+ def test_skip_clean_empty_dir... | false |
Other | Homebrew | brew | b57e6006a6c5948a94d761c6cc13423672f43389.json | cleaner: add tests to demonstrate some current failures | Library/Homebrew/test/test_cleaner.rb | @@ -27,4 +27,23 @@ def test_clean_file
assert_equal 0100444, (@f.lib/'x86_64.dylib').stat.mode
assert_equal 0100444, (@f.lib/'i386.dylib').stat.mode
end
+
+ def test_fails_to_remove_symlink_when_target_was_pruned_first
+ mkpath @f.prefix/'b'
+ ln_s 'b', @f.prefix/'a'
+ assert_raises(Errno::ENOENT... | false |
Other | Homebrew | brew | 0bb7c4d3ed91648f6326bf40486e511f52e06f43.json | prune: remove unnecessary .sort | Library/Homebrew/cmd/prune.rb | @@ -28,7 +28,7 @@ def prune
end
end
- dirs.sort.reverse_each do |d|
+ dirs.reverse_each do |d|
if ARGV.dry_run? && d.children.empty?
puts "Would remove (empty directory): #{d}"
else | false |
Other | Homebrew | brew | 4401ee08191fa84b339ae4af33719f71c6a6bd17.json | brew-test-bot: remove form feed properly. | Library/Contributions/cmd/brew-test-bot.rb | @@ -474,7 +474,7 @@ def run
failure = testcase.add_element 'failure' if step.failed?
if step.has_output?
# Remove invalid XML CData characters from step output.
- output = REXML::CData.new step.output.gsub(/\000\00c\e/, '')
+ output = REXML::CData.new step.output.delete(/\000\f\e/)
... | false |
Other | Homebrew | brew | f853ec73657559dbdec7eb10b0d91509c48240f0.json | brew-test-bot: use install --only-dependencies. | Library/Contributions/cmd/brew-test-bot.rb | @@ -277,6 +277,7 @@ def formula formula
install_args = '--verbose'
install_args << ' --build-bottle' unless ARGV.include? '--no-bottle'
install_args << ' --HEAD' if ARGV.include? '--HEAD'
+ test "brew install --only-dependencies #{formula}" unless dependencies.empty?
test "brew install #{install_... | false |
Other | Homebrew | brew | 8a2464bf25592fea926f7bf77611dd4d5c8759f9.json | Move comparepdf to boneyard
Upstream is no longer maintaining this software, and it does not
build with Xcode 5.
Closes Homebrew/homebrew#24911. | Library/Homebrew/tap_migrations.rb | @@ -17,4 +17,5 @@
'jscoverage' => 'homebrew/boneyard',
'jsl' => 'homebrew/binary',
'nlopt' => 'homebrew/science',
+ 'comparepdf' => 'homebrew/boneyard',
} | false |
Other | Homebrew | brew | 4e11656e01f4f182bf7357b2bedc2fb4f1be1fa2.json | versions: improve performance of rev_list | Library/Homebrew/cmd/versions.rb | @@ -31,7 +31,7 @@ def versions
class Formula
def versions
versions = []
- rev_list.each do |sha|
+ rev_list do |sha|
version = version_for_sha sha
unless versions.include? version or version.nil?
yield version, sha if block_given?
@@ -43,7 +43,7 @@ def versions
def bottle_vers... | false |
Other | Homebrew | brew | 5751b9e66c6d6e107e59671ced85d1eaa96ac51e.json | doctor: add instructions for remote migration. | Library/Homebrew/cmd/doctor.rb | @@ -777,6 +777,14 @@ def check_git_origin
cd #{HOMEBREW_REPOSITORY}
git remote add origin https://github.com/Homebrew/homebrew.git
EOS
+ elsif origin =~ /mxcl\/homebrew(\.git)?$/ then <<-EOS.undent
+ Outdated git origin remote found.
+
+ The main Homebrew repository has migrated to... | false |
Other | Homebrew | brew | 371858f41921f85bf1a98726c91fd9a94e8600a5.json | add nlopt to migration | Library/Homebrew/tap_migrations.rb | @@ -16,4 +16,5 @@
'lmutil' => 'homebrew/binary',
'jscoverage' => 'homebrew/boneyard',
'jsl' => 'homebrew/binary',
+ 'nlopt' => 'homebrew/science',
} | false |
Other | Homebrew | brew | d1d6451a6a72d79b3eb88f3010cf6c3380ccd002.json | CLT.version: check 10.9 CLT first
10.9 users might have older CLT receipts sitting around, which could
result in bad pkgutil results. For example, before changing this, my
`brew --config` was printing '1.0' (the 10.7 version) instead of
'5.0.1.0.1.1382131676', the actual CLT I had installed. | Library/Homebrew/os/mac/xcode.rb | @@ -218,7 +218,7 @@ def version
end
def detect_version
- [STANDALONE_PKG_ID, FROM_XCODE_PKG_ID, MAVERICKS_PKG_ID].find do |id|
+ [MAVERICKS_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].find do |id|
version = MacOS.pkgutil_info(id)[/version: (.+)$/, 1]
return version ... | false |
Other | Homebrew | brew | 2afa1c3b86356292a751468bf67bc615bb6594f5.json | tap: change core formula tap naming. | Library/Homebrew/cmd/tap.rb | @@ -68,7 +68,7 @@ def link_tap_formula formulae
else
to = to.realpath if to.exist?
# Whitelist gcc42 temporarily until Mavericks/Xcode 5.0 issues are resolved.
- unless to.tap_ref == 'mxcl/master/apple-gcc42'
+ unless to.tap_ref == 'Homebrew/homebrew/apple-gcc42'
... | true |
Other | Homebrew | brew | 2afa1c3b86356292a751468bf67bc615bb6594f5.json | tap: change core formula tap naming. | Library/Homebrew/formula.rb | @@ -451,7 +451,7 @@ def tap
if path.realpath.to_s =~ HOMEBREW_TAP_DIR_REGEX
"#$1/#$2"
elsif core_formula?
- "mxcl/master"
+ "Homebrew/homebrew"
else
"path or URL"
end | true |
Other | Homebrew | brew | f459245e6dbf440a3b18d25883be7ebf8fcbeb4c.json | bottle: remove unused require | Library/Homebrew/cmd/bottle.rb | @@ -5,7 +5,6 @@
require 'cmd/versions'
require 'utils/inreplace'
require 'erb'
-require 'open3'
require 'extend/pathname'
class BottleMerger < Formula | false |
Other | Homebrew | brew | d7c13f84b62d730389e72cf4283da1863993be5f.json | Update string references to mxcl/homebrew. | Library/Contributions/cmd/brew-pull.rb | @@ -19,7 +19,7 @@ def tap arg
ARGV.named.each do|arg|
if arg.to_i > 0
- url = 'https://github.com/mxcl/homebrew/pull/' + arg
+ url = 'https://github.com/Homebrew/homebrew/pull/' + arg
else
url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX
unless url_match | true |
Other | Homebrew | brew | d7c13f84b62d730389e72cf4283da1863993be5f.json | Update string references to mxcl/homebrew. | Library/Contributions/cmd/brew-tap-readme.rb | @@ -10,7 +10,7 @@
--------------------------------
Just `brew tap homebrew/#{name}` and then `brew install <formula>`.
-If the formula conflicts with one from mxcl/master or another tap, you can `brew install homebrew/#{name}/<formula>`.
+If the formula conflicts with one from Homebrew/homebrew or another tap, you ... | true |
Other | Homebrew | brew | d7c13f84b62d730389e72cf4283da1863993be5f.json | Update string references to mxcl/homebrew. | Library/Homebrew/cmd/help.rb | @@ -17,7 +17,7 @@
Brewing:
brew create [URL [--no-fetch]]
brew edit [FORMULA...]
- open https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
+ open https://github.com/Homebrew/homebrew/wiki/Formula-Cookbook
Further help:
man brew | true |
Other | Homebrew | brew | d7c13f84b62d730389e72cf4283da1863993be5f.json | Update string references to mxcl/homebrew. | Library/Homebrew/exceptions.rb | @@ -122,7 +122,7 @@ def initialize(f, dep, wrong, right)
to build #{f}: #{right.type_string} (from #{right.compiler})
Please reinstall #{dep} using a compatible compiler.
- hint: Check https://github.com/mxcl/homebrew/wiki/C++-Standard-Libraries
+ hint: Check https://github.com/Homebrew/homebrew/wiki/... | true |
Other | Homebrew | brew | d7c13f84b62d730389e72cf4283da1863993be5f.json | Update string references to mxcl/homebrew. | Library/Homebrew/global.rb | @@ -99,7 +99,7 @@ module Homebrew extend self
require 'metafiles'
FORMULA_META_FILES = Metafiles.new
-ISSUES_URL = "https://github.com/mxcl/homebrew/wiki/troubleshooting"
+ISSUES_URL = "https://github.com/Homebrew/homebrew/wiki/troubleshooting"
HOMEBREW_PULL_OR_COMMIT_URL_REGEX = 'https:\/\/github.com\/(\w+)\/home... | true |
Other | Homebrew | brew | d7c13f84b62d730389e72cf4283da1863993be5f.json | Update string references to mxcl/homebrew. | Library/Homebrew/os/mac.rb | @@ -259,7 +259,7 @@ def compilers_standard?
Homebrew doesn't know what compiler versions ship with your version
of Xcode (#{Xcode.version}). Please `brew update` and if that doesn't help, file
an issue with the output of `brew --config`:
- https://github.com/mxcl/homebrew/issues
+ ... | true |
Other | Homebrew | brew | d7c13f84b62d730389e72cf4283da1863993be5f.json | Update string references to mxcl/homebrew. | Library/Homebrew/test/test_formula.rb | @@ -156,7 +156,7 @@ def test_formula_spec_integration
mirror 'file:///foo.org/testball-0.1.tbz'
sha1 TEST_SHA1
- head 'https://github.com/mxcl/homebrew.git', :tag => 'foo'
+ head 'https://github.com/Homebrew/homebrew.git', :tag => 'foo'
devel do
url 'file:///foo.com/testball-... | true |
Other | Homebrew | brew | 3656f595089d9c6c5f0ece8e5a1cee59667d79d8.json | Add HOMEBREW_TEMP to testing environment | Library/Homebrew/test/testing_env.rb | @@ -21,6 +21,7 @@
HOMEBREW_CACHE_FORMULA = HOMEBREW_PREFIX.parent+'formula_cache'
HOMEBREW_CELLAR = HOMEBREW_PREFIX.parent+'cellar'
HOMEBREW_LOGS = HOMEBREW_PREFIX.parent+'logs'
+HOMEBREW_TEMP = Pathname.new(ENV.fetch('HOMEBREW_TEMP', '/tmp'))
HOMEBREW_USER_AGENT = 'Homebrew'
HOMEBREW_W... | false |
Other | Homebrew | brew | f4e23b2227d142bc284544aa6ac6a2b15cd40a06.json | Remove unnecessary captures in otool regexp | Library/Homebrew/mach.rb | @@ -46,7 +46,7 @@ def intersects_all?(*set)
end
module MachO
- OTOOL_RX = /\t(.*) \(compatibility version (\d+\.)*\d+, current version (\d+\.)*\d+\)/
+ OTOOL_RX = /\t(.*) \(compatibility version (?:\d+\.)*\d+, current version (?:\d+\.)*\d+\)/
# Mach-O binary methods, see:
# /usr/include/mach-o/loader.h | false |
Other | Homebrew | brew | ce19fa222361839d2c04986f81ae66c8a8748a61.json | Unify install name parsing | Library/Homebrew/cmd/bottle.rb | @@ -72,14 +72,13 @@ def keg_contains string, keg
keg_ref_files.each do |file|
puts "#{Tty.red}#{file}#{Tty.reset}"
- linked_libraries = []
-
# Check dynamic library linkage. Importantly, do not run otool on static
# libraries, which will falsely report "linkage" to themselves.
if... | true |
Other | Homebrew | brew | ce19fa222361839d2c04986f81ae66c8a8748a61.json | Unify install name parsing | Library/Homebrew/keg_fix_install_names.rb | @@ -80,8 +80,6 @@ def detect_cxx_stdlibs
private
- OTOOL_RX = /\t(.*) \(compatibility version (\d+\.)*\d+, current version (\d+\.)*\d+\)/
-
def install_name_tool(*args)
system(MacOS.locate("install_name_tool"), *args)
end
@@ -109,19 +107,9 @@ def fixed_name(file, bad_name)
def lib; join 'lib' end
... | true |
Other | Homebrew | brew | ce19fa222361839d2c04986f81ae66c8a8748a61.json | Unify install name parsing | Library/Homebrew/mach.rb | @@ -46,6 +46,8 @@ def intersects_all?(*set)
end
module MachO
+ OTOOL_RX = /\t(.*) \(compatibility version (\d+\.)*\d+, current version (\d+\.)*\d+\)/
+
# Mach-O binary methods, see:
# /usr/include/mach-o/loader.h
# /usr/include/mach-o/fat.h
@@ -148,8 +150,21 @@ def mach_o_bundle?
# Returns an empty arr... | true |
Other | Homebrew | brew | de208141628daf6cb93839572721a8810079df58.json | keg: use start_with? instead of regexp match | Library/Homebrew/keg_fix_install_names.rb | @@ -9,7 +9,7 @@ def fix_install_names options={}
each_install_name_for(file) do |bad_name|
# Don't fix absolute paths unless they are rooted in the build directory
- next if bad_name.start_with? '/' and not %r[^#{HOMEBREW_TEMP}] === bad_name
+ next if bad_name.start_with? '/' and... | false |
Other | Homebrew | brew | f458fa9e9aafe01c86054209b5f7da3f80cf9501.json | keg: add debug output to install name machinery | Library/Homebrew/keg_fix_install_names.rb | @@ -54,10 +54,12 @@ def relocate_install_names old_prefix, new_prefix, old_cellar, new_cellar, optio
end
def change_dylib_id(id, file)
+ puts "Changing dylib ID in #{file} to #{id}" if ARGV.debug?
install_name_tool("-id", id, file)
end
def change_install_name(old, new, file)
+ puts "Changing ... | false |
Other | Homebrew | brew | 3662a2765de7ca27cd6c98ce50c98435a3e25f77.json | keg: combine loops in relocate_install_names | Library/Homebrew/keg_fix_install_names.rb | @@ -28,16 +28,14 @@ def relocate_install_names old_prefix, new_prefix, old_cellar, new_cellar, optio
change_dylib_id(id, file)
end
- each_install_name_for(file) do |old_cellar_name|
- next unless old_cellar_name.start_with? old_cellar
- new_cellar_name = old_cellar_name.su... | false |
Other | Homebrew | brew | 24d8791dfbf21c5f536f555e6ccb8ee9d6ba19c0.json | keg: use lib helper | Library/Homebrew/keg_fix_install_names.rb | @@ -147,9 +147,7 @@ def install_names_for file, options, reject_proc=default_reject_proc
end
def find_dylib name
- (join 'lib').find do |pn|
- break pn if pn.basename == Pathname.new(name)
- end
+ lib.find { |pn| break pn if pn.basename == Pathname.new(name) }
end
def mach_o_files
@@ -192,... | false |
Other | Homebrew | brew | 569bd7c42583040a261372714bbd9abb16467e0c.json | doctor: fix PATH issues in comments
Closes Homebrew/homebrew#25170.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/doctor.rb | @@ -500,7 +500,7 @@ def check_user_path_2
<<-EOS.undent
Homebrew's bin was not found in your PATH.
Consider setting the PATH for example like so
- echo export PATH="#{HOMEBREW_PREFIX}/bin:$PATH" >> ~/.bash_profile
+ echo export PATH='#{HOMEBREW_PREFIX}/bin:$PATH' >> ~/.bash_profile
... | false |
Other | Homebrew | brew | b6f8649496b435a1675754ec052ffd72e27cb1d1.json | Add bash completion support for "brew switch"
First autocompletes on the names of installed packages and then
autocompletes on available versions for that specific package
Closes Homebrew/homebrew#25051.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Contributions/brew_bash_completion.sh | @@ -88,6 +88,23 @@ __brew_complete_outdated ()
COMPREPLY=($(compgen -W "$od" -- "$cur"))
}
+__brew_complete_versions ()
+{
+ local formula="$1"
+ local versions=$(brew list --versions "$formula")
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ COMPREPLY=($(compgen -W "$versions" -X "$formula" -- "$cur"))
... | false |
Other | Homebrew | brew | 3516bb68d3ca06d14fbcec343fa8792cef922792.json | Combine superenv tests | Library/Homebrew/test/test_ENV.rb | @@ -138,7 +138,24 @@ def setup
class SuperenvTests < Test::Unit::TestCase
include SharedEnvTests
+ attr_reader :env, :bin
+
def setup
@env = {}.extend(Superenv)
+ @bin = HOMEBREW_REPOSITORY/"Library/ENV/#{MacOS::Xcode.version}"
+ bin.mkpath
+ end
+
+ def test_bin
+ assert_equal bin, Superenv.b... | true |
Other | Homebrew | brew | 3516bb68d3ca06d14fbcec343fa8792cef922792.json | Combine superenv tests | Library/Homebrew/test/test_superenv.rb | @@ -1,25 +0,0 @@
-require 'testing_env'
-require 'extend/ENV/super'
-
-class SuperenvTests < Test::Unit::TestCase
- attr_reader :env, :bin
-
- def setup
- @env = {}.extend(Superenv)
- @bin = HOMEBREW_REPOSITORY/"Library/ENV/#{MacOS::Xcode.version}"
- bin.mkpath
- end
-
- def test_bin
- assert_equal bin,... | true |
Other | Homebrew | brew | b174012b17ee2e8169ab0b7508f6be9cde212d3a.json | Initialize ivars to silence warnings | Library/Homebrew/formula_installer.rb | @@ -27,6 +27,9 @@ def initialize ff
@@attempted ||= Set.new
+ @poured_bottle = false
+ @pour_failed = false
+
lock
check_install_sanity
end
@@ -110,8 +113,6 @@ def install
@@attempted << f
- @poured_bottle = false
-
begin
if pour_bottle? :warn => true
pour | false |
Other | Homebrew | brew | 6c04ccfb3bf9d71b700ab44b32a508766b8cdcf9.json | Remove unused variables | Library/Homebrew/cmd/install.rb | @@ -33,7 +33,7 @@ def install
require 'cmd/tap'
begin
install_tap $1, $2
- rescue AlreadyTappedError => e
+ rescue AlreadyTappedError
end
end
end unless ARGV.force? | true |
Other | Homebrew | brew | 6c04ccfb3bf9d71b700ab44b32a508766b8cdcf9.json | Remove unused variables | Library/Homebrew/cmd/update.rb | @@ -63,7 +63,7 @@ def update
tap_user, tap_repo = migration.split '/'
begin
install_tap tap_user, tap_repo
- rescue AlreadyTappedError => e
+ rescue AlreadyTappedError
end
end if load_tap_migrations
| true |
Other | Homebrew | brew | 55db2f7e114befc57f783d4858c72fc11a91382b.json | uses: fix weird colon output.
Closes Homebrew/homebrew#24145. | Library/Homebrew/cmd/uses.rb | @@ -19,13 +19,13 @@ def uses
if f.recursive_dependencies.any? { |dep| dep.name == ff.name }
uses << f.to_s
elsif f.recursive_requirements.any? { |req| req.name == ff.name }
- uses << ":#{f}"
+ uses << f.to_s
end
else
if f.deps.any? ... | false |
Other | Homebrew | brew | a55f66839aa705468d6ada8a104906d75db12ccb.json | Add another fails_with test | Library/Homebrew/test/test_fails_with.rb | @@ -49,8 +49,8 @@ def test_fails_with_block_without_build
def test_non_apple_gcc_version
fails_with(:gcc => '4.8')
- cc = build_cc("gcc-4.8", nil, "4.8.1")
- assert_fails_with cc
+ assert_fails_with build_cc("gcc-4.8", "4.8")
+ assert_fails_with build_cc("gcc-4.8", "4.8.1")
end
def test_mu... | false |
Other | Homebrew | brew | 5c1805434173002c5da18a91a1cd3158661a5424.json | Simplify prefix test | Library/Homebrew/test/test_formula.rb | @@ -6,7 +6,7 @@ class FormulaTests < Test::Unit::TestCase
def test_prefix
f = TestBall.new
- assert_equal File.expand_path(f.prefix), (HOMEBREW_CELLAR+f.name+'0.1').to_s
+ assert_equal HOMEBREW_CELLAR/f.name/'0.1', f.prefix
assert_kind_of Pathname, f.prefix
end
| false |
Other | Homebrew | brew | a4355c9f67529b8f9568d1981826837a184a6584.json | brew-bundle: update usage info and move to --help function
Follow-up to 6697ff6c9d0d4301adfbb7c76628808a63f1324b
Closes Homebrew/homebrew#25130.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Contributions/cmd/brew-bundle.rb | @@ -1,19 +1,33 @@
# brew-bundle.rb
-#
-# Usage: brew bundle [path]
-#
-# Looks for a Brewfile and runs each line as a brew command.
-#
-# brew bundle # Looks for "./Brewfile"
-# brew bundle path/to/dir # Looks for "path/to/dir/Brewfile"
-# brew bundle path/to/file # Looks for "path/to/file"
-#
-# For exa... | false |
Other | Homebrew | brew | 8c5a49067ef6ddf96c30cdc4e2e29390b25a1ac7.json | brew-test-bot: fix rsync for bottles with a revision number | Library/Contributions/cmd/brew-test-bot.rb | @@ -436,7 +436,7 @@ def run
path = "/home/frs/project/m/ma/machomebrew/Bottles/"
url = "BrewTestBot,machomebrew@frs.sourceforge.net:#{path}"
options = "--partial --progress --human-readable --compress"
- safe_system "rsync #{options} *.bottle.tar.gz #{url}"
+ safe_system "rsync #{options} *.bottle*.tar.gz #{... | false |
Other | Homebrew | brew | 1b7718f6a744881c853f258e40ab874cd975db58.json | bottle: determine revision more reliably
Closes Homebrew/homebrew#25100. | Library/Homebrew/cmd/bottle.rb | @@ -113,13 +113,14 @@ def bottle_formula f
return ofail "Formula not installed with '--build-bottle': #{f.name}"
end
- master_bottle_filenames = f.bottle_filenames 'origin/master'
- bottle_revision = -1
- begin
- bottle_revision += 1
- filename = bottle_filename(f, :tag => bottle_tag, :... | true |
Other | Homebrew | brew | 1b7718f6a744881c853f258e40ab874cd975db58.json | bottle: determine revision more reliably
Closes Homebrew/homebrew#25100. | Library/Homebrew/cmd/versions.rb | @@ -41,20 +41,17 @@ def versions
return versions
end
- def bottle_filenames branch='HEAD'
- filenames = []
- rev_list(branch).each do |sha|
- filename = formula_for_sha(sha) do |f|
- bottle_block = f.class.send(:bottle)
- unless bottle_block.checksums.empty?
- bottle_filenam... | true |
Other | Homebrew | brew | b1331e62b1cc6ae7ed71ad70bfc3d5e18efccdf2.json | brew-test-bot: upload job fixes. | Library/Contributions/cmd/brew-test-bot.rb | @@ -246,7 +246,7 @@ def single_commit? start_revision, end_revision
def setup
@category = __method__
-
+ return if ARGV.include? "--skip-setup"
test "brew doctor"
test "brew --env"
test "brew --config"
@@ -374,10 +374,10 @@ def check_results
def run
cleanup_before
download
- ... | false |
Other | Homebrew | brew | 50aa91940daa7c8f070d48155d3f07692f47f41a.json | brew-test-bot: use global cache again. | Library/Contributions/cmd/brew-test-bot.rb | @@ -10,7 +10,7 @@
# --email: Generate an email subject file.
# --no-bottle: Run brew install without --build-bottle
# --HEAD: Run brew install with --HEAD
-# --local: Output logs and cache downloads under ./{logs,cache}
+# --local: Ask Homebrew to write verbose logs under ./logs/
#
... | false |
Other | Homebrew | brew | 67840c691e1b618a8a273b3aee1cc1bed8bad208.json | brew-test-bot: move logic from Jenkins to Ruby. | Library/Contributions/cmd/brew-test-bot.rb | @@ -10,6 +10,13 @@
# --email: Generate an email subject file.
# --no-bottle: Run brew install without --build-bottle
# --HEAD: Run brew install with --HEAD
+# --local: Output logs and cache downloads under ./{logs,cache}
+#
+# --ci-master: Shortcut for Homebrew master branch CI optio... | false |
Other | Homebrew | brew | a933b5850754931538f40af6e2767eb27fb6e904.json | versions: restore original constant
Before:
f1 = Formula.factory('tree')
f1.versions
f2 = Formula.factory('tree')
f1.class == f2.class # => false
After:
f1 = Formula.factory('tree')
f1.versions
f2 = Formula.factory('tree')
f1.class == f2.class # => true | Library/Homebrew/cmd/versions.rb | @@ -108,14 +108,16 @@ def formula_for_sha sha, &block
# Unload the class so Formula#version returns the correct value
begin
- Formulary.unload_formula name
+ old_const = Formulary.unload_formula name
nostdout { yield Formula.factory(path.to_s) }
rescue *IGNORED_... | true |
Other | Homebrew | brew | a933b5850754931538f40af6e2767eb27fb6e904.json | versions: restore original constant
Before:
f1 = Formula.factory('tree')
f1.versions
f2 = Formula.factory('tree')
f1.class == f2.class # => false
After:
f1 = Formula.factory('tree')
f1.versions
f2 = Formula.factory('tree')
f1.class == f2.class # => true | Library/Homebrew/formulary.rb | @@ -13,6 +13,13 @@ def self.get_formula_class formula_name
Object.const_get(Formula.class_s(formula_name))
end
+ def self.restore_formula formula_name, value
+ old_verbose, $VERBOSE = $VERBOSE, nil
+ Object.const_set(Formula.class_s(formula_name), value)
+ ensure
+ $VERBOSE = old_verbose
+ end
+
... | true |
Other | Homebrew | brew | b6cbd08e931d68e6ed45367b45daa6f97d816627.json | Implement hash equality for Version | Library/Homebrew/test/test_versions.rb | @@ -65,6 +65,20 @@ def test_erlang_version
R14B02 R14B01 R14B R13B04 R13B03 R13B02-1}.reverse
assert_equal versions, versions.sort_by { |v| version(v) }
end
+
+ def test_hash_equality
+ v1 = version('0.1.0')
+ v2 = version('0.1.0')
+ v3 = version('0.1.1')
+
+ assert v1.eql?(v2)
+... | true |
Other | Homebrew | brew | b6cbd08e931d68e6ed45367b45daa6f97d816627.json | Implement hash equality for Version | Library/Homebrew/version.rb | @@ -189,6 +189,11 @@ def <=>(other)
max = [tokens.length, other.tokens.length].max
pad_to(max) <=> other.pad_to(max)
end
+ alias_method :eql?, :==
+
+ def hash
+ @version.hash
+ end
def to_s
@version.dup | true |
Other | Homebrew | brew | 5e0a8668fb623aab76670adf3f277f8d1c676d96.json | Silence more warnings | Library/Homebrew/extend/ENV/super.rb | @@ -28,6 +28,7 @@ def self.extended(base)
# done on the singleton class, because in MRI all ENV methods are defined
# on its singleton class, precluding the use of extend.
class << base
+ alias_method :"old_[]", :[]
def [] key
if has_key? key
fetch(key) | true |
Other | Homebrew | brew | 5e0a8668fb623aab76670adf3f277f8d1c676d96.json | Silence more warnings | Library/Homebrew/software_spec.rb | @@ -97,6 +97,7 @@ def initialize
@revision = 0
@prefix = '/usr/local'
@cellar = '/usr/local/Cellar'
+ @root_url = nil
end
# Checksum methods in the DSL's bottle block optionally take | true |
Other | Homebrew | brew | 0b9c29a66743cf2b0fd2128ba83b2bc8e7ad9e4c.json | Use separate collection for requirement deps | Library/Homebrew/formula_installer.rb | @@ -18,6 +18,7 @@ class FormulaInstaller
attr_accessor :tab, :options, :ignore_deps
attr_accessor :show_summary_heading, :show_header
attr_reader :unsatisfied_deps
+ attr_reader :requirement_deps
def initialize ff
@f = ff
@@ -26,6 +27,7 @@ def initialize ff
@options = Options.new
@tab = Ta... | false |
Other | Homebrew | brew | 109e9dc58bb71d9b17c10c28d434556b56c08b1c.json | Silence some Ruby 2.1 warnings | Library/Contributions/cmd/brew-test-bot.rb | @@ -98,7 +98,7 @@ def run
@status = success ? :passed : :failed
puts_result
- return unless File.exists?(log_file_path)
+ return unless File.exist?(log_file_path)
@output = IO.read(log_file_path)
if has_output? and (not success or @puts_output_on_success)
puts @output | true |
Other | Homebrew | brew | 109e9dc58bb71d9b17c10c28d434556b56c08b1c.json | Silence some Ruby 2.1 warnings | Library/Homebrew/cmd/doctor.rb | @@ -521,7 +521,7 @@ def check_user_path_3
end
def check_user_curlrc
- if %w[CURL_HOME HOME].any?{|key| ENV[key] and File.exists? "#{ENV[key]}/.curlrc" } then <<-EOS.undent
+ if %w[CURL_HOME HOME].any?{|key| ENV[key] and File.exist? "#{ENV[key]}/.curlrc" } then <<-EOS.undent
You have a curlrc file
If you... | true |
Other | Homebrew | brew | b30f4099955063b74a4744515536bf78042ebe71.json | bottle: fix typo'd option name | Library/Homebrew/cmd/bottle.rb | @@ -117,7 +117,7 @@ def bottle_formula f
bottle_revision = -1
begin
bottle_revision += 1
- filename = bottle_filename(f, :tag => bottle_tag, :bottle_revision => bottle_revision)
+ filename = bottle_filename(f, :tag => bottle_tag, :revision => bottle_revision)
end while not ARGV.include? ... | false |
Other | Homebrew | brew | 6e7e3317cf62780ccdc59c9c0f13f577709578fd.json | add "bundle" command to zsh completion
Closes Homebrew/homebrew#25055.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Contributions/brew_zsh_completion.zsh | @@ -25,6 +25,7 @@ _brew_outdated_formulae() {
local -a _1st_arguments
_1st_arguments=(
'audit:check formulae for Homebrew coding style'
+ 'bundle:look for a Brewfile and run each line as a brew command'
'cat:display formula file for a formula'
'cleanup:uninstall unused and old versions of packages'
'comm... | false |
Other | Homebrew | brew | ee1d8512bf4cd6deadfa8c7a55f189cac61c221a.json | Fix typo in example formula
Closes Homebrew/homebrew#25028.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Contributions/example-formula.rb | @@ -254,7 +254,7 @@ def install
args << "--i-want-spam" if build.include? "enable-spam"
args << "--qt-gui" if build.with? "qt" # "--with-qt" ==> build.with? "qt"
args << "--some-new-stuff" if build.head? # if head is used instead of url.
- args << "--universal-binray" if build.universal?
+ args << ... | false |
Other | Homebrew | brew | 492ce9cc5e98ef9fa330abb93f4082cdb4d034bf.json | bottle_filename: remove unused revision default | Library/Homebrew/bottles.rb | @@ -3,7 +3,7 @@
require 'extend/ARGV'
require 'bottle_version'
-def bottle_filename f, options={:tag=>bottle_tag, :bottle_revision=>nil}
+def bottle_filename f, options={:tag=>bottle_tag}
name = f.name.downcase
version = f.stable.version
options[:revision] ||= f.bottle.revision.to_i if f.bottle | false |
Other | Homebrew | brew | 5252c35f342d213cb539b9690f79d9b8f2a9c338.json | fix typo in this notice | Library/Homebrew/download_strategy.rb | @@ -664,7 +664,7 @@ class MercurialDownloadStrategy < VCSDownloadStrategy
def cache_tag; "hg" end
def hgpath
- # #{HOMEBREW_PREFIX}/share/python/hg is deprecated, but we levae it in for a while
+ # Note: #{HOMEBREW_PREFIX}/share/python/hg is deprecated
@path ||= %W[
#{which("hg")}
#{HOM... | false |
Other | Homebrew | brew | 1564a89f443d2e2b36223d68a3a07119485b1215.json | Move jsl to homebrew-binary
Closes Homebrew/homebrew#24826. | Library/Homebrew/tap_migrations.rb | @@ -15,4 +15,5 @@
'cmucl' => 'homebrew/binary',
'lmutil' => 'homebrew/binary',
'jscoverage' => 'homebrew/boneyard',
+ 'jsl' => 'homebrew/binary',
} | false |
Other | Homebrew | brew | e2af1cbeeb8f68150037dbf8612b69290b9e85aa.json | Use BottleCollector in Bottle SoftwareSpec | Library/Homebrew/bottles.rb | @@ -3,11 +3,11 @@
require 'extend/ARGV'
require 'bottle_version'
-def bottle_filename f, bottle_revision=nil
+def bottle_filename f, options={:tag=>bottle_tag, :bottle_revision=>nil}
name = f.name.downcase
version = f.stable.version
bottle_revision ||= f.bottle.revision.to_i if f.bottle
- "#{name}-#{versi... | true |
Other | Homebrew | brew | e2af1cbeeb8f68150037dbf8612b69290b9e85aa.json | Use BottleCollector in Bottle SoftwareSpec | Library/Homebrew/cmd/bottle.rb | @@ -105,7 +105,7 @@ def bottle_formula f
bottle_revision = -1
begin
bottle_revision += 1
- filename = bottle_filename(f, bottle_revision)
+ filename = bottle_filename(f, :tag => bottle_tag, :bottle_revision => bottle_revision)
end while not ARGV.include? '--no-revision' \
and ma... | true |
Other | Homebrew | brew | e2af1cbeeb8f68150037dbf8612b69290b9e85aa.json | Use BottleCollector in Bottle SoftwareSpec | Library/Homebrew/formula.rb | @@ -46,7 +46,7 @@ def initialize name='__UNKNOWN__', path=nil
# into a validation method on the bottle instance.
unless bottle.checksum.nil? || bottle.checksum.empty?
@bottle = bottle
- bottle.url ||= bottle_url(self)
+ bottle.url ||= bottle_url(self, bottle.current_tag)
end
... | true |
Other | Homebrew | brew | e2af1cbeeb8f68150037dbf8612b69290b9e85aa.json | Use BottleCollector in Bottle SoftwareSpec | Library/Homebrew/software_spec.rb | @@ -4,6 +4,7 @@
require 'version'
require 'build_options'
require 'dependency_collector'
+require 'bottles'
class SoftwareSpec
extend Forwardable
@@ -87,6 +88,7 @@ def verify_download_integrity fn
class Bottle < SoftwareSpec
attr_rw :root_url, :prefix, :cellar, :revision
+ attr_accessor :current_tag
... | true |
Other | Homebrew | brew | e2af1cbeeb8f68150037dbf8612b69290b9e85aa.json | Use BottleCollector in Bottle SoftwareSpec | Library/Homebrew/test/test_software_spec.rb | @@ -110,8 +110,8 @@ def test_checksum_setters
end
checksums.each_pair do |cat, sha1|
- assert_equal Checksum.new(:sha1, sha1),
- @spec.instance_variable_get(:@sha1)[cat]
+ hsh, _ = @spec.instance_variable_get(:@sha1).fetch_bottle_for(cat)
+ assert_equal Checksum.new(:sha1, sha1), hsh
... | true |
Other | Homebrew | brew | d9afb4f9ea54d2b6e4f04c1e6fe5f3b051258447.json | bottle: fix reporting matches with spaces in them | Library/Homebrew/cmd/bottle.rb | @@ -77,10 +77,9 @@ def keg_contains string, keg
# Use strings to search through the file for each string
strings = `strings -t x - "#{file}"`.select{ |str| str.include? string }.map{ |s| s.strip }
- # Don't bother reporting a string if it was found by otool
- strings.reject!{ |str| linked_libr... | false |
Other | Homebrew | brew | 0daa33668b66a4c2a9dfee554845ce58f6a3475a.json | Run relocation machinery on local bottles
Since we now use placeholders for the prefix and cellar, we need to run
the relocation machinery on all bottles. | Library/Homebrew/formula_installer.rb | @@ -438,7 +438,7 @@ def fix_install_names
keg = Keg.new(f.prefix)
keg.fix_install_names(:keg_only => f.keg_only?)
- if @poured_bottle and f.bottle
+ if @poured_bottle
keg.relocate_install_names Keg::PREFIX_PLACEHOLDER, HOMEBREW_PREFIX.to_s,
Keg::CELLAR_PLACEHOLDER, HOMEBREW_CELLAR.to_s... | false |
Other | Homebrew | brew | 36701a89bad15e02290e71da175e84868329edd9.json | Do relocation check while preparing bottle | Library/Homebrew/cmd/bottle.rb | @@ -116,16 +116,15 @@ def bottle_formula f
sha1 = nil
prefix = HOMEBREW_PREFIX.to_s
- tmp_prefix = '/tmp'
cellar = HOMEBREW_CELLAR.to_s
- tmp_cellar = '/tmp/Cellar'
output = nil
HOMEBREW_CELLAR.cd do
ohai "Bottling #{filename}..."
keg = Keg.new(f.prefix)
+ reloc... | false |
Other | Homebrew | brew | 94ebe8e747e774d7eb8efcb0e49c84581cc11bc6.json | relocate_install_names: rewrite cellar names before prefix names
The cellar may overlap with the prefix, so if we replace the prefix
first, we will end up with paths like "@@HOMEBREW_PREFIX@@/Cellar"
instead of "@@HOMEBREW_CELLAR@@", which will break on installations
where the cellar and prefix are disjoint. | Library/Homebrew/keg_fix_install_names.rb | @@ -18,6 +18,15 @@ def fix_install_names options={}
def relocate_install_names old_prefix, new_prefix, old_cellar, new_cellar, options={}
mach_o_files.each do |file|
+ install_names_for(file, options, relocate_reject_proc(old_cellar)) do |id, old_cellar_names|
+ file.ensure_writable do
+ ... | false |
Other | Homebrew | brew | 6d7a3d7fa435edf1e0731e5f7a0121ec156ece48.json | download_strategy: use clear_cache where appropriate | Library/Homebrew/download_strategy.rb | @@ -371,7 +371,7 @@ def fetch
if @clone.exist? and not repo_valid?
puts "Removing invalid SVN repo from cache"
- @clone.rmtree
+ clear_cache
end
case @ref_type
@@ -474,7 +474,7 @@ def fetch
end
elsif @clone.exist?
puts "Removing invalid .git repo from cache"
- ... | false |
Other | Homebrew | brew | 099954499ffbea9e74ea1482cb03fa4da943373a.json | Move jscoverage to the boneyard | Library/Homebrew/tap_migrations.rb | @@ -14,4 +14,5 @@
'aimage' => 'homebrew/boneyard',
'cmucl' => 'homebrew/binary',
'lmutil' => 'homebrew/binary',
+ 'jscoverage' => 'homebrew/boneyard',
} | false |
Other | Homebrew | brew | 6071e3b54cf0ad2309fb7d5238c3557c724f415a.json | Fix tap migrations
When a `brew update` pulls down additions to tap_migrations.rb and the
removed formulae in the same update, the migrations will never run,
because tap_migrations.rb is loaded before the update takes place. Fix
this by loading it after the update. | Library/Homebrew/cmd/update.rb | @@ -1,6 +1,5 @@
require 'cmd/tap'
require 'cmd/untap'
-require 'tap_migrations'
module Homebrew extend self
def update
@@ -66,7 +65,7 @@ def update
install_tap tap_user, tap_repo
rescue AlreadyTappedError => e
end
- end
+ end if load_tap_migrations
if report.empty?
put... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.