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 | 599c7fe7d073028d853337f02a957c9e9140d120.json | Add link shortcut ln to doc | share/man/man1/brew.1 | @@ -131,7 +131,7 @@ Opens the formula in $EDITOR\.
Opens all of Homebrew for editing in TextMate\.
.
.TP
-\fBlink\fR \fIformula\fR
+\fBln\fR, \fBlink\fR \fIformula\fR
Symlinks all of \fIformula\fR\'s installed files into the Homebrew prefix\. This is done automatically when you install formula\. It is useful for DI... | true |
Other | Homebrew | brew | 266b3265aa9047b505f038c0913a29db083d8449.json | Add remove --force | Library/Contributions/manpages/brew.1.md | @@ -99,9 +99,12 @@ didn't include with OS X.
* `home` <formula>:
Opens a browser to <formula>'s homepage.
- * `rm`, `remove` <formula>:
+ * `rm`, `remove [--force]` <formula>:
Uninstalls <formula>.
+ If `--force` is passed, and there are multiple versions of <formula>
+ installed, deletes all i... | true |
Other | Homebrew | brew | 266b3265aa9047b505f038c0913a29db083d8449.json | Add remove --force | bin/brew | @@ -188,15 +188,30 @@ begin
ARGV.kegs.each {|keg| puts "#{keg.unlink} links removed for #{keg}"}
when 'rm', 'uninstall', 'remove'
- begin
- ARGV.kegs.each do |keg|
- puts "Uninstalling #{keg}..."
- keg.unlink
- keg.uninstall
+ if ARGV.flag? "--force"
+ re... | true |
Other | Homebrew | brew | 266b3265aa9047b505f038c0913a29db083d8449.json | Add remove --force | share/man/man1/brew.1 | @@ -105,9 +105,12 @@ Opens a browser to Homebrew\'s own homepage\.
Opens a browser to \fIformula\fR\'s homepage\.
.
.TP
-\fBrm\fR, \fBremove\fR \fIformula\fR
+\fBrm\fR, \fBremove [\-\-force]\fR \fIformula\fR
Uninstalls \fIformula\fR\.
.
+.IP
+If \fB\-\-force\fR is passed, and there are multiple versions of \fIform... | true |
Other | Homebrew | brew | 560408d01b5b2bba26bc0926802246687e48911b.json | Use classes instead of strings for exceptions | Library/Homebrew/extend/ARGV.rb | @@ -2,6 +2,24 @@ class UsageError <RuntimeError; end
class FormulaUnspecifiedError <UsageError; end
class KegUnspecifiedError <UsageError; end
+class MultipleVersionsInstalledError <RuntimeError
+ attr :name
+
+ def initialize name
+ @name = name
+ super "#{name} has multiple installed versions"
+ end
+end... | false |
Other | Homebrew | brew | d501b256e5a81176b4efe0b3f008ddf090b29b39.json | add test to completion | Library/Contributions/brew_bash_completion.sh | @@ -35,7 +35,7 @@ _brew_to_completion()
return
;;
# Commands that take an existing brew
- abv|cleanup|link|list|ln|ls|remove|rm|uninstall|unlink)
+ abv|cleanup|link|list|ln|ls|remove|rm|test|uninstall|unlink)
COMPREPLY=( $(compgen -W "$(\ls $(brew --cellar))" -- ${cur}) )
... | false |
Other | Homebrew | brew | 80ae0e6d95aa67be0648af9318fad0d849898dc9.json | add install check for top-level info | Library/Homebrew/install.rb | @@ -157,6 +157,13 @@ def install f
puts 'This can often be fixed by passing "--mandir=#{man}" to configure.'
end
+ # Check for info pages that aren't in share/info
+ if (f.prefix+'info').exist?
+ opoo 'A top-level "info" folder was found.'
+ puts "Homebrew suggests that info pages live und... | false |
Other | Homebrew | brew | b9dc3c6527beab872578afad89d1dacc7020a6ab.json | add Xcode version to brew --config | Library/Homebrew/brew.h.rb | @@ -579,6 +579,11 @@ def llvm_build
end
end
+def xcode_version
+ `xcodebuild -version 2>&1` =~ /Xcode (\d(\.\d)*)/
+ return $1 ? $1 : nil
+end
+
def _compiler_recommendation build, recommended
message = (!build.nil? && build < recommended) ? "(#{recommended} or newer recommended)" : ""
return build, mess... | true |
Other | Homebrew | brew | b9dc3c6527beab872578afad89d1dacc7020a6ab.json | add Xcode version to brew --config | bin/brew | @@ -49,6 +49,7 @@ def dump_config
llvm, llvm_msg = _compiler_recommendation llvm_build, RECOMMENDED_LLVM
gcc_42, gcc_42_msg = _compiler_recommendation gcc_42_build, RECOMMENDED_GCC_42
gcc_40, gcc_40_msg = _compiler_recommendation gcc_40_build, RECOMMENDED_GCC_40
+ xcode = xcode_version || "?"
puts ... | true |
Other | Homebrew | brew | 8eaa812711ef73597e2287222393b5630dc6a7d8.json | improve std_cmake_parameters comments | Library/Homebrew/formula.rb | @@ -208,12 +208,12 @@ def brew
end
end
- # we don't have a std_autotools variant because autotools is a lot less
- # consistent and the standard parameters are more memorable
- # really Homebrew should determine what works inside brew() then
- # we could add --disable-dependency-tracking when it will work... | false |
Other | Homebrew | brew | bb01afce4c0804b3603602496292077d3d92f0a4.json | Move resolve_alias from ARGV to Formula
Also, call this function from a few places where the code was duplicated. | Library/Homebrew/brew.h.rb | @@ -39,9 +39,9 @@ def __make url, name
raise "#{path} already exists" if path.exist?
if Formula.aliases.include? name and not ARGV.force?
- realname = HOMEBREW_REPOSITORY.join("Library/Aliases/#{name}").realpath.basename('.rb')
+ realname = Formula.resolve_alias(name)
raise <<-EOS.undent
- T... | true |
Other | Homebrew | brew | bb01afce4c0804b3603602496292077d3d92f0a4.json | Move resolve_alias from ARGV to Formula
Also, call this function from a few places where the code was duplicated. | Library/Homebrew/extend/ARGV.rb | @@ -13,15 +13,16 @@ def options_only
def formulae
require 'formula'
- @formulae ||= downcased_unique_named.map{ |name| Formula.factory(resolve_alias(name)) }
+ @formulae ||= downcased_unique_named.map{ |name| Formula.factory(Formula.resolve_alias(name)) }
raise FormulaUnspecifiedError if @formulae.... | true |
Other | Homebrew | brew | bb01afce4c0804b3603602496292077d3d92f0a4.json | Move resolve_alias from ARGV to Formula
Also, call this function from a few places where the code was duplicated. | Library/Homebrew/formula.rb | @@ -266,6 +266,15 @@ def self.aliases
Dir["#{HOMEBREW_REPOSITORY}/Library/Aliases/*"].map{ |f| File.basename f }.sort
end
+ def self.resolve_alias name
+ aka = HOMEBREW_REPOSITORY+"Library/Aliases/#{name}"
+ if aka.file?
+ aka.realpath.basename('.rb').to_s
+ else
+ name
+ end
+ end
+
... | true |
Other | Homebrew | brew | 18f9969b65d3a9a39ae721c1d967d596b7aef898.json | Add formula name to LLVM warning | Library/Homebrew/formula.rb | @@ -217,6 +217,27 @@ def std_cmake_parameters
"-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -Wno-dev"
end
+ def fails_with_llvm msg="", data=nil
+ return unless (ENV['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm')
+
+ build = data.delete :build rescue nil
+ msg = "(No specific reas... | false |
Other | Homebrew | brew | e757d7c9563fb30e0d5b06ffeb6e42e3160d7e0a.json | add libpcap to list | Library/Homebrew/brew.h.rb | @@ -130,21 +130,21 @@ def make url
force_text = "If you really want to make this formula use --force."
case name.downcase
- when /vim/, /screen/
+ when 'vim', 'screen'
raise <<-EOS
#{name} is blacklisted for creation
Apple distributes this program with OS X.
#{force_text}
EOS
- when /libarchiv... | false |
Other | Homebrew | brew | 8a60d852b3ad4ba0dc6c59dc9a5d956eed300e1d.json | Check git repos for validity before updating.
If you `brew install erlang` and then control-C during the git clone,
you can leave your cloned repo in an invalid state.
This change does a "git status" on the clone if it exists, and nukes
it if the status is invalid (forcing a clean clone.) | Library/Homebrew/download_strategy.rb | @@ -257,6 +257,17 @@ def fetch
unless system "/usr/bin/which git"
ohai "Cloning #{@url}"
+
+ if @clone.exist?
+ Dir.chdir(@clone) do
+ # Check for interupted clone from a previous install
+ unless system 'git', 'status', '-s'
+ ohai "Removing invalid .git repo from cache... | false |
Other | Homebrew | brew | e750242b73d3dba199fd7491972854ca6b48ea38.json | Add another file check to check_for_macgpg2 | Library/Homebrew/brew_doctor.rb | @@ -31,7 +31,8 @@ def is_prefix? prefix, longer_string
# Installing MacGPG2 interferes with Homebrew in a big way
# http://sourceforge.net/projects/macgpg2/files/
def check_for_macgpg2
- if File.exist? "/Applications/start-gpg-agent.app"
+ if File.exist? "/Applications/start-gpg-agent.app" or
+ File.exist? "/L... | false |
Other | Homebrew | brew | d518fca81c7ecebcb56feaabdb142dfd322b429c.json | Fetch new tags for git repos when cached. | Library/Homebrew/download_strategy.rb | @@ -257,7 +257,11 @@ def fetch
safe_system 'git', 'clone', @url, @clone # indeed, leave it verbose
else
puts "Updating #{@clone}"
- Dir.chdir(@clone) { quiet_safe_system 'git', 'fetch', @url }
+ Dir.chdir(@clone) do
+ quiet_safe_system 'git', 'fetch', @url
+ # If we're going t... | false |
Other | Homebrew | brew | 14353b5491f64852da15af9cf3a1623a7dcda4b6.json | brew-audit: add check for git and fix warnings | Library/Contributions/examples/brew-audit.rb | @@ -112,6 +112,15 @@ def audit_formula_instance f
problems << " * Dep #{d} is an alias; switch to the real name."
end
+ # Check for things we don't like to depend on.
+ # We allow non-Homebrew installs whenenever possible.
+ f.deps.each do |d|
+ case d
+ when "git"
+ problems << " * Don't use Gi... | false |
Other | Homebrew | brew | 53cf7e843b05a1dc1247312c9358023234bb9411.json | Add ENV.ldflags and use. | Library/Homebrew/extend/ENV.rb | @@ -181,6 +181,7 @@ def cxx; self['CXX'] or "g++"; end
# CFLAGS are read quite a bit
def cflags; ENV['CFLAGS']; end
+ def ldflags; ENV['LDFLAGS']; end
def m64
append_to_cflags '-m64' | false |
Other | Homebrew | brew | fc7a0be039c33420175f44661e8ea56604c47c64.json | Add ruby target to --config | bin/brew | @@ -48,6 +48,8 @@ def dump_config
sha = `cd #{HOMEBREW_REPOSITORY} && git rev-parse --verify HEAD 2> /dev/null`.chomp
kernel_arch = `uname -m`.chomp
+ system_ruby = Pathname.new("/usr/bin/ruby")
+
puts <<-EOS
HOMEBREW_VERSION: #{HOMEBREW_VERSION}
HEAD: #{sha}
@@ -59,6 +61,7 @@ Hardware: #{cores}-core #{bi... | false |
Other | Homebrew | brew | 07f4efa8784ccbef872f7ca3c7b0caf89bb2ff96.json | Fix typo in update.rb
Signed-off-by: David Höppner <0xffea@gmail.com> | Library/Homebrew/update.rb | @@ -1,8 +1,8 @@
class RefreshBrew
- RESPOSITORY_URL = 'http://github.com/mxcl/homebrew.git'
+ REPOSITORY_URL = 'http://github.com/mxcl/homebrew.git'
INIT_COMMAND = "git init"
CHECKOUT_COMMAND = 'git checkout -q master'
- UPDATE_COMMAND = "git pull #{RESPOSITORY_URL} master"
+ UPDATE_COMMAND = "git... | false |
Other | Homebrew | brew | 4f56674c7201cf9da33c34a98bf16efb45491832.json | Remove HOMEBREW_CACHE from "brew --config"
HOMEBREW_CACHE isn't really helpful in diagnosing problems, and some
people don't like their username / home folder going into bug reports
on the web, so let's take it out. | bin/brew | @@ -53,7 +53,6 @@ HOMEBREW_VERSION: #{HOMEBREW_VERSION}
HEAD: #{sha}
HOMEBREW_PREFIX: #{HOMEBREW_PREFIX}
HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}
-HOMEBREW_CACHE: #{HOMEBREW_CACHE}
HOMEBREW_REPOSITORY: #{HOMEBREW_REPOSITORY}
HOMEBREW_LIBRARY_PATH: #{HOMEBREW_LIBRARY_PATH}
Hardware: #{cores}-core #{bits}-bit #{Hardware... | false |
Other | Homebrew | brew | 492748bc0b2776ff4f14017fd482961feadd3034.json | Use 1.9 compat syntax. Fixes Homebrew/homebrew#2192 | Library/Homebrew/formula.rb | @@ -15,14 +15,14 @@ class SoftwareSpecification
attr_reader :url, :specs, :using
VCS_SYMBOLS = {
- :bzr, BazaarDownloadStrategy,
- :curl, CurlDownloadStrategy,
- :cvs, CVSDownloadStrategy,
- :git, GitDownloadStrategy,
- :hg, MercurialDownloadStrategy,
- :nounzip, NoUnzipCur... | false |
Other | Homebrew | brew | 74a081e08df276154ef6722c25da16b788f978cf.json | Make errors during link step more visible. | Library/Homebrew/install.rb | @@ -162,7 +162,11 @@ def install f
onoe "The linking step did not complete successfully"
puts "The package built, but is not symlinked into #{HOMEBREW_PREFIX}"
puts "You can try again using `brew link #{f.name}'"
- ohai e, e.backtrace if ARGV.debug?
+ if ARGV.debug?
+ ohai e, e.bac... | false |
Other | Homebrew | brew | 157425cc10e51c845c6a952a6b25ad261e0c0587.json | Move method back to Pathname. | Library/Homebrew/extend/pathname.rb | @@ -208,6 +208,21 @@ def starts_with? prefix
prefix = prefix.to_s
self.to_s[0, prefix.length] == prefix
end
+
+ def make_relative_symlink src
+ self.dirname.mkpath
+ Dir.chdir self.dirname do
+ # TODO use Ruby function so we get exceptions
+ # NOTE Ruby functions may work, but I had a lot ... | false |
Other | Homebrew | brew | 3d20387863dea5bcede84469c37149a3c53007fe.json | Fix typo in manpage. | Library/Contributions/manpages/brew.1.md | @@ -78,7 +78,7 @@ didn't include with OS X.
Opens a browser to the GitHub History page for formula <formula>.
* `info --all`:
- Summarises all installed packages; this is inteded to be used by
+ Summarises all installed packages; this is intended to be used by
higher-level tools.
* `info` <URL... | true |
Other | Homebrew | brew | 3d20387863dea5bcede84469c37149a3c53007fe.json | Fix typo in manpage. | share/man/man1/brew.1 | @@ -84,7 +84,7 @@ Opens a browser to the GitHub History page for formula \fIformula\fR\.
.
.TP
\fBinfo \-\-all\fR
-Summarises all installed packages; this is inteded to be used by higher\-level tools\.
+Summarises all installed packages; this is intended to be used by higher\-level tools\.
.
.TP
\fBinfo\fR \fIURL... | true |
Other | Homebrew | brew | 80c090aaaeefb0d573ec2c633795eba5b2a4a900.json | Remove redundent line and reword comments slightly. | Library/Homebrew/extend/ENV.rb | @@ -23,19 +23,18 @@ def setup_build_environment
xcode_path = "/Developer" if xcode_path.to_s.empty?
ENV['CC'] = "#{xcode_path}/usr/bin/llvm-gcc"
ENV['CXX'] = "#{xcode_path}/usr/bin/llvm-g++"
- ENV['LD'] = ENV['CC']
cflags = ['-O4'] # link time optimisation baby!
else
- # if we... | false |
Other | Homebrew | brew | 2a80303960af9ea1c8ac7b3313f9ff7f5e58fb62.json | Add shortcut 'brew dr'. | bin/brew | @@ -282,7 +282,7 @@ begin
end
end
- when 'doctor'
+ when 'doctor', 'dr'
require 'brew_doctor'
brew_doctor
| false |
Other | Homebrew | brew | 013fe4bf38d0ae950fe6a14e8b70ee74370fc3eb.json | Move Pathname.starts_with? into Pathname | Library/Contributions/examples/brew-which.rb | @@ -3,19 +3,12 @@
REAL_CELLAR = HOMEBREW_CELLAR.realpath
class String
- def starts_with?(prefix)
+ def starts_with? prefix
prefix = prefix.to_s
self[0, prefix.length] == prefix
end
end
-class Pathname
- def starts_with?(prefix)
- prefix = prefix.to_s
- self.to_s[0, prefix.length] == prefix
... | true |
Other | Homebrew | brew | 013fe4bf38d0ae950fe6a14e8b70ee74370fc3eb.json | Move Pathname.starts_with? into Pathname | Library/Homebrew/extend/pathname.rb | @@ -203,6 +203,11 @@ def resolved_path
def resolved_path_exists?
(dirname+readlink).exist?
end
+
+ def starts_with? prefix
+ prefix = prefix.to_s
+ self.to_s[0, prefix.length] == prefix
+ end
end
# sets $n and $d so you can observe creation of stuff | true |
Other | Homebrew | brew | eca31da253471f2f8fc2893e35281aa0c7a357ed.json | Getting rid of pesky 'warning: parenthesize argument(s) for future version'
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/formula.rb | @@ -39,7 +39,7 @@ def initialize url, specs=nil
# Returns a suitable DownloadStrategy class that can be
# used to retreive this software package.
def download_strategy
- return detect_download_strategy @url if @using.nil?
+ return detect_download_strategy(@url) if @using.nil?
# If a class is passe... | false |
Other | Homebrew | brew | e2f0e1a26f31f494ec6b972d0e525b3cf9a6d3c9.json | Resolve aliases in 'brew edit'. | Library/Homebrew/extend/ARGV.rb | @@ -102,12 +102,6 @@ def usage; <<-EOS.undent
EOS
end
- private
-
- def downcased_unique_named
- @downcased_unique_named ||= named.map(&:downcase).uniq
- end
-
def resolve_alias name
aka = HOMEBREW_REPOSITORY+"Library/Aliases/#{name}"
if aka.file?
@@ -116,4 +110,10 @@ def resolve_alias name... | true |
Other | Homebrew | brew | e2f0e1a26f31f494ec6b972d0e525b3cf9a6d3c9.json | Resolve aliases in 'brew edit'. | bin/brew | @@ -152,9 +152,10 @@ begin
"#{HOMEBREW_REPOSITORY}/bin/brew"<<
"#{HOMEBREW_REPOSITORY}/README.md"
else
- # we don't use ARGV.formulae as that will throw if the file doesn't parse
+ # Don't use ARGV.formulae as that will throw if the file doesn't... | true |
Other | Homebrew | brew | 612af6b4fe763346614316f8d7e3b5b1bc69cfda.json | Make "lib/node" a real folder.
Treat the "lib/node" folder like Python, Perl, etc.
Create it as a real folder in HOMEBREW_PREFIX, so that
package managers (npm) have a stable place to drop libs. | Library/Homebrew/keg.rb | @@ -57,6 +57,7 @@ def link
# lib/language folders also get explicitly created
when 'ghc' then :mkpath
when 'lua' then :mkpath
+ when 'node' then :mkpath
when 'ocaml' then :mkpath
when /^perl5/ then :mkpath
when 'php' then :mkpath | false |
Other | Homebrew | brew | fb70374daca84afae2b29471b365f2c7a5689399.json | Move ext command docs down to ext commands section | Library/Contributions/manpages/brew.1.md | @@ -150,13 +150,6 @@ didn't include with OS X.
Using Git, fetches the newest version of Homebrew from the GitHub
repository.
- * `fetch` <formula>:
- Downloads the tarball or checks out from VCS for the given <formula>. For
- tarballs, also prints MD5 and SHA1 checksums.
-
- * `audit`:
- Checks a... | true |
Other | Homebrew | brew | fb70374daca84afae2b29471b365f2c7a5689399.json | Move ext command docs down to ext commands section | share/man/man1/brew.1 | @@ -164,6 +164,12 @@ For all installed or specific formulae, remove any older versions from the cella
\fBupdate\fR
Using Git, fetches the newest version of Homebrew from the GitHub repository\.
.
+.SH "EXTERNAL COMMANDS"
+Homebrew allows external commands to be defined by putting a +x file named \fBbrew\-<cmdname>\f... | true |
Other | Homebrew | brew | b69d6dc4cf4c3caaa993cb0d2f4f87ca65d1c6e6.json | Add sha1 to brew fetch and document command | Library/Contributions/examples/brew-fetch.rb | @@ -11,7 +11,7 @@
the_tarball = f.downloader.fetch
if the_tarball.kind_of? Pathname
- md5 = the_tarball.md5
- puts "MD5 is #{md5}"
+ puts "MD5: #{the_tarball.md5}"
+ puts "SHA1: #{the_tarball.sha1}"
end
end | true |
Other | Homebrew | brew | b69d6dc4cf4c3caaa993cb0d2f4f87ca65d1c6e6.json | Add sha1 to brew fetch and document command | Library/Contributions/manpages/brew.1.md | @@ -28,7 +28,8 @@ didn't include with OS X.
* `--cache` [<formula>]:
Displays the path Homebrew uses to cache downloads.
- If <formula> is given, display the file or folder used to cache that specific package.
+ If <formula> is given, display the file or folder used to cache that
+ specific package.
... | true |
Other | Homebrew | brew | b69d6dc4cf4c3caaa993cb0d2f4f87ca65d1c6e6.json | Add sha1 to brew fetch and document command | share/man/man1/brew.1 | @@ -161,6 +161,10 @@ For all installed or specific formulae, remove any older versions from the cella
\fBupdate\fR
Using Git, fetches the newest version of Homebrew from the GitHub repository\.
.
+.TP
+\fBfetch\fR \fIformula\fR
+Downloads the tarball or checks out from VCS for the given \fIformula\fR\. For tarballs,... | true |
Other | Homebrew | brew | bdf245ff98e2c3498528d3f5f9ebb128fad5d700.json | Add keg-only to DSL | Library/Homebrew/formula.rb | @@ -163,7 +163,9 @@ def patches; end
# rarely, you don't want your library symlinked into the main prefix
# see gettext.rb for an example
- def keg_only?; false end
+ def keg_only?
+ self.class.keg_only_reason || false
+ end
# sometimes the clean process breaks things
# skip cleaning paths in a fo... | false |
Other | Homebrew | brew | a56466a4d34b14214f829717d98115574c81913d.json | Use ERB to generate formula template. | Library/Homebrew/brew.h.rb | @@ -33,8 +33,9 @@ def check_for_blacklisted_formula names
def __make url, name
require 'formula'
require 'digest'
+ require 'erb'
- path = Formula.path name
+ path = Formula.path(name)
raise "#{path} already exists" if path.exist?
if Formula.aliases.include? name and not ARGV.force?
@@ -46,8 +47,16 ... | false |
Other | Homebrew | brew | dad4bbb9e32799b1c19d4d431aa90fe4b2c16ad0.json | Use new alias system with `brew search`
Also don't show any aliases if you just type `brew search` as there is so
little context, it just looks messy. | Library/Homebrew/brew.h.rb | @@ -410,18 +410,24 @@ def outdated_brews
def search_brews text
require "formula"
- formulae = Formulary.names with_aliases=true
- if text =~ /^\/(.*)\/$/
- results = formulae.grep(Regexp.new($1))
+
+ return Formula.names if text.to_s.empty?
+
+ rx = if text =~ %r{^/(.*)/$}
+ Regexp.new($1)
else
- ... | false |
Other | Homebrew | brew | 1c3f0e43dee3958c4ddbfdf0726817198725eeca.json | add URLs to brew info | bin/brew | @@ -223,7 +223,7 @@ begin
else
puts `ls #{HOMEBREW_CELLAR} | wc -l`.strip+" kegs, "+HOMEBREW_CELLAR.abv
end
- elsif ARGV[0][0..6] == 'http://'
+ elsif ARGV[0][0..6] == 'http://' or ARGV[0][0..7] == 'https://' or ARGV[0][0..5] == 'ftp://'
path = Pathname.new(ARGV.shift)
... | false |
Other | Homebrew | brew | 28504229aa7a1389fa60bbfb9b987344d608e925.json | Resolve aliases in ARGV extension.
* This allows most brew commands to automatically accept aliases. | Library/Homebrew/extend/ARGV.rb | @@ -6,21 +6,24 @@ module HomebrewArgvExtension
def named
@named ||= reject{|arg| arg[0..0] == '-'}
end
+
def options
select {|arg| arg[0..0] == '-'}
end
+
def formulae
require 'formula'
- @formulae ||= downcased_unique_named.collect {|name| Formula.factory name}
+ @formulae ||= downc... | false |
Other | Homebrew | brew | 7ff5de2ad816e54eef5baa839365fd465088ae44.json | Skip broken formulae | Library/Homebrew/formula.rb | @@ -188,7 +188,15 @@ def self.names
# an array of all Formula, instantiated
def self.all
- names.map{ |fn| Formula.factory(fn) }
+ all = []
+ names.each do |n|
+ begin
+ all << Formula.factory(n)
+ rescue
+ # Don't let one broken formula break commands.
+ end
+ end
+ ... | false |
Other | Homebrew | brew | 0321acf9bee02903ccb0db7d8b2ff39da26100bf.json | Fix regex location | Library/Homebrew/brew_doctor.rb | @@ -318,7 +318,7 @@ def check_for_config_scripts
paths = ENV['PATH'].split(':').collect{|p| File.expand_path p}
paths.each do |p|
next if ['/usr/bin', '/usr/sbin', '/usr/X11/bin', "#{HOMEBREW_PREFIX}/bin", "#{HOMEBREW_PREFIX}/sbin"].include? p
- next if %r[^(#{real_cellar.to_s}|#{HOMEBREW_CELLAR.to_s})] =... | false |
Other | Homebrew | brew | bd51ae33431d8aa2b30d150da775097ccd603c9c.json | Add depends_on spacing checks to brew_audit | Library/Contributions/examples/brew-audit.rb | @@ -26,6 +26,11 @@ def ff
problems << " * Remove 'use_mirror' from url."
end
+ # 2 (or more, if in an if block) spaces before depends_on, please
+ if /^\ ?depends_on/ =~ text
+ problems << " * Check indentation of 'depends_on'."
+ end
+
if /(#\{\w+\s*\+\s*['"][^}]+\})/ =~ text
problems << " * Tr... | false |
Other | Homebrew | brew | 1f1da9266ccfac3831767e0a1d1fe3c1b797ac68.json | Fix message and undent for external deps | Library/Homebrew/formula_installer.rb | @@ -19,35 +19,35 @@ def self.expand_deps f
end
deps
end
-
+
def pyerr dep
brew_pip = ' brew install pip &&' unless Formula.factory('pip').installed?
- <<-EOS.dedent
+ <<-EOS.undent
Unsatisfied dependency, #{dep}
- Homebrew does not provide formula for Python dependencies, pip does:
... | false |
Other | Homebrew | brew | 826ab8be71a7e3d5acbfed0f3ea4a6cd3498f6eb.json | Use build_head here too. | Library/Homebrew/formula.rb | @@ -78,7 +78,7 @@ def initialize name='__UNKNOWN__'
set_instance_variable 'head'
set_instance_variable 'specs'
- if @head and (not @url or ARGV.flag? '--HEAD')
+ if @head and (not @url or ARGV.build_head?)
@url=@head
@version='HEAD'
end | false |
Other | Homebrew | brew | 21c37fbac6b94afd44da4ce0b0fc1599b8165fde.json | Add ARGV.build_head? and use it.
This allows both "--HEAD" and "-H" to be used consistently, which was the
intention in the first place. | Library/Homebrew/extend/ARGV.rb | @@ -51,6 +51,9 @@ def quieter?
def interactive?
flag? '--interactive'
end
+ def build_head?
+ flag? '--HEAD'
+ end
def flag? flag
options.each do |arg| | false |
Other | Homebrew | brew | 2bac03ef92d747e8a8d254976d111f3409766e3d.json | Use regex in brew-audit and add path concat test. | Library/Contributions/examples/brew-audit.rb | @@ -14,18 +14,25 @@ def ff
end
ff.each do |f|
+ text = ""
+ File.open(f.path, "r") { |afile| text = afile.read }
+
problems = []
- unless `grep "# depends_on 'cmake'" "#{f.path}"`.strip.empty?
- problems << " * Commented cmake support still in #{f.name}"
+ if /# depends_on 'cmake'/ =~ text
+ problems <... | false |
Other | Homebrew | brew | 0cc253964b33fca67072173e8a81e4edfb31963d.json | Remove un-needed 'unless' in brew update | bin/brew | @@ -182,7 +182,7 @@ begin
ohai "The following formulae were updated:"
puts_columns updater.updated_formulae
else
- puts "No formulae were updated." unless updater.pending_formulae_changes?
+ puts "No formulae were updated."
end
end
| false |
Other | Homebrew | brew | 41e8245534854bb273dedc49aeda4af7b60c1aa4.json | Clarify cellar comment | Library/Homebrew/global.rb | @@ -23,9 +23,8 @@
HOMEBREW_PREFIX = Pathname.new(HOMEBREW_BREW_FILE).dirname.parent # Where we link under
HOMEBREW_REPOSITORY = Pathname.new(HOMEBREW_BREW_FILE).realpath.dirname.parent # Where .git is found
-# Where should be build to?
-# If /usr/local/Cellar exists, as a symlink or real folder, use that.
-# Other... | false |
Other | Homebrew | brew | 4ae8029557cc3eba6dc99c1183a02c1a60b002d2.json | Update version tests | Library/Homebrew/test/test_versions.rb | @@ -25,21 +25,21 @@ def test_pathname_version
d.mkpath
assert_equal '0.1.9', d.version
end
-
+
def test_no_version
assert_nil Pathname.new("http://example.com/blah.tar").version
assert_nil Pathname.new("arse").version
end
-
+
def test_bad_version
assert_raises(RuntimeError) {f=T... | false |
Other | Homebrew | brew | 40c8af111f69d3d4668d113697c697e57b902ec0.json | Move data into updater class | Library/Homebrew/update.rb | @@ -11,10 +11,11 @@ class RefreshBrew
UPDATED_FORMULA = %r{^\s+#{formula_regexp}\s}
DELETED_FORMULA = %r{^\s+delete mode \d+ #{formula_regexp}$}
- attr_reader :added_formulae, :updated_formulae, :deleted_formulae
+ attr_reader :added_formulae, :updated_formulae, :deleted_formulae, :initial_revision
... | true |
Other | Homebrew | brew | 40c8af111f69d3d4668d113697c697e57b902ec0.json | Move data into updater class | bin/brew | @@ -163,11 +163,10 @@ begin
require 'update'
updater = RefreshBrew.new
- old_revision = updater.current_revision
unless updater.update_from_masterbrew!
puts "Already up-to-date."
else
- puts "Updated Homebrew from #{old_revision[0,8]} to #{updater.current_revision[0,8]}."
+ put... | true |
Other | Homebrew | brew | ecb5ce103e8436bbafc4ea646bda8ea4446ffee4.json | Remove $PATH from --config and build dumps.
While it is useful to be able to see the user's path in bug reports, it is
perhaps slightly too intrusive to post this without the user's permission.
A path can have usernames or other project sensitive information, and several
Homebrew users were editing their bug reports ... | Library/Homebrew/utils.rb | @@ -218,7 +218,7 @@ def nostdout
def dump_build_env env
puts "\"--use-llvm\" was specified" if ARGV.include? '--use-llvm'
- %w[CC CXX LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS MACOSX_DEPLOYMENT_TARGET MAKEFLAGS PATH PKG_CONFIG_PATH HOMEBREW_USE_LLVM].each do |k|
+ %w[CC CXX LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS MACOSX_... | true |
Other | Homebrew | brew | ecb5ce103e8436bbafc4ea646bda8ea4446ffee4.json | Remove $PATH from --config and build dumps.
While it is useful to be able to see the user's path in bug reports, it is
perhaps slightly too intrusive to post this without the user's permission.
A path can have usernames or other project sensitive information, and several
Homebrew users were editing their bug reports ... | bin/brew | @@ -65,7 +65,6 @@ GCC-4.2: #{gcc_42 ? "build #{gcc_42}" : "N/A"} (#{RECOMMENDED_GCC_42} or newer r
LLVM: #{llvm ? "build #{llvm}" : "N/A" } #{llvm ? "(#{RECOMMENDED_LLVM} or newer recommended)" : "" }
MacPorts or Fink? #{macports_or_fink_installed?}
X11 installed? #{x11_installed?}
-PATH: #{ENV['PATH']}
EOS
end
| true |
Other | Homebrew | brew | 98f550e946d0c77d372fa1fdb3bd428fbcaa9561.json | Use http URL for "brew update".
This allows users behind firewalls to pull down updates to Homebrew itself.
Fixes Homebrew/homebrew#1086 | Library/Homebrew/update.rb | @@ -1,5 +1,5 @@
class RefreshBrew
- RESPOSITORY_URL = 'git://github.com/mxcl/homebrew.git'
+ RESPOSITORY_URL = 'http://github.com/mxcl/homebrew.git'
INIT_COMMAND = "git init"
CHECKOUT_COMMAND = 'git checkout -q master'
UPDATE_COMMAND = "git pull #{RESPOSITORY_URL} master" | false |
Other | Homebrew | brew | 4490b739d5e71912bdd99daa5ab02f9c0b3433e8.json | Add flat-.pkg support to CurlDownloadStrategy | Library/Homebrew/download_strategy.rb | @@ -68,6 +68,9 @@ def fetch
def stage
if @tarball_path.extname == '.jar'
magic_bytes = nil
+ elsif @tarball_path.extname == '.pkg'
+ # Use more than 4 characters to not clash with magicbytes
+ magic_bytes = "____pkg"
else
# get the first four bytes
File.open(@tarball_path)... | false |
Other | Homebrew | brew | 551e4efbd6f076dabb0905db7ac990eb6ecaf722.json | Fix typo in github_info
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/brew.h.rb | @@ -172,7 +172,7 @@ def github_info name
end
user = 'mxcl' if user.empty?
- branch = 'master' if user.empty?
+ branch = 'master' if branch.empty?
return "http://github.com/#{user}/homebrew/commits/#{branch}/Library/Formula/#{formula_name}"
end | false |
Other | Homebrew | brew | 501fb844abd73d1b75dae7709a20c8d1c07f34fb.json | Use cp, not mv, to keep download in cache. | Library/Homebrew/download_strategy.rb | @@ -136,7 +136,7 @@ def _fetch
# Useful for installing jars.
class NoUnzipCurlDownloadStrategy <CurlDownloadStrategy
def stage
- FileUtils.mv @tarball_path, File.basename(@url)
+ FileUtils.cp @tarball_path, File.basename(@url)
end
end
| false |
Other | Homebrew | brew | a634dc6a2c2e0a4027f2fa4e95a111f88e00c1a7.json | Add brew doctor check for DYLD vars. | Library/Homebrew/brew_doctor.rb | @@ -259,6 +259,16 @@ def check_for_config_scripts
end
end
+def check_for_dyld_vars
+ if ENV['DYLD_LIBRARY_PATH']
+ puts <<-EOS.undent
+ Setting DYLD_LIBARY_PATH can break dynamic linking.
+ You should probably unset it.
+
+ EOS
+ end
+end
+
def brew_doctor
read, write = IO.pipe
@@ -278,6 +... | false |
Other | Homebrew | brew | 55b683b59a7d97b7028a22ffeaa33875009009ca.json | Add a download strategy that uses HTTP POST | Library/Homebrew/download_strategy.rb | @@ -45,11 +45,16 @@ def cached_location
@tarball_path
end
+ # Private method, can be overridden if needed.
+ def _fetch
+ curl @url, '-o', @tarball_path
+ end
+
def fetch
ohai "Downloading #{@url}"
unless @tarball_path.exist?
begin
- curl @url, '-o', @tarball_path
+ _fe... | false |
Other | Homebrew | brew | 6fbf1259707a359111ddf2478dfe3a62535744e0.json | Create explicit folders for more language libs. | Library/Homebrew/keg.rb | @@ -40,22 +40,28 @@ def link
$n=0
$d=0
- mkpaths=(1..9).collect {|x| "man/man#{x}"} <<'man'<<'doc'<<'locale'<<'info'<<'aclocal'
+ share_mkpaths=%w[aclocal doc info locale man]+(1..9).collect{|x|"man/man#{x}"}
# yeah indeed, you have to force anything you need in the main tree into
# these ... | false |
Other | Homebrew | brew | b2ae884e27df98b05e19fa1fa04988d069bef4db.json | Remove unused global define | Library/Homebrew/brew.h.rb | @@ -1,6 +1,5 @@
FORMULA_META_FILES = %w[README README.md ChangeLog COPYING LICENSE LICENCE COPYRIGHT AUTHORS]
PLEASE_REPORT_BUG = "#{Tty.white}Please report this bug at #{Tty.em}http://github.com/mxcl/homebrew/issues#{Tty.reset}"
-HOMEBREW_RECOMMENDED_GCC = 5577
def check_for_blacklisted_formula names
return if... | false |
Other | Homebrew | brew | 154d0fa92d982bc485acb0922ec646caf87f0445.json | Fix exception when installing with --use-llvm
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/extend/ENV.rb | @@ -21,7 +21,7 @@ def setup_build_environment
if MACOS_VERSION >= 10.6 and (ENV['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm')
# you can install Xcode wherever you like you know.
xcode_path = `/usr/bin/xcode-select -print-path`.chomp
- xcode_path = "/Developer" if xcode_prefix.to_s.empty?
+... | false |
Other | Homebrew | brew | aa46db87a7d460d9167810fdd66bfda117b8faab.json | Convert server to external command and enhance. | Library/Contributions/examples/brew-server | @@ -0,0 +1,173 @@
+#!/usr/bin/ruby
+
+## brew server: Run a local webserver for browsing available and installed brews.
+# Note: this external command is ruby, but set up as a shell script, so that it gets exec'd.
+# This is required for sinatra's run-loop to take over.
+
+puts "View our tasting menu at http://localhos... | true |
Other | Homebrew | brew | aa46db87a7d460d9167810fdd66bfda117b8faab.json | Convert server to external command and enhance. | website/formulas.rb | @@ -1,31 +0,0 @@
-require 'rubygems'
-require 'sinatra'
-
-$LOAD_PATH << File.join(File.dirname(__FILE__), "../Library/Homebrew")
-$LOAD_PATH << File.join(File.dirname(__FILE__), "../Library/Formula")
-
-require 'global'
-require 'formula'
-
-get '/' do
- body = "<ul>"
- Formulary.read_all do |name, klass|
- body ... | true |
Other | Homebrew | brew | d2d5993f995138ab7a6e489e9d7e93c0ed999d26.json | sinatra app for browsing formula
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | website/formulas.rb | @@ -0,0 +1,31 @@
+require 'rubygems'
+require 'sinatra'
+
+$LOAD_PATH << File.join(File.dirname(__FILE__), "../Library/Homebrew")
+$LOAD_PATH << File.join(File.dirname(__FILE__), "../Library/Formula")
+
+require 'global'
+require 'formula'
+
+get '/' do
+ body = "<ul>"
+ Formulary.read_all do |name, klass|
+ body ... | false |
Other | Homebrew | brew | 69b99011318786c47ecf00d929269c80886cd570.json | Move code to find outdated brew list | Library/Homebrew/brew.h.rb | @@ -385,6 +385,20 @@ def versions_of(keg_name)
end
+def outdated_brews
+ require 'formula'
+
+ results = []
+ HOMEBREW_CELLAR.subdirs.each do |keg|
+ next unless keg.subdirs
+ name = keg.basename.to_s
+ if (not (f = Formula.factory(name)).installed? rescue nil)
+ results << [keg, name, f.version]
... | true |
Other | Homebrew | brew | 69b99011318786c47ecf00d929269c80886cd570.json | Move code to find outdated brew list | bin/brew | @@ -366,18 +366,12 @@ begin
exec "cat", ARGV.formulae.first.path, *ARGV.options
when 'outdated'
- require 'formula'
- HOMEBREW_CELLAR.subdirs.each do |keg|
- if keg.subdirs.length > 0
- name = keg.basename('.rb').to_s
- if (not (f = Formula.factory(name)).installed? rescue nil)
- ... | true |
Other | Homebrew | brew | 07914a48eece34d8f2ae1d91a0233199ac7c9dae.json | Reduce nesting in 'brew up'. | bin/brew | @@ -163,34 +163,32 @@ begin
end
when 'up', 'update'
- if system "/usr/bin/which -s git"
- require 'update'
- updater = RefreshBrew.new
- old_revision = updater.current_revision
- unless updater.update_from_masterbrew!
- puts "Already up-to-date."
+ abort "Please `brew instal... | false |
Other | Homebrew | brew | 22ec3c76a8c755c30fa4405fc97b4735fe74e9f7.json | Add some dash-commands to bash completion script | Library/Contributions/brew_bash_completion.sh | @@ -12,7 +12,7 @@ _brew_to_completion()
cur="${COMP_WORDS[COMP_CWORD]}"
# We usually only complete unabbreviated commands.
- actions="--config cat cleanup configure create deps doctor edit home info install link list log outdated prune remove search unlink update uses"
+ actions="--cache --config --pr... | false |
Other | Homebrew | brew | b016c2eae516c7a631a75b41b3425c24b868b796.json | Support external commands
Homebrew will now look for external commands that are +x on PATH, named
as "brew-<cmd>" or "brew-<cmd>.rb"
* Shell scripts are exec'd with some HOMEBREW variables set in the ENV.
* Ruby scripts are require'd directly.
See: http://wiki.github.com/mxcl/homebrew/external-commands | bin/brew | @@ -377,6 +377,23 @@ begin
brew_doctor
else
+ # Check for an external shell command
+ if system "/usr/bin/which -s brew-#{arg}"
+ # Add some Homebrew vars to the ENV
+ ['CACHE', 'CELLAR', 'LIBRARY_PATH', 'PREFIX', 'REPOSITORY'].each do |e|
+ ENV["HOMEBREW_#{e}"] = eval("HOMEBREW_#{e}")
... | false |
Other | Homebrew | brew | 385e3637f2679ff2b7aa66f5ce54e1d2d6953298.json | Remove silly concatenation. | bin/brew | @@ -8,7 +8,7 @@ Dir.getwd rescue abort "The current working directory doesn't exist, cannot proc
HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] = File.expand_path(__FILE__)
require 'pathname'
-HOMEBREW_LIBRARY_PATH = (Pathname.new(__FILE__).realpath.dirname.parent+"Library"+"Homebrew").to_s
+HOMEBREW_LIBRARY_PATH =... | false |
Other | Homebrew | brew | ff9c50151da9e3a096eab5ec1da51384246cf66d.json | Fix typo in comment. | bin/brew | @@ -412,7 +412,7 @@ rescue BuildError => e
onoe e
puts PLEASE_REPORT_BUG
# this feature can be slow (depends on network conditions and if github is up)
- # so ideally we'd show feedback, eg. "checking for existin issues..." and
+ # so ideally we'd show feedback, eg. "checking for existing issues..." and
#... | false |
Other | Homebrew | brew | 43c8bec720454636e2085f42bba220facc3e38f2.json | Handle search with no arguments.
Fixes Homebrew/homebrew#1514. | bin/brew | @@ -133,7 +133,7 @@ begin
if ARGV.first =~ /^\/(.*)\/$/
puts_columns formulae.grep(Regexp.new($1))
else
- search_term = Regexp.escape(ARGV.first)
+ search_term = Regexp.escape(ARGV.first || "")
puts_columns formulae.grep(/.*#{search_term}.*/)
end
| false |
Other | Homebrew | brew | 54655a681f4c628f7e59990e22f0460c273c8874.json | Escape search terms. Fixes Homebrew/homebrew#1475 | bin/brew | @@ -133,7 +133,8 @@ begin
if ARGV.first =~ /^\/(.*)\/$/
puts_columns formulae.grep(Regexp.new($1))
else
- puts_columns formulae.grep(/.*#{ARGV.first}.*/)
+ search_term = Regexp.escape(ARGV.first)
+ puts_columns formulae.grep(/.*#{search_term}.*/)
end
when 'edit' | false |
Other | Homebrew | brew | cc34c0c3929e8ac4ad5bf9aa86e55b4c73cf8436.json | Remove selflink script.
Between the quick-install steps and other instructions on the Wiki,
this "self-link" script is no longer needed (and no longer recommended.) | Library/Contributions/selflink.sh | @@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-# This script links your clone into $install_base, so you can keep the .git
-# directory out of the way. Default for no parameters is /usr/local
-
-mode=$1
-if [[ -z $mode ]]; then
- mode="install"
-fi
-
-install_base=$2
-if [[ -z $install_base ]]; then
- install_base="/usr/... | false |
Other | Homebrew | brew | 4da905b7fb61a48392aee18a8a2b0bf757cdab22.json | Fix the update tests
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/test/test_updater.rb | @@ -23,6 +23,8 @@ def `(cmd)
raise "#{inspect} Unexpectedly called backticks in pwd `#{HOMEBREW_PREFIX}' and command `#{cmd}'"
end
end
+
+ alias safe_system `
def expectations_met?
@expect.keys.sort == @called.sort
@@ -54,8 +56,8 @@ def self.fixture_data
def test_update_homebrew_without_a... | true |
Other | Homebrew | brew | 4da905b7fb61a48392aee18a8a2b0bf757cdab22.json | Fix the update tests
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/test/tests | @@ -5,10 +5,6 @@
# Note: "formula_test" is omitted; these aren't unit tests but sanity checks
# on the real formulae.
#
-# Run as:
-# ./tests -- --skip-update
-# to omit the update tests which only seem to work for mxcl
-#
# Feel free to split out test_bucket
ruby test_bucket.rb $*
@@ -24,6 +20,4 @@ ruby test_p... | true |
Other | Homebrew | brew | 4da905b7fb61a48392aee18a8a2b0bf757cdab22.json | Fix the update tests
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/update.rb | @@ -1,5 +1,6 @@
class RefreshBrew
RESPOSITORY_URL = 'git://github.com/mxcl/homebrew.git'
+ INIT_COMMAND = "git init"
CHECKOUT_COMMAND = 'git checkout -q master'
UPDATE_COMMAND = "git pull #{RESPOSITORY_URL} master"
REVISION_COMMAND = 'git log -l -1 --pretty=format:%H 2> /dev/null'
@@ -60,7 +61,7 @@... | true |
Other | Homebrew | brew | 305fca250edb75d31f38a920e331eb4db9b2aaa3.json | Show digest mismatch in verify_download_integrity
Report "Expected <supplied digest>, got <file's digest>"
when verify_download_integrity sees a mismatch. (It had
been, confusingly, reporting "Expected <file's digest>".)
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/formula.rb | @@ -353,7 +353,7 @@ def verify_download_integrity fn
hash = fn.incremental_hash(hasher)
if supplied and not supplied.empty?
- raise "#{type} mismatch\nExpected: #{hash}\nArchive: #{fn}" unless supplied.upcase == hash.upcase
+ raise "#{type} mismatch\nExpected #{supplied}, got #{hash}\nArchive: #{f... | false |
Other | Homebrew | brew | 5fe0b108ad795f1877a843c08c72ba07002d31b1.json | Add check for gettext to brew_doctor.
If the user has linked the keg-only gettext, then a large number
of formulae which don't have "depends_on 'gettext'" will pick it
up anyway. Knowing this about the user's setup may help diagnose
bug reports. | Library/Homebrew/brew_doctor.rb | @@ -209,6 +209,22 @@ def check_pkg_config_paths
end
end
+def check_for_gettext
+ if File.exist? "#{HOMEBREW_PREFIX}/lib/libgettextlib.dylib" or
+ File.exist? "#{HOMEBREW_PREFIX}/lib/libintl.dylib"
+ puts <<-EOS.undent
+ gettext was detected in your PREFIX.
+
+ The gettext provided by Homebrew is... | false |
Other | Homebrew | brew | 7c158e2350fcf0e649e8c0896957dd698eb281cb.json | Fix universal builds on 32-bit CPUs. | Library/Homebrew/extend/ENV.rb | @@ -179,6 +179,9 @@ def universal_binary
append_to_cflags '-arch i386 -arch x86_64'
ENV.O3 if self['CFLAGS'].include? '-O4' # O4 seems to cause the build to fail
ENV.append 'LDFLAGS', '-arch i386 -arch x86_64'
+
+ # Can't mix "-march" for a 32-bit CPU with "-arch x86_64"
+ remove_from_cflags(/-mar... | true |
Other | Homebrew | brew | 7c158e2350fcf0e649e8c0896957dd698eb281cb.json | Fix universal builds on 32-bit CPUs. | Library/Homebrew/hardware.rb | @@ -46,6 +46,10 @@ def self.cores_as_words
end
end
+ def self.is_32_bit?
+ not self.is_64_bit?
+ end
+
def self.is_64_bit?
self.sysctl_bool("hw.cpu64bit_capable")
end | true |
Other | Homebrew | brew | 54b5a7afbb7d562c3ee3adf607d6067cd6b7d2dc.json | Add --git option to 'brew install -i'.
This allows for easy generation of diffs, per a trick in
http://wiki.github.com/mxcl/homebrew/formula-cookbook | Library/Homebrew/install.rb | @@ -78,6 +78,15 @@ def install f
ohai "Entering interactive mode"
puts "Type `exit' to return and finalize the installation"
puts "Install to this prefix: #{f.prefix}"
+
+ if ARGV.flag? '--git'
+ system "git init"
+ system "git add -A"
+ puts "This folder is ... | false |
Other | Homebrew | brew | ab9ccd7d8977e7929d948695b1f3d585cfb882f2.json | Read all formula in a 'rescue' block.
For operations that read all formulae, catch exceptions and
skip broken ones, rather than bomb out entirely. | Library/Homebrew/formula.rb | @@ -34,10 +34,15 @@ def self.read name
def self.read_all
# yields once for each
Formulary.names.each do |name|
- require Formula.path(name)
- klass_name = Formula.class_s(name)
- klass = eval(klass_name)
- yield name, klass
+ begin
+ require Formula.path(name)
+ klass_n... | false |
Other | Homebrew | brew | f144dcab60215d698007d49281187c1e54fa96be.json | Add PATH to --config and ENV dump.
A user's PATH can help diagnose ./configure and other problems in bug reports. | bin/brew | @@ -65,13 +65,14 @@ GCC-4.2: #{gcc_42 ? "build #{gcc_42}" : "N/A"} (#{RECOMMENDED_GCC_42} or newer r
LLVM: #{llvm ? "build #{llvm}" : "N/A" } #{llvm ? "(#{RECOMMENDED_LLVM} or newer recommended)" : "" }
MacPorts or Fink? #{macports_or_fink_installed?}
X11 installed? #{x11_installed?}
+PATH: #{ENV['PATH']}
EOS
end
... | false |
Other | Homebrew | brew | cfc8fca74d642d5b09d8b45a802f3114948ed32f.json | Support jruby external dependencies.
* Add tests that run only if 'jruby' is installed.
* Note that if your formula has :jruby deps, it should likely
"depend_on 'jruby'" as well. | Library/Homebrew/formula.rb | @@ -475,15 +475,15 @@ def aka *args
def depends_on name
@deps ||= []
- @external_deps ||= {:python => [], :ruby => [], :perl => []}
+ @external_deps ||= {:python => [], :perl => [], :ruby => [], :jruby => []}
case name
when String
# noop
when Hash
key, va... | true |
Other | Homebrew | brew | cfc8fca74d642d5b09d8b45a802f3114948ed32f.json | Support jruby external dependencies.
* Add tests that run only if 'jruby' is installed.
* Note that if your formula has :jruby deps, it should likely
"depend_on 'jruby'" as well. | Library/Homebrew/formula_installer.rb | @@ -43,6 +43,13 @@ def rberr dep; <<-EOS
gem install #{dep}
EOS
end
+ def jrberr dep; <<-EOS
+Unsatisfied dependency "#{dep}"
+Homebrew does not provide formulae for JRuby dependencies, rubygems does:
+
+ jruby -S gem install #{dep}
+ EOS
+ end
def check_external_deps f
return unless f.ex... | true |
Other | Homebrew | brew | cfc8fca74d642d5b09d8b45a802f3114948ed32f.json | Support jruby external dependencies.
* Add tests that run only if 'jruby' is installed.
* Note that if your formula has :jruby deps, it should likely
"depend_on 'jruby'" as well. | Library/Homebrew/test/test_external_deps.rb | @@ -27,6 +27,10 @@ def plerr dep
def rberr dep
"Ruby module install message."
end
+
+ def jrberr dep
+ "JRuby module install message."
+ end
end
@@ -79,6 +83,22 @@ def initialize name=nil
end
end
+class BadJRubyBall <TestBall
+ depends_on "notapackage" => :jruby
+
+ def initialize name=nil
... | true |
Other | Homebrew | brew | c59a6381956a1a6408f6b6686476fecc437cca1d.json | Remove silly concatenation. | Library/Homebrew/formula.rb | @@ -118,12 +118,12 @@ def cached_download
def bin; prefix+'bin' end
def sbin; prefix+'sbin' end
- def doc; prefix+'share'+'doc'+name end
+ def doc; prefix+'share/doc'+name end
def lib; prefix+'lib' end
def libexec; prefix+'libexec' end
- def man; prefix+'share'+'man' end
+ def man; prefix+'share/man' ... | false |
Other | Homebrew | brew | cacb057b912c433928534f61293e0994e0dd040a.json | Move ENV tests to separate file. | Library/Homebrew/test/test_ENV.rb | @@ -0,0 +1,20 @@
+require 'testing_env'
+require 'utils'
+require 'brew.h'
+require 'extend/ENV'
+ENV.extend(HomebrewEnvExtension)
+
+class EnvironmentTests < Test::Unit::TestCase
+ def test_ENV_options
+ ENV.gcc_4_0
+ ENV.gcc_4_2
+ ENV.O3
+ ENV.minimal_optimization
+ ENV.no_optimization
+ ENV.libx... | true |
Other | Homebrew | brew | cacb057b912c433928534f61293e0994e0dd040a.json | Move ENV tests to separate file. | Library/Homebrew/test/test_bucket.rb | @@ -175,20 +175,4 @@ def test_pathname_properties
assert_equal 'foo-0.1', foo1.stem
assert_equal '0.1', foo1.version
end
-
- def test_ENV_options
- require 'extend/ENV'
- ENV.extend(HomebrewEnvExtension)
-
- ENV.gcc_4_0
- ENV.gcc_4_2
- ENV.O3
- ENV.minimal_optimization
- ENV.no_opti... | true |
Other | Homebrew | brew | cacb057b912c433928534f61293e0994e0dd040a.json | Move ENV tests to separate file. | Library/Homebrew/test/tests | @@ -23,6 +23,7 @@ ruby test_external_deps.rb $*
ruby test_pathname_install.rb $*
ruby test_utils.rb $*
ruby test_ARGV.rb $*
+ruby test_ENV.rb $*
# Update tests (only seem to work for mxcl)
ruby test_updater.rb $* | true |
Other | Homebrew | brew | e4766639dc00f3844e4ab18fbd36d90633549dcf.json | Move Pathename property tests to separate file. | Library/Homebrew/test/test_bucket.rb | @@ -159,19 +159,19 @@ def test_pathname_plus_yeast
abcd.cp HOMEBREW_CACHE
assert orig_abcd.exist?
- foo1=HOMEBREW_CACHE+'foo-0.1.tar.gz'
- FileUtils.cp ABS__FILE__, foo1
- assert foo1.file?
-
- assert_equal '.tar.gz', foo1.extname
- assert_equal 'foo-0.1', ... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.