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 | ee7178562fde5fb23acde1cb4f8d8e4c4ac969c2.json | Move x86_64 Requirement into core
Closes Homebrew/homebrew#18886. | Library/Homebrew/dependency_collector.rb | @@ -89,6 +89,7 @@ def parse_symbol_spec spec, tag
when :postgresql then PostgresqlDependency.new(tag)
when :tex then TeXDependency.new(tag)
when :clt then CLTDependency.new(tag)
+ when :arch then ArchRequirement.new(tag)
else
raise "Unsupported special dependency #{spec... | true |
Other | Homebrew | brew | ee7178562fde5fb23acde1cb4f8d8e4c4ac969c2.json | Move x86_64 Requirement into core
Closes Homebrew/homebrew#18886. | Library/Homebrew/requirements.rb | @@ -334,3 +334,23 @@ def message; <<-EOS.undent
EOS
end
end
+
+class ArchRequirement < Requirement
+ fatal true
+
+ def initialize(arch)
+ @arch = arch
+ super
+ end
+
+ satisfy do
+ case @arch
+ when :x86_64 then MacOS.prefer_64_bit?
+ end
+ end
+
+ def message; <<-EOS.undent
+ This fo... | true |
Other | Homebrew | brew | 9f1e6af879542224622f27ba1ae4870ae474ac6e.json | Use satisfy syntax for CLTDependency | Library/Homebrew/requirements.rb | @@ -325,9 +325,7 @@ class CLTDependency < Requirement
fatal true
build true
- def satisfied?
- MacOS::CLT.installed?
- end
+ satisfy(:build_env => false) { MacOS::CLT.installed? }
def message; <<-EOS.undent
The Command Line Tools for Xcode are required to compile this software. | false |
Other | Homebrew | brew | 115501d42f0f65f7b801851a0b20b45c6ef7eba5.json | Fix X11 env setup | Library/Homebrew/requirements.rb | @@ -59,7 +59,7 @@ class X11Dependency < Requirement
fatal true
- env { x11 }
+ env { ENV.x11 }
def initialize(name="x11", *tags)
tags.flatten! | false |
Other | Homebrew | brew | 462a41887823bbf72996c2ce324c5db30f77e89a.json | Add optional post_install method to Formula.
Sometimes we may want to run commands after bottle installation (such as
creating directories outside the Cellar) so this method allows us to do
so.
Closes Homebrew/homebrew#18382. | Library/Homebrew/formula.rb | @@ -188,6 +188,9 @@ def cached_download
# are supported.
def pour_bottle?; true end
+ # Can be overridden to run commands on both source and bottle installation.
+ def post_install; end
+
# tell the user about any caveats regarding this package, return a string
def caveats; nil end
| true |
Other | Homebrew | brew | 462a41887823bbf72996c2ce324c5db30f77e89a.json | Add optional post_install method to Formula.
Sometimes we may want to run commands after bottle installation (such as
creating directories outside the Cellar) so this method allows us to do
so.
Closes Homebrew/homebrew#18382. | Library/Homebrew/formula_installer.rb | @@ -111,6 +111,8 @@ def install
clean
end
+ f.post_install
+
opoo "Nothing was installed to #{f.prefix}" unless f.installed?
end
| true |
Other | Homebrew | brew | 8fbf3a43c39f74e75aae0530c3ef3a9aebe2cd59.json | Fix uninstallation of non-formula kegs
Grrr... | Library/Homebrew/cmd/uninstall.rb | @@ -10,9 +10,9 @@ def uninstall
keg.lock do
puts "Uninstalling #{keg}..."
keg.unlink
- Formula.factory(keg.fname).unpin
keg.uninstall
rm_opt_link keg.fname
+ unpin keg.fname
end
end
else
@@ -49,4 +49,7 @@ def rm_opt_link name
... | false |
Other | Homebrew | brew | 4cd95652ead8923331dd2f5ec0c28b45527cca52.json | brew-pin: Fix bug in `FormulaPin#pinned?`
Since `pinned?` was using `File#exists?`, broken symlinks left by force-upgraded
formulae made `pinned?` return false while `pin` returned with an error because
it could not overwrite the broken link. This is fixed by using `File#symlink?`
instead, which returns true for broke... | Library/Homebrew/formula_pin.rb | @@ -27,7 +27,7 @@ def unpin
end
def pinned?
- @path.exist?
+ @path.symlink?
end
def pinable? | false |
Other | Homebrew | brew | 040138164bf3f8e17ba05be4b135455c03bb0cf5.json | brew-info: Add pinned status to info.
Closes Homebrew/homebrew#18851.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/info.rb | @@ -79,7 +79,7 @@ def info_formula f
specs << "devel #{f.devel.version}" if f.devel
specs << "HEAD" if f.head
- puts "#{f.name}: #{specs*', '}"
+ puts "#{f.name}: #{specs*', '}#{' (pinned)' if f.pinned?}"
puts f.homepage
| false |
Other | Homebrew | brew | 249b77768499a27a7d1ce130b26249c2ebca92db.json | Fix typo for pin command in bash_completion
Closes Homebrew/homebrew#18849.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Contributions/brew_bash_completion.sh | @@ -439,7 +439,7 @@ _brew ()
missing) __brew_complete_formulae ;;
options) _brew_options ;;
outdated) _brew_outdated ;;
- pin) _brew_complete_formulae ;;
+ pin) __brew_complete_formulae ;;
sea... | false |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | .gitignore | @@ -9,5 +9,6 @@
!/share/man/man1/brew.1
.DS_Store
/Library/LinkedKegs
+/Library/PinnedKegs
/Library/Taps
/Library/Formula/.gitignore | true |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | Library/Contributions/brew_bash_completion.sh | @@ -238,10 +238,12 @@ _brew_list ()
return
elif __brewcomp_words_include "--verbose"; then
return
+ elif __brewcomp_words_include "--pinned"; then
+ return
elif __brewcomp_words_include "--versions"; then
return
else
- __brew... | true |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | Library/Contributions/brew_fish_completion.fish | @@ -32,7 +32,7 @@ function __fish_complete_brew_argument
return 0
end
- if contains -- $cmd cleanup link ln missing rm remove test unlink uninstall upgrade
+ if contains -- $cmd cleanup link ln missing rm remove test unlink uninstall upgrade pin unpin
ls (brew --prefix)/Cellar
retu... | true |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | Library/Contributions/brew_zsh_completion.zsh | @@ -34,11 +34,13 @@ _1st_arguments=(
'log:git commit log for a formula'
'missing:check all installed formuale for missing dependencies.'
'outdated:list formulae for which a newer version is available'
+ 'pin:pin specified formulae'
'prune:remove dead links'
'remove:remove a formula'
'search:search fo... | true |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | Library/Contributions/manpages/brew.1.md | @@ -195,7 +195,7 @@ Note that these flags should only appear after a command.
be linked or which would be deleted by `brew link --overwrite`, but will not
actually link or delete any files.
- * `ls, list [--unbrewed] [--versions]` [<formulae>]:
+ * `ls, list [--unbrewed] [--versions] [--pinned]` [<formula... | true |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | Library/Homebrew/cmd/list.rb | @@ -8,7 +8,10 @@ def list
# Things below use the CELLAR, which doesn't until the first formula is installed.
return unless HOMEBREW_CELLAR.exist?
- if ARGV.include? '--versions'
+ if ARGV.include? '--pinned'
+ require 'formula'
+ list_pinned
+ elsif ARGV.include? '--versions'
list_... | true |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | Library/Homebrew/cmd/pin.rb | @@ -0,0 +1,16 @@
+require 'formula'
+
+module Homebrew extend self
+ def pin
+ if Process.uid.zero? and not File.stat(HOMEBREW_BREW_FILE).uid.zero?
+ abort "Cowardly refusing to `sudo pin'"
+ end
+ raise FormulaUnspecifiedError if ARGV.named.empty?
+ ARGV.formulae.each do |fmla|
+ f = Formula.fac... | true |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | Library/Homebrew/cmd/uninstall.rb | @@ -10,6 +10,7 @@ def uninstall
keg.lock do
puts "Uninstalling #{keg}..."
keg.unlink
+ Formula.factory(keg.fname).unpin
keg.uninstall
rm_opt_link keg.fname
end
@@ -28,6 +29,7 @@ def uninstall
if keg.directory?
keg = Keg.n... | true |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | Library/Homebrew/cmd/unpin.rb | @@ -0,0 +1,16 @@
+require 'formula'
+
+module Homebrew extend self
+ def unpin
+ if Process.uid.zero? and not File.stat(HOMEBREW_BREW_FILE).uid.zero?
+ abort "Cowardly refusing to `sudo unpin'"
+ end
+ raise FormulaUnspecifiedError if ARGV.named.empty?
+ ARGV.formulae.each do |fmla|
+ f = Formula... | true |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | Library/Homebrew/cmd/upgrade.rb | @@ -18,8 +18,10 @@ def upgrade
if ARGV.named.empty?
require 'cmd/outdated'
+ upgrade_pinned = false
outdated = Homebrew.outdated_brews
else
+ upgrade_pinned = true
outdated = ARGV.formulae.select do |f|
if f.installed?
onoe "#{f}-#{f.installed_version} alre... | true |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | Library/Homebrew/formula.rb | @@ -2,6 +2,7 @@
require 'dependency_collector'
require 'formula_support'
require 'formula_lock'
+require 'formula_pin'
require 'hardware'
require 'bottles'
require 'patches'
@@ -68,6 +69,8 @@ def initialize name='__UNKNOWN__', path=nil
# make sure to strip "--" from the start of options
self.class.b... | true |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | Library/Homebrew/formula_pin.rb | @@ -0,0 +1,36 @@
+require 'formula'
+require 'fileutils'
+
+class FormulaPin
+ HOMEBREW_PINNED = HOMEBREW_LIBRARY/'PinnedKegs'
+
+ def initialize(formula)
+ @formula = formula
+ @name = formula.name
+ HOMEBREW_PINNED.mkdir unless HOMEBREW_PINNED.exist?
+ @path = HOMEBREW_PINNED/@name
+ end
+
+ def pin_a... | true |
Other | Homebrew | brew | f8a88b5f28070b15eb31285f8ae6ffdd37e0859b.json | brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formul... | share/man/man1/brew.1 | @@ -215,7 +215,7 @@ If \fB\-\-overwrite\fR is passed, Homebrew will delete files which already exist
If \fB\-\-dry\-run\fR or \fB\-n\fR is passed, Homebrew will list all files which would be linked or which would be deleted by \fBbrew link \-\-overwrite\fR, but will not actually link or delete any files\.
.
.TP
-\fB... | true |
Other | Homebrew | brew | 4a52bf1c3186b75551cb37cbf721da185291c384.json | Use each_key instead of keys.each | Library/Homebrew/cmd/doctor.rb | @@ -857,7 +857,7 @@ def check_for_linked_keg_only_brews
You may wish to `brew unlink` these brews:
EOS
- warnings.keys.each{ |f| s << " #{f}\n" }
+ warnings.each_key { |f| s << " #{f}\n" }
s
end
end | false |
Other | Homebrew | brew | 3320b15609266612d28d2083da7ac371111c585b.json | doctor: restore newlines between checks
Closes Homebrew/homebrew#18060. | Library/Homebrew/cmd/doctor.rb | @@ -1111,13 +1111,16 @@ def doctor
ARGV.named
end.select{ |method| method =~ /^check_/ }.reverse.uniq.reverse
+ first_warning = true
methods.each do |method|
out = checks.send(method)
unless out.nil? or out.empty?
lines = out.to_s.split('\n')
+ puts unless first_warni... | false |
Other | Homebrew | brew | da5a4223e88e5ffd78110b34255e011205f4632f.json | brew.rb: drop constant reassignment
Closes Homebrew/homebrew#18807. | Library/brew.rb | @@ -4,7 +4,6 @@
std_trap = trap("INT") { exit! 130 } # no backtrace thanks
HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE']
-HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] ||= File.expand_path(__FILE__)
if ARGV == %w{--prefix}
puts File.dirname(File.dirname(HOMEBREW_BREW_FILE)) | false |
Other | Homebrew | brew | c3c4a8b9139a750fbf950190b67243724b91a212.json | brew-readall: remove unused variable | Library/Contributions/cmd/brew-readall.rb | @@ -6,7 +6,7 @@
require 'formula'
Formula.names.each do |n|
begin
- f = Formula.factory(n)
+ Formula.factory(n)
rescue Exception => e
onoe "problem in #{Formula.path(n)}"
puts e | false |
Other | Homebrew | brew | 891cfe454b1cad462265252348ff8a34dff44f1b.json | Remove circular require
Will this break anything? It shouldn't; Formula will always be loaded
before Tab anyway. But really there is a design problem here, Tab
shouldn't have any hardcoded references to Formula. I think this is
fixable, but callers of for_formula will need to be checked first. | Library/Homebrew/tab.rb | @@ -1,5 +1,4 @@
require 'ostruct'
-require 'formula'
require 'options'
require 'vendor/multi_json'
| false |
Other | Homebrew | brew | ad58cd88ab04a2c4047fe799b27da78dd67fbb32.json | info: make use of Tab#to_s
Closes Homebrew/homebrew#18788. | Library/Homebrew/cmd/info.rb | @@ -99,20 +99,9 @@ def info_formula f
kegs.reject! {|keg| keg.basename.to_s == '.DS_Store' }
kegs = kegs.map {|keg| Keg.new(keg) }.sort_by {|keg| keg.version }
kegs.each do |keg|
- print "#{keg} (#{keg.abv})"
- print " *" if keg.linked?
- puts
- tab = Tab.for_keg keg
-
-... | false |
Other | Homebrew | brew | 5c17405982b3b600f6788a13b8ee2dbe5b054bd0.json | LinuxCPUs: Fix method alias
Closes Homebrew/homebrew#18683.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com> | Library/Homebrew/os/linux/hardware.rb | @@ -16,7 +16,7 @@ def type
def family
:dunno
end
- alias_method :intel_family, :cpu_family
+ alias_method :intel_family, :family
def cores
`grep -c ^processor /proc/cpuinfo`.to_i | false |
Other | Homebrew | brew | 21f566b662e1643da1ee9baf1ee8f3eb5293c019.json | Turn double modifier into a single conditional | Library/Homebrew/utils.rb | @@ -34,13 +34,13 @@ def escape n
end
def ohai title, *sput
- title = title.to_s[0, Tty.width - 4] if $stdout.tty? unless ARGV.verbose?
+ title = title.to_s[0, Tty.width - 4] if $stdout.tty? && !ARGV.verbose?
puts "#{Tty.blue}==>#{Tty.white} #{title}#{Tty.reset}"
puts sput unless sput.empty?
end
def oh1 ... | false |
Other | Homebrew | brew | 688ae72919d7b635f2b37475b24462dfc00f02c8.json | utils: remove obsolete comment | Library/Homebrew/utils.rb | @@ -33,7 +33,6 @@ def escape n
end
end
-# args are additional inputs to puts until a nil arg is encountered
def ohai title, *sput
title = title.to_s[0, Tty.width - 4] if $stdout.tty? unless ARGV.verbose?
puts "#{Tty.blue}==>#{Tty.white} #{title}#{Tty.reset}" | false |
Other | Homebrew | brew | 47a8a312e3a82c5390e0c921ee314b2af3775cf1.json | versions: add debug output | Library/Homebrew/cmd/versions.rb | @@ -70,10 +70,10 @@ def version_for_sha sha
begin
Object.send(:remove_const, Formula.class_s(name))
nostdout { Formula.factory(path).version }
- rescue SyntaxError, TypeError, NameError, ArgumentError
+ rescue SyntaxError, TypeError, NameError, ArgumentError => e
... | false |
Other | Homebrew | brew | d274f7a8a0db4eef81d0b754e2b5e1c135fff10b.json | versions: remove unnecessary variable | Library/Homebrew/cmd/versions.rb | @@ -69,8 +69,7 @@ def version_for_sha sha
# Unload the class so Formula#version returns the correct value
begin
Object.send(:remove_const, Formula.class_s(name))
- version = nostdout { Formula.factory(path).version }
- version
+ nostdout { Formula.factory(path).ve... | false |
Other | Homebrew | brew | 8a33564cab618581ee655972fc5f58fb5a3fd8f2.json | Fix local installation of bottles.
Fixes Homebrew/homebrew#18631. | Library/Homebrew/formula_installer.rb | @@ -357,7 +357,7 @@ def install_plist
def fix_install_names
Keg.new(f.prefix).fix_install_names
- if @poured_bottle
+ if @poured_bottle and f.bottle
old_prefix = f.bottle.prefix
new_prefix = HOMEBREW_PREFIX.to_s
old_cellar = f.bottle.cellar | false |
Other | Homebrew | brew | 8d000110ccd33464f23d3b4cfac75908b61f802c.json | Move this method somewhere more appropriate | Library/Homebrew/formula.rb | @@ -259,6 +259,9 @@ def <=> b
def to_s
name
end
+ def inspect
+ name
+ end
# Standard parameters for CMake builds.
# Using Build Type "None" tells cmake to use our CFLAGS,etc. settings.
@@ -307,10 +310,6 @@ def self.installed
HOMEBREW_CELLAR.children.map{ |rack| factory(rack.basename) rescu... | false |
Other | Homebrew | brew | 5c746bf8557ff159a9fcb3951265e12910495a09.json | superenv: move MacSystem into separate file
This makes it requirable before superenv becomes active. | Library/Homebrew/superenv.rb | @@ -1,5 +1,6 @@
require 'extend/ENV'
require 'macos'
+require 'superenv/macsystem'
### Why `superenv`?
# 1) Only specify the environment we need (NO LDFLAGS for cmake)
@@ -285,37 +286,3 @@ def to_path_s
map(&:to_s).uniq.select{|s| File.directory? s }.join(':').chuzzle
end
end
-
-# new code because I don'... | true |
Other | Homebrew | brew | 5c746bf8557ff159a9fcb3951265e12910495a09.json | superenv: move MacSystem into separate file
This makes it requirable before superenv becomes active. | Library/Homebrew/superenv/macsystem.rb | @@ -0,0 +1,33 @@
+# new code because I don't really trust the Xcode code now having researched it more
+module MacSystem extend self
+ def xcode_clt_installed?
+ File.executable? "/usr/bin/clang" and File.executable? "/usr/bin/lldb"
+ end
+
+ def xcode43_without_clt?
+ MacOS::Xcode.version >= "4.3" and not Mac... | true |
Other | Homebrew | brew | 456386c9b1cbe599bcc42c96099321ea13afc544.json | Reduce footprint of fails_with_llvm compat code | Library/Homebrew/compat/compatibility.rb | @@ -76,18 +76,18 @@ def self.resolve_alias name
# up in the DSL section.
def fails_with_llvm msg=nil, data=nil
opoo "Calling fails_with_llvm in the install method is deprecated"
- puts "Use the fails_with DSL instead."
- FailsWithLLVM.new(msg, data).handle_failure
+ puts "Use the fails_with DSL inst... | false |
Other | Homebrew | brew | 56fa23e07ee4ee27cd22babb1c1ce57bb5d2a7c6.json | cleaner: simplify verbose pathname extension | Library/Homebrew/cleaner.rb | @@ -64,7 +64,7 @@ def clean_file_permissions path
# Clean a single folder (non-recursively)
def clean_dir d
d.find do |path|
- path.extend(NoiseyPathname) if ARGV.verbose?
+ path.extend(NoisyPathname) if ARGV.verbose?
if path.directory?
# Stop cleaning this subtree if protected
@@... | false |
Other | Homebrew | brew | f8b4959742393499dda5bb48fd55ba107433b381.json | Use a priority queue to select compilers
The existing case-statement with nested if-statements is gross and hard
to extend. Replacing it with a priority queue simplifies the logic and
makes it very easy to add new compilers to the fails_with system, which
we will likely want to do in the future. | Library/Homebrew/compilers.rb | @@ -1,44 +1,14 @@
-class Compilers
- include Enumerable
-
- def initialize(*args)
- @compilers = Array.new(*args)
- end
-
- def each(*args, &block)
- @compilers.each(*args, &block)
- end
-
- def include?(cc)
- cc = cc.name if cc.is_a? Compiler
- @compilers.any? { |c| c.name == cc }
- end
-
- def <<(... | true |
Other | Homebrew | brew | f8b4959742393499dda5bb48fd55ba107433b381.json | Use a priority queue to select compilers
The existing case-statement with nested if-statements is gross and hard
to extend. Replacing it with a priority queue simplifies the logic and
makes it very easy to add new compilers to the fails_with system, which
we will likely want to do in the future. | Library/Homebrew/formula.rb | @@ -198,9 +198,8 @@ def keg_only_reason
end
def fails_with? cc
- return false if self.class.cc_failures.nil?
cc = Compiler.new(cc) unless cc.is_a? Compiler
- self.class.cc_failures.find do |failure|
+ (self.class.cc_failures || []).any? do |failure|
failure.compiler == cc.name && failure.bu... | true |
Other | Homebrew | brew | f8b4959742393499dda5bb48fd55ba107433b381.json | Use a priority queue to select compilers
The existing case-statement with nested if-statements is gross and hard
to extend. Replacing it with a priority queue simplifies the logic and
makes it very easy to add new compilers to the fails_with system, which
we will likely want to do in the future. | Library/Homebrew/test/test_compiler_queue.rb | @@ -0,0 +1,38 @@
+require 'testing_env'
+require 'compilers'
+
+class CompilerQueueTests < Test::Unit::TestCase
+ FakeCompiler = Struct.new(:name, :priority)
+
+ def setup
+ @q = CompilerQueue.new
+ end
+
+ def test_shovel_returns_self
+ assert_same @q, (@q << Object.new)
+ end
+
+ def test_empty
+ asser... | true |
Other | Homebrew | brew | 7104e20bde71a72a99497c8148ebeb10cf97dfde.json | Replace custom collection with Set
The original constraints that led to using a custom collection rather
than Array or Set here no longer exist, so let's avoid the pointless
abstraction here. | Library/Homebrew/compilers.rb | @@ -21,29 +21,6 @@ def <<(o)
end
-class CompilerFailures
- include Enumerable
-
- def initialize(*args)
- @failures = Array.new(*args)
- end
-
- def each(*args, &block)
- @failures.each(*args, &block)
- end
-
- def include?(cc)
- cc = Compiler.new(cc) unless cc.is_a? Compiler
- @failures.any? { |... | true |
Other | Homebrew | brew | 7104e20bde71a72a99497c8148ebeb10cf97dfde.json | Replace custom collection with Set
The original constraints that led to using a custom collection rather
than Array or Set here no longer exist, so let's avoid the pointless
abstraction here. | Library/Homebrew/formula.rb | @@ -785,12 +785,8 @@ def keg_only reason, explanation=nil
end
def fails_with compiler, &block
- @cc_failures ||= CompilerFailures.new
- @cc_failures << if block_given?
- CompilerFailure.new(compiler, &block)
- else
- CompilerFailure.new(compiler)
- end
+ @cc_failures |... | true |
Other | Homebrew | brew | 5f6515baad38896668ce9750f4026e2d39e898fb.json | audit: Improve url audits.
* Add url check for GitHub home pages using http.
* Add url check for GitHub repo urls using http.
* Include url in error messages about url issues.
Closes Homebrew/homebrew#18372. | Library/Homebrew/cmd/audit.rb | @@ -170,19 +170,25 @@ def audit_conflicts
def audit_urls
unless f.homepage =~ %r[^https?://]
- problem "The homepage should start with http or https."
+ problem "The homepage should start with http or https (url is #{f.homepage})."
+ end
+
+ # Check for http:// GitHub homepage urls, https:// i... | false |
Other | Homebrew | brew | cda83428a64e89862c4da1265ed0e185829186b6.json | add brew linkapps --system
Added an option to linkapps to allow linking to /Applications rather
than ~/Applications
Closes Homebrew/homebrew#18196.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Contributions/cmd/brew-linkapps.rb | @@ -1,11 +1,11 @@
# Links any Applications (.app) found in installed prefixes to ~/Applications
require "formula"
-HOME_APPS = File.expand_path("~/Applications")
+TARGET_DIR = ARGV.include?("--system") ? "/Applications" : File.expand_path("~/Applications")
-unless File.exist? HOME_APPS
- opoo "#{HOME_APPS} does ... | false |
Other | Homebrew | brew | 69c8ed1a1e3971453cf8300c064572b3f0a51324.json | doctor: add check for coreutils in path | Library/Homebrew/cmd/doctor.rb | @@ -982,6 +982,14 @@ def check_for_bad_python_symlink
end
end
+def check_for_non_prefixed_coreutils
+ gnubin = `brew --prefix coreutils`.chomp + "/libexec/gnubin"
+ if paths.include? gnubin then <<-EOS.undent
+ Putting non-prefixed coreutils in your path can cause gmp builds to fail.
+ EOS
+ end
+end
+
... | false |
Other | Homebrew | brew | cc08d08d74f20d72ba378fed3bbc53390be0b97d.json | Switch compilers when no build is specified
Given the current state of OS X compilers, the original fails_with
behavior is becoming less useful, mostly resulting in build failures
each time the compiler is updated. So make the following changes:
When a build is specified, we retain the old behavior: switch compilers
... | Library/Homebrew/build.rb | @@ -114,11 +114,7 @@ def install f
end
end
- if f.fails_with? ENV.compiler
- cs = CompilerSelector.new f
- cs.select_compiler
- cs.advise
- end
+ CompilerSelector.new(f).select_compiler if f.fails_with? ENV.compiler
f.brew do
if ARGV.flag? '--git' | true |
Other | Homebrew | brew | cc08d08d74f20d72ba378fed3bbc53390be0b97d.json | Switch compilers when no build is specified
Given the current state of OS X compilers, the original fails_with
behavior is becoming less useful, mostly resulting in build failures
each time the compiler is updated. So make the following changes:
When a build is specified, we retain the old behavior: switch compilers
... | Library/Homebrew/compilers.rb | @@ -68,6 +68,7 @@ class CompilerFailure
def initialize compiler, &block
@compiler = compiler
instance_eval(&block) if block_given?
+ @build ||= 9999
end
def build val=nil
@@ -100,8 +101,7 @@ def select_compiler
# the failing build is >= the currently installed version of foo.
@compiler... | true |
Other | Homebrew | brew | cc08d08d74f20d72ba378fed3bbc53390be0b97d.json | Switch compilers when no build is specified
Given the current state of OS X compilers, the original fails_with
behavior is becoming less useful, mostly resulting in build failures
each time the compiler is updated. So make the following changes:
When a build is specified, we retain the old behavior: switch compilers
... | Library/Homebrew/formula.rb | @@ -200,10 +200,8 @@ def keg_only_reason
def fails_with? cc
return false if self.class.cc_failures.nil?
cc = Compiler.new(cc) unless cc.is_a? Compiler
- return self.class.cc_failures.find do |failure|
- next unless failure.compiler == cc.name
- failure.build.zero? or \
- (failure.build ... | true |
Other | Homebrew | brew | cc08d08d74f20d72ba378fed3bbc53390be0b97d.json | Switch compilers when no build is specified
Given the current state of OS X compilers, the original fails_with
behavior is becoming less useful, mostly resulting in build failures
each time the compiler is updated. So make the following changes:
When a build is specified, we retain the old behavior: switch compilers
... | Library/Homebrew/test/test_compilers.rb | @@ -94,9 +94,9 @@ def test_even_more_mixed_compiler_failures
cs.select_compiler
- assert_equal case MacOS.clang_build_version
- when 0..210 then :gcc
- else :clang
+ assert_equal case MacOS.gcc_42_build_version
+ when nil then :llvm
+ else :gcc
end, ENV.compiler
end
@@ -11... | true |
Other | Homebrew | brew | 6197eae3d4eefd621c857773020c0c2a05e1674b.json | mach.rb: remove incorrect comment
IO#read does not raise EOFError, it just returns an empty string for
each call after it consumes the underlying file or stream.
This module is going to be refactored and the begin/rescue is going to
be removed anyway. | Library/Homebrew/mach.rb | @@ -66,9 +66,6 @@ def mach_data
end
mach_data
rescue
- # read() will raise if it sees EOF, which should only happen if the
- # file is < 8 bytes. Otherwise, we raise if the file is not a Mach-O
- # binary. In both cases, we want to return an empty array.
[]
end
end | false |
Other | Homebrew | brew | 0f9910d352e460fe7d93544d91cdc1eb53a9631c.json | Relocate bottles using install_name_tool.
This has two parts:
1. Bottles are temporarily relocated on bottling and tested if that is
sufficient for them to contain no longer reference the prefix or
cellar. If so, they are marked as relocatable.
2. On installation if bottles are marked as relocatable they will be
relo... | Library/Homebrew/cmd/bottle.rb | @@ -1,8 +1,13 @@
require 'formula'
require 'bottles'
require 'tab'
+require 'keg'
module Homebrew extend self
+ def keg_contains string, keg
+ quiet_system 'fgrep', '--recursive', '--quiet', '--max-count=1', string, keg
+ end
+
def bottle_formula f
unless f.installed?
return ofail "Formula not... | true |
Other | Homebrew | brew | 0f9910d352e460fe7d93544d91cdc1eb53a9631c.json | Relocate bottles using install_name_tool.
This has two parts:
1. Bottles are temporarily relocated on bottling and tested if that is
sufficient for them to contain no longer reference the prefix or
cellar. If so, they are marked as relocatable.
2. On installation if bottles are marked as relocatable they will be
relo... | Library/Homebrew/formula_installer.rb | @@ -96,13 +96,13 @@ def install
begin
if pour_bottle?
pour
- poured_bottle = true
+ @poured_bottle = true
end
rescue
opoo "Bottle installation failed: building from source."
end
- unless poured_bottle
+ unless @poured_bottle
build
clean
... | true |
Other | Homebrew | brew | 0f9910d352e460fe7d93544d91cdc1eb53a9631c.json | Relocate bottles using install_name_tool.
This has two parts:
1. Bottles are temporarily relocated on bottling and tested if that is
sufficient for them to contain no longer reference the prefix or
cellar. If so, they are marked as relocatable.
2. On installation if bottles are marked as relocatable they will be
relo... | Library/Homebrew/formula_support.rb | @@ -85,6 +85,7 @@ class Bottle < SoftwareSpec
def initialize
super
@revision = 0
+ @prefix = '/usr/local'
@cellar = '/usr/local/Cellar'
@cat_without_underscores = false
end
@@ -117,6 +118,10 @@ def root_url val=nil
val.nil? ? @root_url : @root_url = val
end
+ def prefix val=nil
+... | true |
Other | Homebrew | brew | 0f9910d352e460fe7d93544d91cdc1eb53a9631c.json | Relocate bottles using install_name_tool.
This has two parts:
1. Bottles are temporarily relocated on bottling and tested if that is
sufficient for them to contain no longer reference the prefix or
cellar. If so, they are marked as relocatable.
2. On installation if bottles are marked as relocatable they will be
relo... | Library/Homebrew/keg_fix_install_names.rb | @@ -2,7 +2,7 @@ class Keg
def fix_install_names
return unless MACOS
mach_o_files.each do |file|
- bad_install_names_for file do |id, bad_names|
+ install_names_for file do |id, bad_names|
file.ensure_writable do
system MacOS.locate("install_name_tool"), "-id", id, file if file... | true |
Other | Homebrew | brew | 0f9910d352e460fe7d93544d91cdc1eb53a9631c.json | Relocate bottles using install_name_tool.
This has two parts:
1. Bottles are temporarily relocated on bottling and tested if that is
sufficient for them to contain no longer reference the prefix or
cellar. If so, they are marked as relocatable.
2. On installation if bottles are marked as relocatable they will be
relo... | Library/Homebrew/test/testball.rb | @@ -221,6 +221,7 @@ class AllCatsBottleSpecTestBall < Formula
sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
bottle do
+ prefix '/private/tmp/testbrew/prefix'
cellar '/private/tmp/testbrew/cellar'
sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard_32
sha1 'faceb00cfaceb00cfaceb0... | true |
Other | Homebrew | brew | d39280bdf7aca09ea7c6d9acf927bd95b6d1e499.json | Add current Ruby globals.
Allows access to the Ruby path. Needed for Linux
porting. | Library/Homebrew/extend/fileutils.rb | @@ -81,13 +81,11 @@ def copy_metadata(path)
end
end
- RUBY_BIN = '/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin'
-
def rake *args
- system "#{RUBY_BIN}/rake", *args
+ system RUBY_BIN/'rake', *args
end
def ruby *args
- system "#{RUBY_BIN}/ruby", *args
+ system RUBY_PATH... | true |
Other | Homebrew | brew | d39280bdf7aca09ea7c6d9acf927bd95b6d1e499.json | Add current Ruby globals.
Allows access to the Ruby path. Needed for Linux
porting. | Library/Homebrew/formula_installer.rb | @@ -285,7 +285,7 @@ def build
begin
read.close
exec '/usr/bin/nice',
- '/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby',
+ RUBY_PATH,
'-W0',
'-I', Pathname.new(__FILE__).dirname,
'-rbuild', | true |
Other | Homebrew | brew | d39280bdf7aca09ea7c6d9acf927bd95b6d1e499.json | Add current Ruby globals.
Allows access to the Ruby path. Needed for Linux
porting. | Library/Homebrew/global.rb | @@ -7,6 +7,7 @@
require 'utils'
require 'exceptions'
require 'set'
+require 'rbconfig'
ARGV.extend(HomebrewArgvExtension)
@@ -63,6 +64,10 @@ def mkpath
HOMEBREW_LOGS = Pathname.new('~/Library/Logs/Homebrew/').expand_path
+RUBY_CONFIG = RbConfig::CONFIG
+RUBY_BIN = Pathname.new("#{RUBY_CONFIG['bindir']}")
+... | true |
Other | Homebrew | brew | 00f05eafe988267da4797922b350aee68c8dd937.json | Remove redundant attr_readers
These are redefined later for use in the bottle DSL. | Library/Homebrew/formula_support.rb | @@ -79,7 +79,6 @@ def verify_download_integrity fn
class Bottle < SoftwareSpec
attr_writer :url
- attr_reader :revision, :root_url, :cellar
# TODO: Can be removed when all bottles migrated to underscored cat symbols.
attr_reader :cat_without_underscores
| false |
Other | Homebrew | brew | 303feacdd92f693918a9bc8f5bfa14d6ca7a1244.json | Fix tests under 32-bit SL | Library/Homebrew/test/test_formula.rb | @@ -103,9 +103,10 @@ def test_formula_specs
assert_equal :sha1, f.bottle.checksum.hash_type
assert_equal :sha256, f.devel.checksum.hash_type
assert_equal case MacOS.cat
- when :snow_leopard then 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
- when :lion then 'baadf00dbaadf00dbaadf00dbaadf00dbaadf0... | true |
Other | Homebrew | brew | 303feacdd92f693918a9bc8f5bfa14d6ca7a1244.json | Fix tests under 32-bit SL | Library/Homebrew/test/testball.rb | @@ -107,6 +107,7 @@ class SpecTestBall < Formula
end
bottle do
+ sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard_32
sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard
sha1 'baadf00dbaadf00dbaadf00dbaadf00dbaadf00d' => :lion
sha1 '8badf00d8badf00d8badf00d8badf00d8... | true |
Other | Homebrew | brew | 43c39afb8f2b8026ac8fbdb1f8aa570f29a6e477.json | Use attr_accessor to suppress warning | Library/Homebrew/superenv.rb | @@ -255,7 +255,7 @@ def [] key
fetch(key)
elsif %w{CPPFLAGS CFLAGS LDFLAGS}.include? key
class << (a = "")
- attr :key, true
+ attr_accessor :key
def + value
ENV[key] = value
end | false |
Other | Homebrew | brew | a21be66fc868c9c343372e1fb798f68087acc95b.json | Rename these collections for clarity | Library/Homebrew/build.rb | @@ -92,8 +92,8 @@ def install f
end
if superenv?
- ENV.deps = keg_only_deps.map(&:to_s)
- ENV.all_deps = deps.map(&:to_s)
+ ENV.keg_only_deps = keg_only_deps.map(&:to_s)
+ ENV.deps = deps.map(&:to_s)
ENV.x11 = f.recursive_requirements.detect { |rq| rq.kind_of?(X11Dependency) }
ENV.setup_bu... | true |
Other | Homebrew | brew | a21be66fc868c9c343372e1fb798f68087acc95b.json | Rename these collections for clarity | Library/Homebrew/superenv.rb | @@ -22,9 +22,7 @@ def superenv?
end
class << ENV
- attr :deps, true
- attr :all_deps, true # above is just keg-only-deps
- attr :x11, true
+ attr_accessor :keg_only_deps, :deps, :x11
alias_method :x11?, :x11
def reset
@@ -114,16 +112,16 @@ def determine_path
paths << "#{MacSystem.xcode43_develope... | true |
Other | Homebrew | brew | 149e65cc8a8858ce1d9c5235a92ed5bfc94dbbbe.json | Add pkgconfig dirs for all deps under superenv
Fixes Homebrew/homebrew#18367. | Library/Homebrew/superenv.rb | @@ -122,8 +122,8 @@ def determine_path
end
def determine_pkg_config_path
- paths = deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/lib/pkgconfig" }
- paths += deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/share/pkgconfig" }
+ paths = all_deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/lib/pkgconfig" }
+ ... | false |
Other | Homebrew | brew | df1d27b037ad2415d0369a829701e290722a1a99.json | superenv/cc: keep exec monkeypatch out of Object | Library/ENV/4.3/cc | @@ -21,18 +21,20 @@ def syspath
%W{/usr /usr/local}
end
end
-def exec *args
- path = File.expand_path('~/Library/Logs/Homebrew/cc.log')
- open(path, 'a') do |f|
- f.print '[', $0
- f.print " -%s" % ENV['HOMEBREW_CCCFG'] if ENV['HOMEBREW_CCCFG']
- f.print '] '
- f.puts args.join(' ')
- f.puts
-... | false |
Other | Homebrew | brew | a554e72dc6d57ae810b6da741da46e2cb9d19b23.json | Revert "README: Add Kickstarter link."
This reverts commit b7aaad60308856611349079288bdb274668e4a16. | README.md | @@ -2,12 +2,6 @@ Homebrew
========
Features, usage and installation instructions are [summarized on the homepage][home].
-Kickstarter
------------
-
-Please [back our Kickstarter](http://www.kickstarter.com/projects/homebrew/brew-test-bot) before March 6th:
-[ }
- tapped = link_tap_formula(files)
- puts "Tapped #{tapped} formula"
+ link_tap_formula(files)
+ puts "Tapped #{files.count} formula"
# Figure out if this repo is private
... | true |
Other | Homebrew | brew | e714a47c10c35bffd8de2d9e703db9d8c9e6d0eb.json | tap: adjust formula count for unsymlinked files
Relying on the output of `tapped` results in ignoring formulae which
already exist in core, with messages like "Tapped 0 formula" for
non-empty taps. | Library/Homebrew/cmd/untap.rb | @@ -19,9 +19,9 @@ def untap
files = []
tapd.find_formula{ |file| files << Pathname.new("#{user}-#{repo}").join(file) }
- untapped = unlink_tap_formula(files)
+ unlink_tap_formula(files)
rm_rf tapd
- puts "Untapped #{untapped} formula"
+ puts "Untapped #{files.count} formula"
end
def... | true |
Other | Homebrew | brew | c75a7decb7a3a89a28c12c3f2277e1496d3c6775.json | Save a subshell here | Library/Homebrew/build.rb | @@ -38,7 +38,7 @@ def main
# Force any future invocations of sudo to require the user's password to be
# re-entered. This is in-case any build script call sudo. Certainly this is
# can be inconvenient for the user. But we need to be safe.
- system "/usr/bin/sudo -k"
+ system "/usr/bin/sudo", "-k"
instal... | false |
Other | Homebrew | brew | af7f7d735303d17e0a120bf1ca5a9e2374c32c19.json | Add environment variable to build bottles. | Library/Homebrew/extend/ARGV.rb | @@ -126,7 +126,7 @@ def build_32_bit?
end
def build_bottle?
- include? '--build-bottle'
+ include? '--build-bottle' or ENV['HOMEBREW_BUILD_BOTTLE']
end
def build_from_source? | false |
Other | Homebrew | brew | 20c0ddc40100b08f26d274c550ab0051d9831d21.json | Add non-/usr/local bottles support.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/bottles.rb | @@ -10,7 +10,6 @@ def bottle_filename f, bottle_revision=nil
end
def install_bottle? f
- return true if ARGV.include? '--install-bottle' and MacOS.bottles_supported?(true)
return true if f.downloader and defined? f.downloader.local_bottle_path \
and f.downloader.local_bottle_path
@@ -19,6 +18,7 @@ def in... | true |
Other | Homebrew | brew | 20c0ddc40100b08f26d274c550ab0051d9831d21.json | Add non-/usr/local bottles support.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/bottle.rb | @@ -20,12 +20,22 @@ def bottle_formula f
HOMEBREW_CELLAR.cd do
ohai "Bottling #{f.name} #{f.version}..."
+ bottle_relocatable = !quiet_system(
+ 'grep', '--recursive', '--quiet', '--max-count=1',
+ HOMEBREW_CELLAR, "#{f.name}/#{f.version}")
+ cellar = nil
+ if bottle_r... | true |
Other | Homebrew | brew | 20c0ddc40100b08f26d274c550ab0051d9831d21.json | Add non-/usr/local bottles support.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/formula_support.rb | @@ -79,13 +79,14 @@ def verify_download_integrity fn
class Bottle < SoftwareSpec
attr_writer :url
- attr_reader :revision, :root_url
+ attr_reader :revision, :root_url, :cellar
# TODO: Can be removed when all bottles migrated to underscored cat symbols.
attr_reader :cat_without_underscores
def initia... | true |
Other | Homebrew | brew | 20c0ddc40100b08f26d274c550ab0051d9831d21.json | Add non-/usr/local bottles support.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/macos.rb | @@ -242,16 +242,6 @@ def bottles_supported? raise_if_failed=false
raise "Bottles are not supported on 32-bit Snow Leopard."
end
- unless HOMEBREW_PREFIX.to_s == '/usr/local'
- return false unless raise_if_failed
- raise "Bottles are only supported with a /usr/local prefix."
- end
-
- un... | true |
Other | Homebrew | brew | 20c0ddc40100b08f26d274c550ab0051d9831d21.json | Add non-/usr/local bottles support.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/test/testball.rb | @@ -190,6 +190,7 @@ class SnowLeopardBottleSpecTestBall < Formula
sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5'
bottle do
+ cellar :any
sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard
end
@@ -204,6 +205,7 @@ class LionBottleSpecTestBall < Formula
sha1 '482e737739d946b7c8cbaf12... | true |
Other | Homebrew | brew | 161104cae70f3207b247331d182dc47c0b8c8a06.json | Exclude all located superenv paths.
The previous fix only looked at the current Homebrew but we should
discard hits from other installations of Homebrew too. | Library/Homebrew/macos.rb | @@ -39,7 +39,7 @@ def locate tool
xcrun_path = unless Xcode.bad_xcode_select_path?
path = `/usr/bin/xcrun -find #{tool} 2>/dev/null`.chomp
# If xcrun finds a superenv tool then discard the result.
- path unless path.include?(HOMEBREW_REPOSITORY/"Library/ENV")
+ path unle... | false |
Other | Homebrew | brew | aca48deda0f7bbb9831291dbf47ed3c8e4ae2b9c.json | BuildEnvironment: use separate sets for procs and symbols | Library/Homebrew/build_environment.rb | @@ -3,10 +3,14 @@
class BuildEnvironment
def initialize(*settings)
@settings = Set.new(settings)
+ @procs = Set.new
end
def <<(o)
- @settings << o
+ case o
+ when Proc then @procs << o
+ else @settings << o
+ end
self
end
@@ -19,12 +23,11 @@ def userpaths?
end
def mo... | true |
Other | Homebrew | brew | aca48deda0f7bbb9831291dbf47ed3c8e4ae2b9c.json | BuildEnvironment: use separate sets for procs and symbols | Library/Homebrew/test/test_build_environment.rb | @@ -21,8 +21,10 @@ def test_userpaths?
end
def test_modify_build_environment
- @env << Proc.new { 1 }
- assert_equal 1, @env.modify_build_environment
+ @env << Proc.new { raise StandardError }
+ assert_raises(StandardError) do
+ @env.modify_build_environment
+ end
end
def test_marsha... | true |
Other | Homebrew | brew | b1241bb3a1971bb0cdba2e0f1fef6ad046b5f109.json | brew create: use test DSL | Library/Homebrew/cmd/create.rb | @@ -146,7 +146,9 @@ def install
system "make install" # if this fails, try separate make/make install steps
end
- def test
+ test do
+ # `test do` will create, run in and delete a temporary directory.
+ #
# This test will fail and we won't accept that! It's enough to j... | false |
Other | Homebrew | brew | 0a3c1bb5751fb774b9b595a88830c56ff9531bbc.json | README: Add Kickstarter link.
Closes Homebrew/homebrew#17963 | README.md | @@ -2,6 +2,12 @@ Homebrew
========
Features, usage and installation instructions are [summarized on the homepage][home].
+Kickstarter
+-----------
+
+Please [back our Kickstarter](http://www.kickstarter.com/projects/homebrew/brew-test-bot) before March 6th:
+[ { exit! 130 } # no backtrace thanks
-HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] = File.expand_path(__FILE__)
+HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE']
+HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] ||= File.expand_path(__FILE__)
if ARGV == %w{--prefix}
puts F... | true |
Other | Homebrew | brew | f9f05d1173805c533f5d31a398633f87475de833.json | brew: use a shell wrapper script for brew
This reverts commit dfd4dd12a41e1697ee9d5feac12cc1ea7c3a590e.
Fixes the problems from Homebrew/homebrew#17683 and Homebrew/homebrew#17685. | bin/brew | @@ -0,0 +1,24 @@
+#!/bin/sh
+BREW_FILE_DIRECTORY=$(dirname "$0")
+BREW_FILE_DIRECTORY=$(cd "$BREW_FILE_DIRECTORY" && pwd -P)
+
+BREW_FILENAME=$(basename "$0")
+export HOMEBREW_BREW_FILE="$BREW_FILE_DIRECTORY/$BREW_FILENAME"
+
+BREW_SYMLINK=$(readlink $0)
+if [ -n "$BREW_SYMLINK" ]
+then
+ BREW_SYMLINK_DIRECTORY=$(dirna... | true |
Other | Homebrew | brew | 9561b4bc8e0fee449af60f8957c7ea510e41b561.json | Fix X11 proxy constant lookup under 1.9+ | Library/Homebrew/requirements.rb | @@ -109,19 +109,29 @@ def self.inherited(mod)
class Proxy < self
PACKAGES = [:libpng, :freetype, :fontconfig]
- def self.for(name, *tags)
- constant = name.capitalize
-
- if const_defined?(constant)
- klass = const_get(constant)
- else
- klass = Class.new(self) do
- de... | false |
Other | Homebrew | brew | 3701081b65cbfd09024b95b0de2e154a3ba7478d.json | brew-mirror-check: fix error handling | Library/Contributions/cmd/brew-mirror-check.rb | @@ -12,13 +12,10 @@ def test_mirror mirror
tarball_path = downloader.tarball_path
tarball_path.unlink if tarball_path.exist?
- begin
- fetched = downloader.fetch
- rescue DownloadError => e
- opoo "Failed to fetch from URL: #{url}"
- return
- end
-
+ fetched = downloader.fetch
+ ... | false |
Other | Homebrew | brew | 97368f8dfc73614b488cf622e91acc8d7b05743f.json | Contributions: fix soft link that not refer current file.
a6324cb forget fix soft link in ENV folder, it cause superenv
use Apple provided git and svn.
Closes Homebrew/homebrew#17927.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/ENV/4.3/git | @@ -1 +1 @@
-../../Contributions/cmds/git
\ No newline at end of file
+../../Contributions/cmd/git
\ No newline at end of file | true |
Other | Homebrew | brew | 97368f8dfc73614b488cf622e91acc8d7b05743f.json | Contributions: fix soft link that not refer current file.
a6324cb forget fix soft link in ENV folder, it cause superenv
use Apple provided git and svn.
Closes Homebrew/homebrew#17927.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/ENV/4.3/svn | @@ -1 +1 @@
-../../Contributions/cmds/svn
\ No newline at end of file
+../../Contributions/cmd/svn
\ No newline at end of file | true |
Other | Homebrew | brew | 1a799f04e6af870c03aa02f2c3a9db6e0bd55bca.json | Remove unused variables | Library/Homebrew/cmd/audit.rb | @@ -118,8 +118,6 @@ def audit_file
end
def audit_deps
- problems = []
-
# Don't depend_on aliases; use full name
aliases = Formula.aliases
f.deps.select { |d| aliases.include? d.name }.each do |d|
@@ -163,8 +161,8 @@ def audit_deps
def audit_conflicts
f.conflicts.each do |req|
b... | true |
Other | Homebrew | brew | 1a799f04e6af870c03aa02f2c3a9db6e0bd55bca.json | Remove unused variables | Library/Homebrew/cmd/cleanup.rb | @@ -11,7 +11,7 @@ def cleanup
HOMEBREW_CELLAR.children.each do |rack|
begin
cleanup_formula rack.basename.to_s if rack.directory?
- rescue FormulaUnavailableError => e
+ rescue FormulaUnavailableError
# Don't complain about Cellar folders that are from DIY... | true |
Other | Homebrew | brew | 1a799f04e6af870c03aa02f2c3a9db6e0bd55bca.json | Remove unused variables | Library/Homebrew/cmd/update.rb | @@ -25,7 +25,6 @@ def update
master_updater.pull!
report.merge!(master_updater.report)
- new_files = []
Dir["Library/Taps/*"].each do |tapd|
next unless File.directory?(tapd)
| true |
Other | Homebrew | brew | 1a799f04e6af870c03aa02f2c3a9db6e0bd55bca.json | Remove unused variables | Library/Homebrew/formula.rb | @@ -228,7 +228,7 @@ def brew
# we allow formulae to do anything they want to the Ruby process
# so load any deps before this point! And exit asap afterwards
yield self
- rescue RuntimeError, SystemCallError => e
+ rescue RuntimeError, SystemCallError
%w(config.log CMakeCach... | true |
Other | Homebrew | brew | 1a799f04e6af870c03aa02f2c3a9db6e0bd55bca.json | Remove unused variables | Library/Homebrew/formula_installer.rb | @@ -219,7 +219,7 @@ def finish
if f.keg_only?
begin
Keg.new(f.prefix).optlink
- rescue Exception => e
+ rescue Exception
onoe "Failed to create: #{f.opt_prefix}"
puts "Things that depend on #{f} will probably not build."
end
@@ -302,7 +302,7 @@ def build
Ta... | true |
Other | Homebrew | brew | 1a799f04e6af870c03aa02f2c3a9db6e0bd55bca.json | Remove unused variables | Library/Homebrew/test/test_formula.rb | @@ -54,7 +54,7 @@ def test_mirror_support
HOMEBREW_CACHE.mkpath unless HOMEBREW_CACHE.exist?
nostdout do
f = TestBallWithMirror.new
- tarball, downloader = f.fetch
+ _, downloader = f.fetch
assert_equal f.url, "file:///#{TEST_FOLDER}/bad_url/testball-0.1.tbz"
assert_equal downlo... | true |
Other | Homebrew | brew | 1a799f04e6af870c03aa02f2c3a9db6e0bd55bca.json | Remove unused variables | Library/Homebrew/test/test_versions.rb | @@ -60,7 +60,7 @@ def test_no_version
end
def test_bad_version
- assert_raises(RuntimeError) { f = TestBadVersion.new }
+ assert_raises(RuntimeError) { TestBadVersion.new }
end
def test_version_all_dots | true |
Other | Homebrew | brew | 77665053488c37c3ca02a145e77a799891e57fac.json | brew-doctor: fix autocrlf warning (again).
Closes Homebrew/homebrew#17843. | Library/Homebrew/cmd/doctor.rb | @@ -743,17 +743,16 @@ def check_git_newline_settings
return unless which "git"
autocrlf = `git config --get core.autocrlf`.chomp
- safecrlf = `git config --get core.safecrlf`.chomp
- if !autocrlf.empty? && autocrlf != 'false' then <<-EOS.undent
+ if autocrlf == 'true' then <<-EOS.undent
Suspicious Git... | false |
Other | Homebrew | brew | 4aacf5400e08860ebd6e579c38a08f02d386a65d.json | brew-update: show upgrade command on formula parameters.
Closes Homebrew/homebrew#17814. | Library/Homebrew/cmd/update.rb | @@ -6,7 +6,12 @@ module Homebrew extend self
DEPRECATED_TAPS = ['adamv-alt']
def update
- abort "This command updates brew itself, and does not take formula names." unless ARGV.named.empty?
+ unless ARGV.named.empty?
+ abort <<-EOS.undent
+ This command updates brew itself, and does not take f... | false |
Other | Homebrew | brew | 612745352d960a17b4dbaaf08987959ff8370898.json | GitDownloadStrategy: generalize has_tag? to has_ref? | Library/Homebrew/download_strategy.rb | @@ -356,8 +356,8 @@ def git_dir
@clone.join(".git")
end
- def has_tag?(tag)
- quiet_system @@git, '--git-dir', git_dir, 'rev-parse', '-q', '--verify', tag
+ def has_ref?
+ quiet_system @@git, '--git-dir', git_dir, 'rev-parse', '-q', '--verify', @ref
end
def support_depth?
@@ -401,7 +401,7 @@ d... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.