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 | fa586cd436f3ca934b37e72c31730cad4652d7ee.json | doctor: normalize representation of env variables
Current warnings contain a mix of variable names with a '$' prefix and
without; most documentation omits the '$', so drop it.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/doctor.rb | @@ -352,7 +352,7 @@ def check_user_path
Consider editing your .bashrc to put:
#{HOMEBREW_PREFIX}/bin
- ahead of /usr/bin in your $PATH.
+ ahead of /usr/bin in your PATH.
EOS
end
end
@@ -370,7 +370,7 @@ def check_user_path
You should... | false |
Other | Homebrew | brew | 9f4f23a7f44c152b876e7e045521b3ebca8ed7dc.json | doctor: fix a couple of git-related checks
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/doctor.rb | @@ -570,8 +570,7 @@ def check_for_multiple_volumes
end
def check_for_git
- git = `/usr/bin/which git`.chomp
- if git.empty?
+ unless system "/usr/bin/which -s git"
puts <<-EOS.undent
"Git" was not found in your path.
@@ -586,19 +585,18 @@ def check_for_git
end
def check_git_newline_settings
- ... | false |
Other | Homebrew | brew | df8edc94d6237cc58e8eb51d537c7ddb18687e98.json | utils: fix clang build regex
This has to be able to match things like "211.10.1" so let's stop using
fixed lengths.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/utils.rb | @@ -340,7 +340,7 @@ def clang_version
def clang_build_version
@clang_build_version ||= if File.exist? "/usr/bin/clang"
- `/usr/bin/clang --version` =~ %r[tags/Apple/clang-(\d{2,3}(\.\d)*)]
+ `/usr/bin/clang --version` =~ %r[tags/Apple/clang-(\d+(\.\d+)*)]
$1
end
end | false |
Other | Homebrew | brew | ffd5b7d7ab9b616408d00b895f4ec0b2d38f6dd4.json | Add support for xz-compressed tarballs
Rationale: some software (e.g. GNU Coreutils, GnuTLS 3.x), have started
distributing _only_ xz-compressed tarballs. There is no system XZ
utility provided by OS X, but it is necessary so that we can continue to
provide formulae for this software.
If XZUtils isn't installed, we a... | Library/Homebrew/download_strategy.rb | @@ -76,8 +76,8 @@ def stage
# Use more than 4 characters to not clash with magicbytes
magic_bytes = "____pkg"
else
- # get the first four bytes
- File.open(@tarball_path) { |f| magic_bytes = f.read(4) }
+ # get the first six bytes
+ File.open(@tarball_path) { |f| magic_bytes = f.r... | true |
Other | Homebrew | brew | ffd5b7d7ab9b616408d00b895f4ec0b2d38f6dd4.json | Add support for xz-compressed tarballs
Rationale: some software (e.g. GNU Coreutils, GnuTLS 3.x), have started
distributing _only_ xz-compressed tarballs. There is no system XZ
utility provided by OS X, but it is necessary so that we can continue to
provide formulae for this software.
If XZUtils isn't installed, we a... | Library/Homebrew/extend/pathname.rb | @@ -62,9 +62,9 @@ def cp dst
return dst
end
- # extended to support the double extensions .tar.gz and .tar.bz2
+ # extended to support the double extensions .tar.gz, .tar.bz2, and .tar.xz
def extname
- /(\.tar\.(gz|bz2))$/.match to_s
+ /(\.tar\.(gz|bz2|xz))$/.match to_s
return $1 if $1
re... | true |
Other | Homebrew | brew | ffd5b7d7ab9b616408d00b895f4ec0b2d38f6dd4.json | Add support for xz-compressed tarballs
Rationale: some software (e.g. GNU Coreutils, GnuTLS 3.x), have started
distributing _only_ xz-compressed tarballs. There is no system XZ
utility provided by OS X, but it is necessary so that we can continue to
provide formulae for this software.
If XZUtils isn't installed, we a... | Library/Homebrew/test/test_bucket.rb | @@ -32,8 +32,10 @@ def test_supported_compressed_types
assert_nothing_raised do
MockFormula.new 'test-0.1.tar.gz'
MockFormula.new 'test-0.1.tar.bz2'
+ MockFormula.new 'test-0.1.tar.xz'
MockFormula.new 'test-0.1.tgz'
MockFormula.new 'test-0.1.bgz'
+ MockFormula.new 'test-0.1.tx... | true |
Other | Homebrew | brew | f501e7f00b7816aae703463815f5cef0e38e0086.json | Ignore $HOME/.curlrc when invoking curl
Several issues have been caused by conflicts between the options
Homebrew passes to curl and those read from $HOME/.curlrc. Passing '-q'
will force curl to ignore settings in that file.
Suggested in Homebrew/homebrew#9027.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/global.rb | @@ -45,7 +45,7 @@
HOMEBREW_USER_AGENT = "Homebrew #{HOMEBREW_VERSION} (Ruby #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}; Mac OS X #{MACOS_FULL_VERSION})"
-HOMEBREW_CURL_ARGS = '-f#LA'
+HOMEBREW_CURL_ARGS = '-qf#LA'
RECOMMENDED_LLVM = 2326
RECOMMENDED_GCC_40 = (MACOS_VERSION >= 10.6) ? 5494 : 5493 | false |
Other | Homebrew | brew | 94f84544c6da64b60d5ea2c48d2c4ee3533807c2.json | formula.rb: Fix use of xcode_version in LLVM check
Should be `MacOS.xcode_version`.
Fixes Homebrew/homebrew#8966. | Library/Homebrew/formula.rb | @@ -351,7 +351,7 @@ def handle_llvm_failure llvm
that we can update the formula accordingly. Thanks!
EOS
puts
- if xcode_version < "4.2"
+ if MacOS.xcode_version < "4.2"
puts "If it doesn't work you can: brew install --use-gcc"
else
puts "If it doesn't work yo... | false |
Other | Homebrew | brew | d0b904a6e4e90fda499cdd8cbe1064c293ad3d04.json | brew doctor: Ignore config files in /usr/X11R6/bin
`/usr/X11R6` is an Apple-provided symlink to `/usr/X11`.
Fixes Homebrew/homebrew#8881. | Library/Homebrew/cmd/doctor.rb | @@ -480,7 +480,7 @@ def check_for_config_scripts
config_scripts = []
path_folders.each do |p|
- next if ['/usr/bin', '/usr/sbin', '/usr/X11/bin', "#{HOMEBREW_PREFIX}/bin", "#{HOMEBREW_PREFIX}/sbin"].include? p
+ next if ['/usr/bin', '/usr/sbin', '/usr/X11/bin', '/usr/X11R6/bin', "#{HOMEBREW_PREFIX}/bin", ... | false |
Other | Homebrew | brew | 3b8c98040c2f579186edce30fe1453e0dc8a71c5.json | download_strategy.ry: Improve Bazaar efficiency
Bazaar download strategy tried to re-download everything on "export" as a
checkout is used. See:
https://answers.launchpad.net/bzr/+question/180269
https://bugs.launchpad.net/bzr/+bug/897511
Related to issue Homebrew/homebrew#8774.
Closes Homebrew/homebrew#8863.
Si... | Library/Homebrew/download_strategy.rb | @@ -498,17 +498,22 @@ def fetch
end
def stage
- dst=Dir.getwd
- Dir.chdir @clone do
- if @spec and @ref
- ohai "Checking out #{@spec} #{@ref}"
- Dir.chdir @clone do
- safe_system 'bzr', 'export', '-r', @ref, dst
- end
- else
- safe_system 'bzr', 'export', dst... | false |
Other | Homebrew | brew | d9c3f19e6a7e13081982c93ba335e23a136c688f.json | Fix installation error from ARGV `--HEAD` filter
The ARGV filtering would strip `--HEAD` from dependency installations,
then proceed with trying to install the dependency from the latest
version in the formula. This causes an error if the latest version is
already installed, so check to see if formula is installed bef... | Library/Homebrew/formula_installer.rb | @@ -33,9 +33,10 @@ def install
else
ARGV.filter_for_dependencies do
# Re-create the formula object so that args like `--HEAD` won't
- # affect properties like the installation prefix.
+ # affect properties like the installation prefix. Also need to
+ ... | false |
Other | Homebrew | brew | 98989560476db26165eef947b96e49d508240b97.json | uses.rb: Pass a block to map instead of a Proc
Passing a `Proc` doesn't work in Ruby 1.8.6 which causes `brew uses` to fail on
Leopard. | Library/Homebrew/cmd/uses.rb | @@ -20,6 +20,6 @@ def uses
keg.directory? and not keg.subdirs.empty?
end
end
- puts_columns uses.map(&:to_s).sort
+ puts_columns uses.map{|f| f.to_s}.sort
end
end | false |
Other | Homebrew | brew | 0d08a5af00011679acd6d82714e9883f93b9fb7c.json | formula.rb: Initialize path to nil or a Pathname
For consistency, ensure that the `path` member of formula objects is always a
`Pathname`. | Library/Homebrew/formula.rb | @@ -130,7 +130,7 @@ def initialize name='__UNKNOWN__', path=nil
@name=name
validate_variable :name
- @path=path
+ @path = path.nil? ? nil : Pathname.new(path)
set_instance_variable 'version'
@version ||= @spec_to_use.detect_version | false |
Other | Homebrew | brew | 265ea4d1fbed5c43717cd134b636245a495e616e.json | Display clang version in --config output
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/--config.rb | @@ -17,6 +17,14 @@ def gcc_40
@gcc_40 ||= MacOS.gcc_40_build_version
end
+ def clang
+ @clang ||= MacOS.clang_version
+ end
+
+ def clang_build
+ @clang_build ||= MacOS.clang_build_version
+ end
+
def xcode_version
@xcode_version || MacOS.xcode_version
end
@@ -58,6 +66,7 @@ def config_s; ... | false |
Other | Homebrew | brew | 6fce4348570f3022c987de9f2f3aefb4b7d5b483.json | Add utility methods to determine clang version
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/utils.rb | @@ -340,6 +340,20 @@ def llvm_build_version
end
end
+ def clang_version
+ @clang_version ||= if File.exist? "/usr/bin/clang"
+ `/usr/bin/clang --version` =~ /clang version (\d\.\d)/
+ $1
+ end
+ end
+
+ def clang_build_version
+ @clang_build_version ||= if File.exist? "/usr/bin/clang"
+ ... | false |
Other | Homebrew | brew | e04e23492cd011cb0073f9bd5614bdce8e03b39e.json | formula_installer.rb: Improve receipt check
Using `f.installed?` instead of `f.prefix.exist?` ensures something was created
by the installation step before the install receipt is written. | Library/Homebrew/formula_installer.rb | @@ -131,7 +131,7 @@ def build
raise "Suspicious installation failure" unless $?.success?
# Write an installation receipt (a Tab) to the prefix
- Tab.for_install(f, args).write if f.prefix.exist?
+ Tab.for_install(f, args).write if f.installed?
end
end
| false |
Other | Homebrew | brew | 399d73e10037885d0970ee1a7fa89ee2cf876bf8.json | ENV.rb: Fix typo in Fortran environment variables
`FFFLAGS` should be `FFLAGS`. | Library/Homebrew/extend/ENV.rb | @@ -158,7 +158,7 @@ def fortran
if ARGV.include? '--default-fortran-flags'
self['FCFLAGS'] = self['CFLAGS'] unless self['FCFLAGS']
- self['FFFLAGS'] = self['CFLAGS'] unless self['FFFLAGS']
+ self['FFLAGS'] = self['CFLAGS'] unless self['FFLAGS']
elsif not self['FCFLAGS'] or self['F... | false |
Other | Homebrew | brew | 75a7c33e6aac30db7827ef3f1076b282057fff5b.json | options: treat outdated brews as installed
`brew options --installed` will now "do the right thing".
There is getting to be a small but noticeable amount of code duplication
among commands that take options like "--installed" or "--all"; it may
be worth factoring this out into a method that will return a collection
o... | Library/Homebrew/cmd/options.rb | @@ -1,10 +1,15 @@
require 'formula'
+require 'cmd/outdated'
def ff
if ARGV.include? "--all"
Formula.all
elsif ARGV.include? "--installed"
- Formula.all.reject{ |f| not f.installed? }
+ # outdated brews count as installed
+ outdated = Homebrew.outdated_brews.collect{ |b| b.name }
+ Formula.all... | false |
Other | Homebrew | brew | 31eba09830b44cc08ec9a3856fcc9e1d66a8b7af.json | audit.rb: Check version strings by default
Tired of telling people that version numbers are redundant. Just check it by
default since the `--strict` flag to `brew audit` is not well advertised. | Library/Homebrew/cmd/audit.rb | @@ -308,7 +308,7 @@ def audit
problems += audit_formula_text(f.name, text_without_patch)
problems += audit_formula_options(f, text_without_patch)
- problems += audit_formula_version(f, text_without_patch) if strict?
+ problems += audit_formula_version(f, text_without_patch)
unless pro... | false |
Other | Homebrew | brew | 0dc87a51000f75b5fb12c4de2c1b5f8d6e2cd1f0.json | Add copyright notice for MultiJson | Library/Homebrew/vendor/LICENSE | @@ -0,0 +1,20 @@
+MultiJson Copyright (c) 2010 Michael Bleigh, Josh Kalderimis, Erik Michaels-Ober, and Intridea, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, incl... | false |
Other | Homebrew | brew | ec1c7aaa38d7a41ac872f27bb67fc855721346d9.json | metadata: Use options from previous installs
FormulaInstaller now loads the install recipt of a previous install and appends
the `used_options` to ARGV before forking to build. This means `brew upgrade`
will "remember" which options were invoked for the last install and re-use
them.
Fixes Homebrew/homebrew#5250. | Library/Homebrew/formula_installer.rb | @@ -248,9 +248,11 @@ def filtered_args
# Did the user actually pass the formula this installer is considering on
# the command line?
def explicitly_requested?; ARGV.formulae.include? f end
+ previous_install = Tab.for_formula f
args = ARGV.clone
- args.uniq! # Just in case someone was playin... | true |
Other | Homebrew | brew | ec1c7aaa38d7a41ac872f27bb67fc855721346d9.json | metadata: Use options from previous installs
FormulaInstaller now loads the install recipt of a previous install and appends
the `used_options` to ARGV before forking to build. This means `brew upgrade`
will "remember" which options were invoked for the last install and re-use
them.
Fixes Homebrew/homebrew#5250. | Library/Homebrew/tab.rb | @@ -20,6 +20,41 @@ def self.for_install f, args
:tabfile => f.prefix + 'INSTALL_RECEIPT.json'
end
+ def self.from_file path
+ tab = Tab.new MultiJson.decode(open(path).read)
+ tab.tabfile = path
+
+ return tab
+ end
+
+ def self.for_formula f
+ f = Formula.factory f unless f.kind_of? Fo... | true |
Other | Homebrew | brew | 0474fa11cd88ef04c3e3d77d37bd440e2790984b.json | completion: add __brew_ps1 to annotate $PS1
It is often useful to be reminded that you are, in fact, in the middle
of a debug or interactive install. We provided this reminder in the form
of HOMEBREW_DEBUG_INSTALL, but we can make this even easier for the end
user to consume by exposing it in the form of a shell funct... | Library/Contributions/brew_bash_completion.sh | @@ -2,6 +2,26 @@
#
# To use, edit your .bashrc and add:
# source `brew --prefix`/Library/Contributions/brew_bash_completion.sh
+#
+# The __brew_ps1() function can be used to annotate your PS1 with
+# Homebrew debugging information; it behaves similarly to the __git_ps1()
+# function provided by the git's bash comp... | false |
Other | Homebrew | brew | 0cc3eb296d798e24907bdc9f1a0cc8debc412eb9.json | cleanup: add an option to perform a 'dry run'
Sometimes you want to know what `brew cleanup` will do before it
actually removes anything. Introduce a '-n' option (chosen to match
other UNIX tools) to do this.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Contributions/manpages/brew.1.md | @@ -54,13 +54,15 @@ For the full command list, see the COMMANDS section.
* `cat` <formula>:
Display the source to <formula>.
- * `cleanup [--force]` [<formula>]:
+ * `cleanup [--force] [-n]` [<formula>]:
For all installed or specific formulae, remove any older versions from the
cellar. By default,... | true |
Other | Homebrew | brew | 0cc3eb296d798e24907bdc9f1a0cc8debc412eb9.json | cleanup: add an option to perform a 'dry run'
Sometimes you want to know what `brew cleanup` will do before it
actually removes anything. Introduce a '-n' option (chosen to match
other UNIX tools) to do this.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/cleanup.rb | @@ -13,7 +13,7 @@ def cleanup
end
end
# seems like a good time to do some additional cleanup
- Homebrew.prune
+ Homebrew.prune unless ARGV.include? '-n'
else
ARGV.formulae.each do |f|
cleanup_formula f
@@ -36,7 +36,7 @@ def cleanup_formula f
f.rack.children.e... | true |
Other | Homebrew | brew | 0cc3eb296d798e24907bdc9f1a0cc8debc412eb9.json | cleanup: add an option to perform a 'dry run'
Sometimes you want to know what `brew cleanup` will do before it
actually removes anything. Introduce a '-n' option (chosen to match
other UNIX tools) to do this.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | 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" "October 2011" "Homebrew" "brew"
+.TH "BREW" "1" "November 2011" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for OS X
@@ -64,12 +64,15 @@ If \fB\-\-strict\fR is passed, perf... | true |
Other | Homebrew | brew | a6877c02b02d9479794606bda26778cf4551e536.json | brew-pull: Clarify comment concerning whitespace | Library/Contributions/examples/brew-pull.rb | @@ -36,9 +36,10 @@
# Store current revision
revision = `git log -n1 --format=%H`.strip()
- # Makes sense to squash whitespace errors, we don't want them.
ohai 'Applying patch'
patch_args = %w[am --signoff]
+ # Normally we don't want whitespace errors, but squashing them can break
+ # patc... | false |
Other | Homebrew | brew | d54e7fb4deb98b5572fcdf9a55eba702a2a10f52.json | brew-pull: Add flag to suppress whitespace fixes
When the pull request includes a patch, fixing whitespace can break the patch. | Library/Contributions/examples/brew-pull.rb | @@ -13,7 +13,7 @@
end
HOMEBREW_REPOSITORY.cd do
- ARGV.each do|arg|
+ ARGV.named.each do|arg|
if arg.to_i > 0
url = 'https://github.com/mxcl/homebrew/pull/' + arg + '.patch'
else
@@ -38,13 +38,17 @@
# Makes sense to squash whitespace errors, we don't want them.
ohai 'Applying patch'
-... | false |
Other | Homebrew | brew | 8848857cead43e54a0d2fde85d902096160d95bb.json | audit: check mirror URLs
This will actually throw some possibly unwanted warnings, e.g. whining
about using mirrors.kernel.org for Debian software; we might only want
that warning for the default URL.
Perhaps mirrors deserve their own audit_formula_mirrors, but rather than
duplicate code, let's just check them agains... | Library/Homebrew/cmd/audit.rb | @@ -178,6 +178,11 @@ def audit_formula_urls f
urls = [(f.url rescue nil), (f.head rescue nil)].reject {|p| p.nil?}
+ f.mirrors.each do |m|
+ mirror = m.values_at :url
+ urls << (mirror.to_s rescue nil)
+ end
+
# Check SourceForge urls
urls.each do |p|
# Is it a filedownload (instead of svnroot... | false |
Other | Homebrew | brew | 6ab97f75be351e06aea97355dee043912d549364.json | add Xcode to the blacklist
Closes Homebrew/homebrew#8106.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net> | Library/Homebrew/blacklist.rb | @@ -57,5 +57,12 @@ def blacklisted? name
EOS
when /(lib)?lzma/
"lzma is now part of the xz formula."
+ when 'xcode' then <<-EOS.undent
+ Xcode can be installed via the App Store (on Lion), or from:
+ http://connect.apple.com/
+
+ If you download from the App Store, make sure you run the install... | false |
Other | Homebrew | brew | 4da0b506f4f6993fe805753cb1633fc0db9afc64.json | Add bash completion for subcommand options
We already have option completion for `brew install`; now we have it for
all core commands, and the --cache, --cellar, and --prefix flags now
have appropriate formula completion.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Contributions/brew_bash_completion.sh | @@ -10,14 +10,28 @@ _brew_to_completion()
# Subcommand list
[[ ${COMP_CWORD} -eq 1 ]] && {
local actions="--cache --cellar --config --env --prefix --repository audit cat cleanup
- configure create deps doctor edit fetch help home info install link list log options
+ configure cr... | false |
Other | Homebrew | brew | 203b0df5967061062208449d1ed65082391478f8.json | man page: add some undocumented options
While updating the bash completion script, I encountered some options
that were previously undocumented.
I purposely did not document the --macports and --fink flags for `brew
create`, because the exact same functionality exists in `brew search`.
Perhaps we should remove it fro... | Library/Contributions/manpages/brew.1.md | @@ -61,25 +61,31 @@ For the full command list, see the COMMANDS section.
If `--force` is passed, remove out-of-date keg-only brews as well.
- * `create [--no-fetch]` <URL>:
- Generate a formula for the downloadable file at <URL> and opens it in
+ * `create [--autotools|--cmake] [--no-fetch]` <URL>:
+ G... | true |
Other | Homebrew | brew | 203b0df5967061062208449d1ed65082391478f8.json | man page: add some undocumented options
While updating the bash completion script, I encountered some options
that were previously undocumented.
I purposely did not document the --macports and --fink flags for `brew
create`, because the exact same functionality exists in `brew search`.
Perhaps we should remove it fro... | share/man/man1/brew.1 | @@ -71,25 +71,31 @@ For all installed or specific formulae, remove any older versions from the cella
If \fB\-\-force\fR is passed, remove out\-of\-date keg\-only brews as well\.
.
.TP
-\fBcreate [\-\-no\-fetch]\fR \fIURL\fR
-Generate a formula for the downloadable file at \fIURL\fR and opens it in $EDITOR\. Homebrew... | true |
Other | Homebrew | brew | d73df34bc6ee5cbd989d11c6a927e2ca083b951c.json | doctor: check git version
Checking out over HTTP/HTTPS from GitHub requires git 1.6.6, as GitHub
only allows Smart HTTP transport.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/doctor.rb | @@ -776,6 +776,28 @@ def check_for_leopard_ssl
end
end
+def check_git_version
+ # see https://github.com/blog/642-smart-http-support
+ return unless system "/usr/bin/which -s git"
+ `git --version`.chomp =~ /git version (\d)\.(\d)\.(\d)/
+
+ if $2.to_i > 6
+ return
+ elsif $2.to_i == 6 and $3.to_i == 6
+ ... | false |
Other | Homebrew | brew | 0a49981a30a773dfef50cc2940e47750215046fc.json | Add an attr_reader for 'head'
This allows `brew audit` to inspect the head URLs, for example; until
now, that check was failing silently.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/formula.rb | @@ -100,7 +100,7 @@ class Formula
include FileUtils
attr_reader :name, :path, :url, :version, :homepage, :specs, :downloader
- attr_reader :bottle, :bottle_sha1
+ attr_reader :bottle, :bottle_sha1, :head
# Homebrew determines the name
def initialize name='__UNKNOWN__', path=nil | false |
Other | Homebrew | brew | 558ce2dd3d1c12154d2319e300d1009f9c3cc528.json | Fix syntax error in the bash-completion script
My bad.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Contributions/brew_bash_completion.sh | @@ -57,6 +57,8 @@ _brew_to_completion()
# Commands that take an outdated brew
upgrade)
COMPREPLY=( $(compgen -W "$(brew outdated --quiet)" -- ${cur}) )
+ return
+ ;;
esac
}
| false |
Other | Homebrew | brew | cc7efdc94d3671764853536f3345a7cfd3b00577.json | Make bash completion for `upgrade` smarter
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Contributions/brew_bash_completion.sh | @@ -50,10 +50,13 @@ _brew_to_completion()
return
;;
# Commands that take an existing brew
- abv|cleanup|link|list|ln|ls|remove|rm|test|uninstall|unlink|upgrade)
+ abv|cleanup|link|list|ln|ls|remove|rm|test|uninstall|unlink)
COMPREPLY=( $(compgen -W "$(\ls $(brew --cellar))" -- ${cu... | false |
Other | Homebrew | brew | bcea01ca0a6c9b37d2f147cfc577b93ebd7678f8.json | pathname.rb: Fix spelling for permssions
Closes Homebrew/homebrew#7970.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net> | Library/Homebrew/extend/pathname.rb | @@ -238,7 +238,7 @@ def make_relative_symlink src
unless rv and $? == 0
raise <<-EOS.undent
Could not create symlink #{to_s}.
- Check that you have permssions on #{self.dirname}
+ Check that you have permissions on #{self.dirname}
EOS
end
end | false |
Other | Homebrew | brew | e0c53c56e4e7ec06636b967cb9900a3d2849fd52.json | audit: improve SF 'use_mirror' detection
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/audit.rb | @@ -187,8 +187,8 @@ def audit_formula_urls f
# Is it a sourceforge http(s) URL?
next unless p =~ %r[^https?://.*\bsourceforge\.]
- if p =~ /\?use_mirror=/
- problems << " * Update this url (don't use ?use_mirror)."
+ if p =~ /(\?|&)use_mirror=/
+ problems << " * Update this url (don't use #{... | false |
Other | Homebrew | brew | be9d91b2b80fdfe82720b2e2d3ceec378e33b371.json | audit: match #{prefix}/libexec and prefix+'libexec'
These were being picked up as just "#{prefix}/lib" and prefix+'lib' due
to the eagerness of the regex. Reordering "lib" and "libexec" will take
care of it; I couldn't think of a more clever solution.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/audit.rb | @@ -50,7 +50,7 @@ def audit_formula_text name, text
end
# Prefer formula path shortcuts in Pathname+
- if text =~ %r{\(\s*(prefix\s*\+\s*(['"])(bin|include|lib|libexec|sbin|share))}
+ if text =~ %r{\(\s*(prefix\s*\+\s*(['"])(bin|include|libexec|lib|sbin|share))}
problems << " * \"(#{$1}...#{$2})\" should... | false |
Other | Homebrew | brew | 9bce115e9a0f2c4b5759073e03ef8f6d4f749850.json | doctor: remove redundant sentence
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/doctor.rb | @@ -313,7 +313,6 @@ def check_usr_bin_ruby
def check_homebrew_prefix
unless HOMEBREW_PREFIX.to_s == '/usr/local'
puts <<-EOS.undent
- You can install Homebrew anywhere you want, but some brews may only work
You can install Homebrew anywhere you want, but some brews may only build
correctly i... | false |
Other | Homebrew | brew | 51f010ac390e838e59dfe5c1d2811b7a20f9ab2a.json | audit: recognize options used with 'ARGV.flag?'
A few formula use ARGV.flag? instead of ARGV.include?. This made `audit`
recognize a few undocumented instances of a '--devel' option, but we can
just ignore that like '--HEAD' for now, and change the behavior if we
decide they need to be documented explicitly in each fo... | Library/Homebrew/cmd/audit.rb | @@ -124,7 +124,7 @@ def audit_formula_options f, text
# Find possible options
options = []
- text.scan(/ARGV\.include\?[ ]*\(?(['"])(.+?)\1/) { |m| options << m[1] }
+ text.scan(/ARGV\.(include|flag)\?[ ]*\(?(['"])(.+?)\2/) { |m| options << m[2] }
options.reject! {|o| o.include? "#"}
options.uniq!
@@ ... | false |
Other | Homebrew | brew | d05478e85b776bf262e6bf2ca7b4b883a25de5ed.json | formula.rb: Move cache dir creation to fetch
So that the cache directory will get created if the user runs `brew fetch`
instead of `brew install` as the first command. | Library/Homebrew/formula.rb | @@ -559,6 +559,9 @@ def fetch
downloader = @downloader
mirror_list = mirrors
+ # Ensure the cache exists
+ HOMEBREW_CACHE.mkpath
+
begin
fetched = downloader.fetch
rescue CurlDownloadStrategyError => e
@@ -606,7 +609,6 @@ def verify_download_integrity fn, *args
private
def sta... | false |
Other | Homebrew | brew | 783b71fa5a5d776660b95d6d35d4b11c53b1c4b3.json | Improve external command documentation
In addition to a brief overview of what external commands are, add a
link to the wiki page where the real documentation resides.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Contributions/manpages/brew.1.md | @@ -290,14 +290,20 @@ For the full command list, see the COMMANDS section.
## EXTERNAL COMMANDS
-Homebrew allows external commands to be defined by putting a +x file named
-`brew-<cmdname>` or `brew-<cmdname>.rb` on the PATH. This will cause Homebrew
-to recognize `brew cmdname`.
+Homebrew, like `git`(1), supports... | true |
Other | Homebrew | brew | 783b71fa5a5d776660b95d6d35d4b11c53b1c4b3.json | Improve external command documentation
In addition to a brief overview of what external commands are, add a
link to the wiki page where the real documentation resides.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | share/man/man1/brew.1 | @@ -325,10 +325,10 @@ Display where Homebrew\'s \fB\.git\fR folder is located\. For standard installs,
Print the version number of brew to standard error and exit\.
.
.SH "EXTERNAL COMMANDS"
-Homebrew allows external commands to be defined by putting a +x file named \fBbrew\-<cmdname>\fR or \fBbrew\-<cmdname>\.rb\fR... | true |
Other | Homebrew | brew | 9d19506ee9d79d35eec5063ee1e971583fe79460.json | mirror support: Add mirror method to Formula.rb
Mirrors can now be declared using the `mirror` method which works similar to
`depends_on` and takes the same arguments as `url`.
The formula class now has a public `fetch` method that cycles through the
mirror list if the downloader for the primary URL throws a `Downloa... | Library/Homebrew/cmd/fetch.rb | @@ -10,7 +10,7 @@ def fetch
bucket << f
bucket << f.recursive_deps
end
-
+
bucket = bucket.flatten.uniq
else
bucket = ARGV.formulae
@@ -24,7 +24,7 @@ def fetch
FileUtils.rm_rf where_to if File.exist? where_to
end
- the_tarball = f.downloader.fetch... | true |
Other | Homebrew | brew | 9d19506ee9d79d35eec5063ee1e971583fe79460.json | mirror support: Add mirror method to Formula.rb
Mirrors can now be declared using the `mirror` method which works similar to
`depends_on` and takes the same arguments as `url`.
The formula class now has a public `fetch` method that cycles through the
mirror list if the downloader for the primary URL throws a `Downloa... | Library/Homebrew/formula.rb | @@ -458,6 +458,10 @@ def self.path name
HOMEBREW_REPOSITORY+"Library/Formula/#{name.downcase}.rb"
end
+ def mirrors
+ self.class.mirrors or []
+ end
+
def deps
self.class.deps or []
end
@@ -549,8 +553,26 @@ def mktemp
CHECKSUM_TYPES=[:md5, :sha1, :sha256].freeze
- public # for FormulaI... | true |
Other | Homebrew | brew | 560fb2dbcb118e9849ffb823f61345e2f9f465ef.json | brew-missing: use name accessor on Formula objects
Commit 00cd16f changed oudated_brews to return a list of Formula
objects rather than a list of lists containing formula information.
Now we must access the formula name by using the 'name' accessor rather
than an array index.
Signed-off-by: Jack Nagel <jacknagel@gma... | Library/Contributions/examples/brew-missing.rb | @@ -12,7 +12,7 @@ def installed_brews
def main
# Names of outdated brews; they count as installed.
- outdated = Homebrew.outdated_brews.collect{ |b| b[1] }
+ outdated = Homebrew.outdated_brews.collect{ |b| b.name }
formuale_to_check = ARGV.formulae rescue installed_brews
| false |
Other | Homebrew | brew | 3898010309d51d9c7a91fecb2f5bdbcb80e38180.json | doctor: restore some line breaks | Library/Homebrew/cmd/doctor.rb | @@ -666,6 +666,7 @@ def check_for_linked_kegonly_brews
EOS
puts *warnings.keys.collect { |f| " #{f}" }
+ puts
end
end
@@ -746,6 +747,7 @@ def check_missing_deps
if s.length > 0
ohai "You should brew install these missing dependencies:"
puts s
+ puts
end
end
@@ -754,6 +756,7... | false |
Other | Homebrew | brew | a404ceb29ad49c3829b63bebdceed19385fde3d9.json | brew-upgrade: Fix installation of dependencies
Fixes Homebrew/homebrew#7528.
Closes Homebrew/homebrew#7572. | Library/Homebrew/cmd/upgrade.rb | @@ -20,6 +20,15 @@ def upgrade
end
end
+ # Expand the outdated list to include outdated dependencies then sort and
+ # reduce such that dependencies are installed first and installation is not
+ # attempted twice. Sorting is implicit the way `recursive_deps` returns
+ # root dependencies at th... | false |
Other | Homebrew | brew | 2492c6564d76d4a000f99f69e1aae85d5a707c10.json | Return Formula objects from `outdated_brews`
Previously, `outdated_brews` returned a list of lists---each containing three
components of a Formula object:
- f.rack
- f.name
- f.version
Frequently more information is required which necessitates back-casting from
`name` to a Formula object---simpy returning form... | Library/Homebrew/cmd/outdated.rb | @@ -2,12 +2,12 @@
module Homebrew extend self
def outdated
- outdated_brews.each do |keg, name, version|
+ outdated_brews.each do |f|
if $stdout.tty? and not ARGV.flag? '--quiet'
- versions = keg.cd{ Dir['*'] }.join(', ')
- puts "#{name} (#{versions} < #{version})"
+ versions = f... | true |
Other | Homebrew | brew | 2492c6564d76d4a000f99f69e1aae85d5a707c10.json | Return Formula objects from `outdated_brews`
Previously, `outdated_brews` returned a list of lists---each containing three
components of a Formula object:
- f.rack
- f.name
- f.version
Frequently more information is required which necessitates back-casting from
`name` to a Formula object---simpy returning form... | Library/Homebrew/cmd/upgrade.rb | @@ -14,24 +14,23 @@ def upgrade
outdated = if ARGV.named.empty?
Homebrew.outdated_brews
else
- ARGV.formulae.map do |f|
+ ARGV.formulae.each do |f|
raise "#{f} already upgraded" if f.installed?
raise "#{f} not installed" unless f.rack.exist? and not f.rack.children.empty?
- ... | true |
Other | Homebrew | brew | 94dba21f7d5c3a1c6d935b62dd965c491a158e40.json | Centralize definition of `rack` in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it
gets defined and used quite a bit. This patch makes `rack` an official method
of the `Formula` class. | Library/Homebrew/build.rb | @@ -86,7 +86,7 @@ def install f
rescue Exception
if f.prefix.directory?
f.prefix.rmtree
- f.prefix.parent.rmdir_if_possible
+ f.rack.rmdir_if_possible
end
raise
end | true |
Other | Homebrew | brew | 94dba21f7d5c3a1c6d935b62dd965c491a158e40.json | Centralize definition of `rack` in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it
gets defined and used quite a bit. This patch makes `rack` an official method
of the `Formula` class. | Library/Homebrew/cmd/cleanup.rb | @@ -23,25 +23,24 @@ def cleanup
def cleanup_formula f
f = Formula.factory f
- rack = f.prefix.parent
# Don't clean up keg-only brews for now.
# Formulae link directly to them, so cleaning up old
# ones will break already compiled software.
if f.keg_only? and not ARGV.force?
- opo... | true |
Other | Homebrew | brew | 94dba21f7d5c3a1c6d935b62dd965c491a158e40.json | Centralize definition of `rack` in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it
gets defined and used quite a bit. This patch makes `rack` an official method
of the `Formula` class. | Library/Homebrew/cmd/info.rb | @@ -50,9 +50,8 @@ def info_formula f
puts "Depends on: #{f.deps*', '}" unless f.deps.empty?
- rack = f.prefix.parent
- if rack.directory?
- kegs = rack.children
+ if f.rack.directory?
+ kegs = f.rack.children
kegs.each do |keg|
next if keg.basename.to_s == '.DS_Store'
... | true |
Other | Homebrew | brew | 94dba21f7d5c3a1c6d935b62dd965c491a158e40.json | Centralize definition of `rack` in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it
gets defined and used quite a bit. This patch makes `rack` an official method
of the `Formula` class. | Library/Homebrew/cmd/uninstall.rb | @@ -10,17 +10,16 @@ def uninstall
end
else
ARGV.formulae.each do |f|
- rack = f.prefix.parent
- if rack.directory?
+ if f.rack.directory?
puts "Uninstalling #{f}..."
- rack.children.each do |keg|
+ f.rack.children.each do |keg|
if keg.dir... | true |
Other | Homebrew | brew | 94dba21f7d5c3a1c6d935b62dd965c491a158e40.json | Centralize definition of `rack` in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it
gets defined and used quite a bit. This patch makes `rack` an official method
of the `Formula` class. | Library/Homebrew/cmd/upgrade.rb | @@ -7,12 +7,6 @@ def plural_s
end
end
-class Formula
- def rack
- HOMEBREW_CELLAR/name
- end
-end
-
module Homebrew extend self
def upgrade
Homebrew.perform_preinstall_checks
@@ -23,7 +17,7 @@ def upgrade
ARGV.formulae.map do |f|
raise "#{f} already upgraded" if f.installed?
... | true |
Other | Homebrew | brew | 94dba21f7d5c3a1c6d935b62dd965c491a158e40.json | Centralize definition of `rack` in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it
gets defined and used quite a bit. This patch makes `rack` an official method
of the `Formula` class. | Library/Homebrew/formula.rb | @@ -170,6 +170,7 @@ def prefix
validate_variable :version
HOMEBREW_CELLAR+@name+@version
end
+ def rack; prefix.parent end
def bin; prefix+'bin' end
def doc; prefix+'share/doc'+name end | true |
Other | Homebrew | brew | f4c301a82765a740f0d880504f549abdbce64929.json | audit: improve GNU url check
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/audit.rb | @@ -222,8 +222,8 @@ def audit_formula_urls f
# Check GNU urls
urls.each do |p|
- if p =~ %r[ftp\.gnu\.org]
- problems << " * ftpmirror.gnu.org is preferred for GNU software."
+ if p =~ %r[^(https?|ftp)://(.+)/gnu/]
+ problems << " * \"ftpmirror.gnu.org\" is preferred for GNU software."
end
... | false |
Other | Homebrew | brew | 5790935b1267bbd8dac3fd2564b3dd9c46b5dae9.json | brew-unpack: Apply patches and use formula options
`brew-unpack` now runs `Formula.brew` and copies the stage directory to the
unpack location. This provides two improvements:
- Patches may be applied. The `patch` metho of the Formula class is
overloaded such that patches are only applied if the `--patch` optio... | Library/Contributions/examples/brew-unpack.rb | @@ -1,22 +1,64 @@
require 'formula'
+require 'stringio'
+module ScriptDataReader
+ # This module contains a method for extracting the contents of DATA from a
+ # Ruby file other than the script containing the currently executing
+ # function. Many thanks to Glenn Jackman's Stackoverflow answer which
+ # provide... | false |
Other | Homebrew | brew | b0f55665666642f64034c2451e7c5f0d362539a3.json | brew-options: add --installed flag
`brew options --installed` will print options for formulae that are
already installed.
Closes Homebrew/homebrew#7565.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Contributions/manpages/brew.1.md | @@ -184,14 +184,16 @@ For the full command list, see the COMMANDS section.
If no <formulae> are given, check all installed brews.
- * `options [--compact] [--all]` <formula>:
+ * `options [--compact] [--all] [--installed]` <formula>:
Display install options specific to <formula>.
If `--compact` i... | true |
Other | Homebrew | brew | b0f55665666642f64034c2451e7c5f0d362539a3.json | brew-options: add --installed flag
`brew options --installed` will print options for formulae that are
already installed.
Closes Homebrew/homebrew#7565.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/options.rb | @@ -3,6 +3,8 @@
def ff
if ARGV.include? "--all"
Formula.all
+ elsif ARGV.include? "--installed"
+ Formula.all.reject{ |f| not f.installed? }
else
ARGV.formulae
end | true |
Other | Homebrew | brew | b0f55665666642f64034c2451e7c5f0d362539a3.json | brew-options: add --installed flag
`brew options --installed` will print options for formulae that are
already installed.
Closes Homebrew/homebrew#7565.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | share/man/man1/brew.1 | @@ -206,7 +206,7 @@ Check the given \fIformulae\fR for missing dependencies\.
If no \fIformulae\fR are given, check all installed brews\.
.
.TP
-\fBoptions [\-\-compact] [\-\-all]\fR \fIformula\fR
+\fBoptions [\-\-compact] [\-\-all] [\-\-installed]\fR \fIformula\fR
Display install options specific to \fIformula\fR\... | true |
Other | Homebrew | brew | 536446b664eadb8574d4a0e057c1129c1257d9fe.json | Use HTTPS during `brew update`
Closes Homebrew/homebrew#7527.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/update.rb | @@ -12,7 +12,7 @@ def update
end
class RefreshBrew
- REPOSITORY_URL = "http://github.com/mxcl/homebrew.git"
+ REPOSITORY_URL = "https://github.com/mxcl/homebrew.git"
FORMULA_DIR = 'Library/Formula/'
EXAMPLE_DIR = 'Library/Contributions/examples/'
| false |
Other | Homebrew | brew | fa43ec5b5e4f1e39de1d115e326dd404e5f86d8b.json | Fix default cache dir in man page
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Contributions/manpages/brew.1.md | @@ -254,7 +254,7 @@ For the full command list, see the COMMANDS section.
If <formulae> are given, only list versions for the specified brews.
* `--cache`:
- Display Homebrew's download cache. *Default:* `~/Library/Cache/Homebrew`
+ Display Homebrew's download cache. *Default:* `~/Library/Caches/Homebrew... | true |
Other | Homebrew | brew | fa43ec5b5e4f1e39de1d115e326dd404e5f86d8b.json | Fix default cache dir in man page
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | share/man/man1/brew.1 | @@ -285,7 +285,7 @@ If \fIformulae\fR are given, only list versions for the specified brews\.
.
.TP
\fB\-\-cache\fR
-Display Homebrew\'s download cache\. \fIDefault:\fR \fB~/Library/Cache/Homebrew\fR
+Display Homebrew\'s download cache\. \fIDefault:\fR \fB~/Library/Caches/Homebrew\fR
.
.TP
\fB\-\-cache\fR \fIform... | true |
Other | Homebrew | brew | 9cdfd2797fb547473d460c7b4a0f88a6a7d174b5.json | Fix nil handling in `brew versions`
Fixes Homebrew/homebrew#7392. | Library/Homebrew/cmd/versions.rb | @@ -8,7 +8,7 @@ def self.old_versions f
yielded = []
f.rev_list.each do |sha|
version = f.version_for_sha sha
- unless yielded.include? version
+ unless yielded.include? version or version.nil?
yield version, sha
yielded << version
end
@@ -55,7 +55,10 ... | false |
Other | Homebrew | brew | 6283ca46b779ce139cd76ae7b1c978af71921e4c.json | Use proper issue URL | Library/Homebrew/utils.rb | @@ -403,7 +403,7 @@ def issues_for_formula name
yaml['issues'].each do |issue|
# don't include issues that just refer to the tool in their body
if issue['title'].include? name
- issues << 'https://github.com/mxcl/homebrew/issues/#issue/%s' % issue['number']
+ issues << issue['... | false |
Other | Homebrew | brew | 74ee65466cb321ba60db5ac6c1c568bcc9db56d3.json | Fix typo in `brew doctor`
Fixes Homebrew/homebrew#7383.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/doctor.rb | @@ -504,7 +504,7 @@ def check_for_config_scripts
def check_for_dyld_vars
if ENV['DYLD_LIBRARY_PATH']
puts <<-EOS.undent
- Setting DYLD_LIBARY_PATH can break dynamic linking.
+ Setting DYLD_LIBRARY_PATH can break dynamic linking.
You should probably unset it.
EOS | false |
Other | Homebrew | brew | 7aa45e81cbb446992ff2c7356737e9bb5a74d4db.json | Guess Xcode version if `xcodebuild` doesn't exist | Library/Homebrew/utils.rb | @@ -297,8 +297,30 @@ def xcode_prefix
def xcode_version
@xcode_version ||= begin
+ raise unless system "/usr/bin/which -s xcodebuild"
`xcodebuild -version 2>&1` =~ /Xcode (\d(\.\d)*)/
$1
+ rescue
+ # for people who don't have xcodebuild installed due to using
+ # some variety o... | false |
Other | Homebrew | brew | a0763dfc2c2e95a19c8e1789ad8f4d25710f3029.json | Remove Xcode dependence from ENV.rb
Fixes Homebrew/homebrew#7329.
Fixes Homebrew/homebrew#7269.
Fixes Homebrew/homebrew#7236.
Also quite a lot of tidy. This should all work fine.
I think we only started referring into xcode_prefix because LLVM used to not
be linked into /usr/bin. But for sure this is no longer true.... | Library/Homebrew/extend/ENV.rb | @@ -27,6 +27,10 @@ def setup_build_environment
when :gcc then self.gcc
end
+ # we must have a working compiler!
+ ENV['CC'] = '/usr/bin/cc' unless File.exist? ENV['CC']
+ ENV['CXX'] = '/usr/bin/c++' unless File.exist? ENV['CXX']
+
# In rare cases this may break your builds, as the tool for... | false |
Other | Homebrew | brew | c8d4af5611ee1c8a0927bdf9fe39e6c4af2c22d7.json | update: bring tests up-to-date
The tests for update have been neglected during the last few rounds of
changes, so fix them up.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/test/test_updater.rb | @@ -67,7 +67,10 @@ def test_init_homebrew
updater = RefreshBrewMock.new
updater.git_repo = false
updater.in_prefix_expect("git init")
- updater.in_prefix_expect("git pull #{RefreshBrewMock::REPOSITORY_URL} master")
+ updater.in_prefix_expect("git remote add origin #{RefreshBrewMock::REPOS... | false |
Other | Homebrew | brew | 883c58f75170c0c0354a5b8908b4e0cfaa29d948.json | Add the upgrade command to the man page
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Contributions/manpages/brew.1.md | @@ -233,6 +233,11 @@ For the full command list, see the COMMANDS section.
* `update`:
Fetch the newest version of Homebrew from GitHub using `git`(1).
+ * `upgrade` [<formulae>]:
+ Upgrade outdated brews.
+
+ If <formulae> are given, upgrade only the specified brews.
+
* `uses [--installed]` <formul... | true |
Other | Homebrew | brew | 883c58f75170c0c0354a5b8908b4e0cfaa29d948.json | Add the upgrade command to the man page
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | share/man/man1/brew.1 | @@ -259,6 +259,13 @@ Unsymlink \fIformula\fR from the Homebrew prefix\. This can be useful for tempor
Fetch the newest version of Homebrew from GitHub using \fBgit\fR(1)\.
.
.TP
+\fBupgrade\fR [\fIformulae\fR]
+Upgrade outdated brews\.
+.
+.IP
+If \fIformulae\fR are given, upgrade only the specified brews\.
+.
+.TP
... | true |
Other | Homebrew | brew | 80335bba7498e484997a6ccf4bbfccef2bb251f9.json | add brew doctor check for spaces in Xcode path | Library/Homebrew/cmd/doctor.rb | @@ -314,6 +314,18 @@ def check_homebrew_prefix
end
end
+def check_xcode_prefix
+ prefix = MacOS.xcode_prefix
+ return if prefix.nil?
+ if prefix.to_s.match(' ')
+ puts <<-EOS.undent
+ Xcode is installed to a folder with a space in the name.
+ This may cause some formulae, such as libiconv, to fail... | false |
Other | Homebrew | brew | d71e1d07863f3fcfb6e24a425c7ab07e54bad88d.json | Use GCC if we tested against the latest LLVM
Latest is hardcoded, so we'll have to update as new Xcode's come along. | Library/Homebrew/formula.rb | @@ -322,6 +322,14 @@ def std_cmake_parameters
def handle_llvm_failure llvm
case ENV.compiler
when :llvm, :clang
+ # version 2335 is the latest version as of Xcode 4.1, so it is the
+ # latest version we have tested against so we will switch to GCC and
+ # bump this integer when Xcode 4.2 is ... | false |
Other | Homebrew | brew | 1c28de653805994814937c5e1b1aa4932134c731.json | Use fullpaths to file and strip
Fixes Homebrew/homebrew#7353. | Library/Homebrew/cleaner.rb | @@ -30,7 +30,7 @@ def strip path, args=''
puts "strip #{path}" if ARGV.verbose?
path.chmod 0644 # so we can strip
unless path.stat.nlink > 1
- system "strip", *(args+path)
+ system "/usr/bin/strip", *(args+path)
else
path = path.to_s.gsub ' ', '\\ '
@@ -48,7 +48,7 @@ def strip pat... | false |
Other | Homebrew | brew | d5071d5dede84acca4d6545228bf4b12fdb1ce37.json | Allow brew install --force again | Library/Homebrew/cmd/install.rb | @@ -13,7 +13,7 @@ def install
if File.directory? HOMEBREW_REPOSITORY/"Library/LinkedKegs/#{f.name}"
raise "#{f} already installed\nTry: brew upgrade #{f}"
end
- end
+ end unless ARGV.force?
if Process.uid.zero? and not File.stat(HOMEBREW_BREW_FILE).uid.zero?
# note we only abo... | false |
Other | Homebrew | brew | 27fd2d7a7024b8afcf297e6e3aa3a930cad992c7.json | fix version parser for upcoming erlang bottle
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/extend/pathname.rb | @@ -174,6 +174,11 @@ def version
return match.first if /\d/.match $1
end
+ # erlang bottle style, booya
+ # e.g. erlang-R14B03-bottle.tar.gz
+ /-([^-]+)-bottle$/.match stem
+ return $1 if $1
+
nil
end
| false |
Other | Homebrew | brew | 6d6da0c0ef1392f217fe9a762179db7f9dcfac81.json | brew-pull: Allow pull request numbers as arguments
If an integer is passed to `brew-pull`, such as `brew pull 6600`, it will be
interpreted as a pull request number. This has the same effect as the more
verbose command line:
brew pull https://github.com/mxcl/homebrew/pull/6600 | Library/Contributions/examples/brew-pull.rb | @@ -9,20 +9,24 @@
end
if ARGV.empty?
- onoe 'This command requires at least one URL argument'
+ onoe 'This command requires at least one argument containing a URL or pull request number'
end
HOMEBREW_REPOSITORY.cd do
ARGV.each do|arg|
- # This regex should work, if it's too precise, feel free to fix it.... | false |
Other | Homebrew | brew | 4ba0e9ebaebecf7bff389d0d49e7d59b31eef237.json | Use curl with --insecure when on OS X < 10.6
The SSL certificates on this old version of OS X are outdated and who knows if Apple will fix them.
Fixes Homebrew/homebrew#6103. | Library/Homebrew/utils.rb | @@ -104,6 +104,9 @@ def quiet_system cmd, *args
end
def curl *args
+ # See https://github.com/mxcl/homebrew/issues/6103
+ args << "--insecure" if MacOS.version < 10.6
+
safe_system '/usr/bin/curl', HOMEBREW_CURL_ARGS, HOMEBREW_USER_AGENT, *args unless args.empty?
end
@@ -235,6 +238,9 @@ def nostdout
end
... | false |
Other | Homebrew | brew | e527c1c83ab9a6e2b17debe7017659922bf82fbb.json | Leopard: Eliminate moar `Array.count` from `brew upgrade` | Library/Homebrew/cmd/upgrade.rb | @@ -18,7 +18,7 @@ def upgrade
end
if outdated.length > 1
- oh1 "Upgrading #{outdated.count} outdated package#{outdated.count.plural_s}, with result:"
+ oh1 "Upgrading #{outdated.length} outdated package#{outdated.length.plural_s}, with result:"
puts outdated.map{ |_, name, version| "#{name}... | false |
Other | Homebrew | brew | 3299ffe5904bb5d0664c7fd77119556570dd7704.json | add arrandale to list of core2 CPUs | Library/Homebrew/extend/ENV.rb | @@ -54,7 +54,7 @@ def setup_build_environment
# http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/i386-and-x86_002d64-Options.html
if MACOS_VERSION >= 10.6
case Hardware.intel_family
- when :nehalem, :penryn, :core2
+ when :nehalem, :penryn, :core2, :arrandale
# the 64 bit compiler adds -m... | false |
Other | Homebrew | brew | 6ac0a285239d5fbd7943f070eac0e68847046ff8.json | Implement bottles again
Bottles now pour purely, without doing all the other unnecessary stuff that happened before the `brew upgrade` code shuffle.
Formula.pourable? removed since it was install-specific metadata and not related to the formula itself. Now all such logic is in the FormulaInstaller which is much clean... | Library/Homebrew/download_strategy.rb | @@ -183,8 +183,7 @@ def _fetch
class CurlBottleDownloadStrategy <CurlDownloadStrategy
def initialize url, name, version, specs
super
- HOMEBREW_CACHE_BOTTLES.mkpath
- @tarball_path=HOMEBREW_CACHE_BOTTLES+("#{name}-#{version}"+ext)
+ @tarball_path = HOMEBREW_CACHE/"#{name}-#{version}.bottle#{ext}"
e... | true |
Other | Homebrew | brew | 6ac0a285239d5fbd7943f070eac0e68847046ff8.json | Implement bottles again
Bottles now pour purely, without doing all the other unnecessary stuff that happened before the `brew upgrade` code shuffle.
Formula.pourable? removed since it was install-specific metadata and not related to the formula itself. Now all such logic is in the FormulaInstaller which is much clean... | Library/Homebrew/formula.rb | @@ -45,13 +45,6 @@ def detect_version
end
end
-class BottleSoftwareSpecification < SoftwareSpecification
- def download_strategy
- return CurlBottleDownloadStrategy if @using.nil?
- raise "Strategies cannot be used with bottles."
- end
-end
-
# Used to annotate formulae that duplicate OS X provided sof... | true |
Other | Homebrew | brew | 6ac0a285239d5fbd7943f070eac0e68847046ff8.json | Implement bottles again
Bottles now pour purely, without doing all the other unnecessary stuff that happened before the `brew upgrade` code shuffle.
Formula.pourable? removed since it was install-specific metadata and not related to the formula itself. Now all such logic is in the FormulaInstaller which is much clean... | Library/Homebrew/formula_installer.rb | @@ -14,7 +14,7 @@ def initialize ff
@f = ff
@show_header = true
@ignore_deps = ARGV.include? '--ignore-dependencies' || ARGV.interactive?
- @install_bottle = ff.pourable? #TODO better
+ @install_bottle = !ff.bottle.nil? && !ARGV.build_from_source?
end
def install
@@ -149,14 +149,26 @@ def f... | true |
Other | Homebrew | brew | b36dcc4ffde9a4f7419e9f876eac6ee77aaf3338.json | Improve compatibility for old formula
Allow compatibility to be disabled with --no-compat or HOMEBREW_NO_COMPAT environment variable. | Library/Homebrew/compat/brewkit.rb | @@ -0,0 +1,3 @@
+# here so that formula from the repo that are very old can still be installed
+
+require 'formula' | true |
Other | Homebrew | brew | b36dcc4ffde9a4f7419e9f876eac6ee77aaf3338.json | Improve compatibility for old formula
Allow compatibility to be disabled with --no-compat or HOMEBREW_NO_COMPAT environment variable. | Library/Homebrew/compat/compatibility.rb | @@ -76,5 +76,7 @@ def self.resolve_alias name
def fails_with_llvm msg=nil, data=nil
handle_llvm_failure FailsWithLLVM.new(msg, data)
end
+end
+class UnidentifiedFormula < Formula
end | true |
Other | Homebrew | brew | b36dcc4ffde9a4f7419e9f876eac6ee77aaf3338.json | Improve compatibility for old formula
Allow compatibility to be disabled with --no-compat or HOMEBREW_NO_COMPAT environment variable. | Library/Homebrew/global.rb | @@ -3,7 +3,6 @@
require 'extend/string'
require 'utils'
require 'exceptions'
-require 'compatibility'
ARGV.extend(HomebrewArgvExtension)
@@ -58,3 +57,8 @@ module Homebrew extend self
FORMULA_META_FILES = %w[README README.md ChangeLog COPYING LICENSE LICENCE COPYRIGHT AUTHORS]
PLEASE_REPORT_BUG = "#{Tty.whit... | true |
Other | Homebrew | brew | 733e280e61bc74258993fd19dedd8c0c3d1fd5be.json | fix doctor on 10.5 | Library/Homebrew/cmd/doctor.rb | @@ -353,7 +353,7 @@ def check_user_path
end
# Don't complain about sbin not being in the path if it doesn't exist
- if (HOMEBREW_PREFIX+'sbin').children.count > 0
+ if (HOMEBREW_PREFIX+'sbin').children.length > 0
unless seen_prefix_sbin
puts <<-EOS.undent
Some brews install binaries to sb... | false |
Other | Homebrew | brew | 7e2411eb4d339eec896bfdfed56b0b3cd7ced60e.json | Remove "boring" args from the pretty_args only
Dumb mistake. Sorry.
Closes Homebrew/homebrew#6722 | Library/Homebrew/formula.rb | @@ -465,8 +465,10 @@ def pourable?
# Pretty titles the command and buffers stdout/stderr
# Throws if there's an error
def system cmd, *args
- pretty_args = args
- args.delete "--disable-dependency-tracking" if cmd == "./configure"
+ # remove "boring" arguments so that the important ones are more likel... | false |
Other | Homebrew | brew | 924f92300fb6221bfd7bed20b0571db7a3b8f71b.json | Fix cache extension for github tarballs | Library/Homebrew/download_strategy.rb | @@ -113,7 +113,7 @@ def chdir
def ext
# GitHub uses odd URLs for zip files, so check for those
- rx=%r[http://(www\.)?github\.com/.*/(zip|tar)ball/]
+ rx=%r[https?://(www\.)?github\.com/.*/(zip|tar)ball/]
if rx.match @url
if $2 == 'zip'
'.zip' | false |
Other | Homebrew | brew | e3e7831b48b7dbcb435f5233adcff33f91aef3da.json | Add MacOS.lion? for MACOS_VERSION == 10.7
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/utils.rb | @@ -8,7 +8,7 @@ def red; underline 31; end
def yellow; underline 33 ; end
def reset; escape 0; end
def em; underline 39; end
-
+
private
def color n
escape "0;#{n}"
@@ -330,6 +330,10 @@ def snow_leopard?
10.6 <= MACOS_VERSION # Actually Snow Leopard or newer
end
+ def lion?
... | false |
Other | Homebrew | brew | 113eaf26e4a5477278ad72a4f80909a4a7c4106d.json | Fix typo in `brew doctor` command
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/cmd/doctor.rb | @@ -700,7 +700,7 @@ def check_for_other_frameworks
puts <<-EOS.undent
#{f} detected
- This will be picked up by Cmake's build system and likey cause the
+ This will be picked up by Cmake's build system and likely cause the
build to fail, trying to link to a 32-bit version of exp... | false |
Other | Homebrew | brew | fbff2ee8538aac440e913706b3430c5315e3d1d8.json | Retire check for GCC 4.0 under XCode 4.x
XCode 4.x only includes GCC 4.2. Therefore, having `brew doctor` report that
GCC 4.0 is missing only spreads fear, uncertainty and doubt over a situation
that is status quo.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/cmd/doctor.rb | @@ -194,17 +194,19 @@ def check_gcc_versions
EOS
end
- if gcc_40 == nil
- puts <<-EOS.undent
- We couldn't detect gcc 4.0.x. Some formulae require this compiler.
+ if MacOS.xcode_version < "4.0"
+ if gcc_40 == nil
+ puts <<-EOS.undent
+ We couldn't detect gcc 4.0.x. Some formulae requ... | false |
Other | Homebrew | brew | 870f36769ef747b4f8eb8d5444eb2739affb73a1.json | Fix install_name massaging for keg-only brews
Fixes Homebrew/homebrew#6065.
My pre-emptive fix that avoided calling Pathname.ensure_writable because I was not convinced it worked broke this function due to incorrect logic.
The lesson is, don’t write pre-emptive fixes. Wait until you've seen the bug first. All code h... | Library/Homebrew/keg_fix_install_names.rb | @@ -2,9 +2,6 @@ class Keg
def fix_install_names
dylibs.each do |dylib|
bad_install_names_for dylib do |id, bad_names|
- # avoid the chmod change if unecessary—I'm not convinced it reverses right
- next if bad_names.empty? and id.to_s == dylib.to_s
-
dylib.ensure_writable do
... | false |
Other | Homebrew | brew | f2e018d747a79056fb618c12d5ed922574e249fd.json | Return an array from options. | Library/Homebrew/formula.rb | @@ -211,7 +211,7 @@ def cached_download
def caveats; nil end
# any e.g. configure options for this package
- def options; end
+ def options; [] end
# patches are automatically applied after extracting the tarball
# return an array of strings, or if you need a patch level other than -p1 | false |
Other | Homebrew | brew | b7dd6f1f7eb803923b52e96ae663f05f6b4676ae.json | Remove redeclared method. | Library/Homebrew/extend/ARGV.rb | @@ -67,10 +67,6 @@ def build_from_source?
flag? '--build-from-source' or ENV['HOMEBREW_BUILD_FROM_SOURCE']
end
- def one?
- flag? "--1"
- end
-
def flag? flag
options_only.each do |arg|
return true if arg == flag | false |
Other | Homebrew | brew | b549ca837fce9fc6aa231c1424f2c6a2bf6875d3.json | Fix bad pathname indentation. | Library/Homebrew/extend/pathname.rb | @@ -164,9 +164,9 @@ def version
/_((\d+\.)+\d+[abc]?)[.]orig$/.match stem
return $1 if $1
- # brew bottle style e.g. qt-4.7.3-bottle.tar.gz
+ # brew bottle style e.g. qt-4.7.3-bottle.tar.gz
/-((\d+\.)*\d+)-bottle$/.match stem
- return $1 if $1
+ return $1 if $1
# eg. otp_src_R13B (this is ... | false |
Other | Homebrew | brew | 939a530ddc644c3b6a193c7b6af22f5c5f0fd22a.json | Make bottle path. | Library/Homebrew/download_strategy.rb | @@ -164,7 +164,8 @@ def _fetch
class CurlBottleDownloadStrategy <CurlDownloadStrategy
def initialize url, name, version, specs
super
- @tarball_path=HOMEBREW_CACHE+'Bottles'+("#{name}-#{version}"+ext)
+ HOMEBREW_CACHE_BOTTLES.mkpath
+ @tarball_path=HOMEBREW_CACHE_BOTTLES+("#{name}-#{version}"+ext)
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.