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 | 883b201c0906ad2942ec900290568836b5ddc240.json | utils: output what files `edit` is opening. (#444)
Since we've moved all formulae to taps it's not necessarily obvious
what the path for the files are otherwise. | Library/Homebrew/utils.rb | @@ -431,6 +431,7 @@ def which_editor
end
def exec_editor(*args)
+ puts "Editing #{args.join "\n"}"
safe_exec(which_editor, *args)
end
| false |
Other | Homebrew | brew | a49f3a8e91df8ccbbd7335deab1853ce395c5be4.json | style: use RuboCop 0.41.1 (#433)
Tweak `Style/NumericLiteralPrefix` cop settings as we're using octal
literals a lot (both in formulae and the package manager) for file
permissions and aren't ready just yet to transition them to the more
beginner-friendly `0o` prefix (instead of the more obscure `0` prefix). | Library/.rubocop.yml | @@ -66,6 +66,10 @@ Style/EmptyLineBetweenDefs:
Style/NumericLiterals:
Enabled: false
+# zero-prefixed octal literals are just too widely used (and mostly understood)
+Style/NumericLiteralPrefix:
+ EnforcedOctalStyle: zero_only
+
# consistency and readability when faced with string interpolation
Style/PercentLi... | true |
Other | Homebrew | brew | a49f3a8e91df8ccbbd7335deab1853ce395c5be4.json | style: use RuboCop 0.41.1 (#433)
Tweak `Style/NumericLiteralPrefix` cop settings as we're using octal
literals a lot (both in formulae and the package manager) for file
permissions and aren't ready just yet to transition them to the more
beginner-friendly `0o` prefix (instead of the more obscure `0` prefix). | Library/Homebrew/cmd/style.rb | @@ -47,7 +47,7 @@ def check_style_json(files, options = {})
def check_style_impl(files, output_type, options = {})
fix = options[:fix]
- Homebrew.install_gem_setup_path! "rubocop", "0.40"
+ Homebrew.install_gem_setup_path! "rubocop", "0.41.1"
args = %W[
--force-exclusion | true |
Other | Homebrew | brew | 9167fbf8766e1cc4438ffbb583627505784c60cf.json | linkage: fix edge cases for undeclared_deps
* take requirements into account.
* handle full qualified formula name.
* filter out build time or unused optional deps/requirements.
Closes #424.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/dev-cmd/linkage.rb | @@ -72,7 +72,13 @@ def check_dylibs
begin
f = Formulary.from_rack(keg.rack)
- @undeclared_deps = @brewed_dylibs.keys - f.deps.map(&:name)
+ f.build = Tab.for_keg(keg)
+ filter_out = proc do |dep|
+ dep.build? || (dep.optional? && !dep.option_names.any? { |n| f.build.with?... | false |
Other | Homebrew | brew | 080ddd8804be14f4b18f9558b58270456ff313c2.json | linkage: check undeclared dependencies for `--test`
Also allowing access results for LinkageChecker | Library/Homebrew/dev-cmd/linkage.rb | @@ -16,34 +16,34 @@
module Homebrew
def linkage
- found_broken_dylibs = false
ARGV.kegs.each do |keg|
ohai "Checking #{keg.name} linkage" if ARGV.kegs.size > 1
result = LinkageChecker.new(keg)
if ARGV.include?("--test")
result.display_test_output
+ if result.broken_dyl... | false |
Other | Homebrew | brew | bf4f33790370b7d2eb5d2b4464d6e54f686f31d0.json | Call subcommands from zsh completion
This change is inspired by the way that the git zsh completions work by foisting
the responsibility for sub commands onto the command themselves.
It is paired with another change that takes the oh-my-zsh brew cask plugin and
makes it into a first class completion rather than it ove... | share/zsh/site-functions/_brew | @@ -2,8 +2,6 @@
#autoload
# Brew ZSH completion function
-#
-# altered from _fink
_brew_all_formulae() {
formulae=(`brew search`)
@@ -29,6 +27,12 @@ _brew_outdated_formulae() {
outdated_formulae=(`brew outdated`)
}
+__brew_command() {
+ local command="$1"
+ local completion_func="_brew_${command//-/_}... | false |
Other | Homebrew | brew | 3e309d4643ab52ce823b8733d72f8665133dbf5e.json | blacklist: update URLs and MacRuby message (#406)
* updates link for installing pip
* the macruby project has been abandoned and the website is gone | Library/Homebrew/blacklist.rb | @@ -17,15 +17,15 @@ def blacklisted?(name)
Homebrew provides pip via: `brew install python`. However you will then
have two Pythons installed on your Mac, so alternatively you can install
pip via the instructions at:
-
- https://pip.readthedocs.org/en/stable/installing/#install-pip
+ https://pi... | false |
Other | Homebrew | brew | 4e927d9ce855cbd74b2f893237bb2b6489f88da8.json | Remove unused variable Step#@time
Shadowed by Step#time method. | Library/Homebrew/dev-cmd/test-bot.rb | @@ -96,7 +96,7 @@ def resolve_test_tap
# Wraps command invocations. Instantiated by Test#test.
# Handles logging and pretty-printing.
class Step
- attr_reader :command, :name, :status, :output, :time
+ attr_reader :command, :name, :status, :output
# Instantiates a Step object.
# @param test [... | false |
Other | Homebrew | brew | 1c27a75ca40cd232bccc59682ad411122c82ad59.json | utils/lock.sh: remove redundant 'local' | Library/Homebrew/utils/lock.sh | @@ -29,7 +29,7 @@ EOS
_create_lock() {
local lock_fd="$1"
local ruby="/usr/bin/ruby"
- [[ -x "$ruby" ]] || local ruby="$(which ruby 2>/dev/null)"
+ [[ -x "$ruby" ]] || ruby="$(which ruby 2>/dev/null)"
if [[ -n "$ruby" ]]
then | false |
Other | Homebrew | brew | db76a0f4cc3838658919570b3453edbcb9ed2fcd.json | Begin documenting environment variables
Closes #405. | Library/Homebrew/dev-cmd/test-bot.rb | @@ -25,6 +25,10 @@
# --ci-pr: Shortcut for Homebrew pull request CI options.
# --ci-testing: Shortcut for Homebrew testing CI options.
# --ci-upload: Homebrew CI bottle upload.
+#
+# Influential environment variables include:
+# TRAVIS_REPO_SLUG: same as --tap
+# GIT_URL: if set to U... | false |
Other | Homebrew | brew | 9b36e8377142241218cb472dcaf64561f70b96e9.json | Add magic token to hide commands from man page
Closes #402. | Library/Homebrew/cmd/help.rb | @@ -91,8 +91,9 @@ def command_help(path)
line.slice(2..-1).
sub(/^ \* /, "#{Tty.highlight}brew#{Tty.reset} ").
gsub(/`(.*?)`/, "#{Tty.highlight}\\1#{Tty.reset}").
- gsub(/<(.*?)>/, "#{Tty.em}\\1#{Tty.reset}")
- end.join
+ gsub(/<(.*?)>/, "#{Tty.em}\\1#{Tty.reset}")... | true |
Other | Homebrew | brew | 9b36e8377142241218cb472dcaf64561f70b96e9.json | Add magic token to hide commands from man page
Closes #402. | Library/Homebrew/cmd/man.rb | @@ -51,7 +51,7 @@ def build_man_page
map { |line| line.slice(2..-1) }.
join
}.
- reject { |s| s.strip.empty? }
+ reject { |s| s.strip.empty? || s.include?("@hide_from_man_page") }
variables[:maintainers] = (HOMEBREW_REPOSITORY/"README.md").
read[/Homebrew's current m... | true |
Other | Homebrew | brew | 9b36e8377142241218cb472dcaf64561f70b96e9.json | Add magic token to hide commands from man page
Closes #402. | Library/Homebrew/cmd/tests.rb | @@ -1,3 +1,4 @@
+#: @hide_from_man_page
#: * `tests` [`-v`] [`--coverage`] [`--generic`] [`--no-compat`] [`--only=`<test_script/test_method>] [`--seed` <seed>] [`--trace`]:
#: Run Homebrew's unit and integration tests.
| true |
Other | Homebrew | brew | 3c5f007bfa1a469ef3e1a048ee163f3eaa73cb71.json | bin/brew: fix corner cases in prefix computation
If `bin/brew` happens to be symlinked to `/brew`, `/bin/brew`, or some
similar location or (worse yet) Homebrew is installed to `/`, then
computation of the prefix and/or repository path could break down and
result in an invalid or empty path.
Closes Homebrew/homebrew-... | bin/brew | @@ -5,10 +5,13 @@ quiet_cd() {
cd "$@" >/dev/null
}
-BREW_FILE_DIRECTORY="$(quiet_cd "${0%/*}" && pwd -P)"
-HOMEBREW_BREW_FILE="$BREW_FILE_DIRECTORY/${0##*/}"
+BREW_FILE_DIRECTORY="$(quiet_cd "${0%/*}/" && pwd -P)"
+HOMEBREW_BREW_FILE="${BREW_FILE_DIRECTORY%/}/${0##*/}"
HOMEBREW_PREFIX="${HOMEBREW_BREW_FILE%/*... | false |
Other | Homebrew | brew | 0d3b5f6849e236272d6a1b83a1869845608b3d10.json | test_formula: add migration_needed test | Library/Homebrew/test/test_formula.rb | @@ -40,6 +40,28 @@ def test_any_version_installed?
f.rack.rmtree
end
+ def test_migration_needed
+ f = Testball.new("newname")
+ f.instance_variable_set(:@oldname, "oldname")
+ f.instance_variable_set(:@tap, CoreTap.instance)
+
+ oldname_prefix = HOMEBREW_CELLAR/"oldname/2.20"
+ oldname_prefix... | false |
Other | Homebrew | brew | d47df68cbd03fb621825d12a531f91938571ec04.json | test_formula: add outdated_versions tests | Library/Homebrew/test/test_formula.rb | @@ -406,3 +406,101 @@ def test_pour_bottle_dsl
assert f_true.pour_bottle?
end
end
+
+class OutdatedVersionsTests < Homebrew::TestCase
+ attr_reader :outdated_prefix, :same_prefix, :greater_prefix, :head_prefix
+ attr_reader :f
+
+ def setup
+ @f = formula { url "foo"; version "1.20" }
+ @outdated_pref... | false |
Other | Homebrew | brew | cb3ad215b4fc011e3405e6e577b97819c683036a.json | test: Add tests for Keg#mach_o_files link behavior.
Move dylib_path and bundle_path from test_mach to testing_env to
accommodate the new tests.
Closes #400.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de> | Library/Homebrew/test/test_keg.rb | @@ -304,4 +304,35 @@ def test_removes_broken_symlinks_that_conflict_with_directories
keg.unlink
keg.uninstall
end
+
+ def test_mach_o_files_skips_hardlinks
+ a = HOMEBREW_CELLAR/"a/1.0"
+ (a/"lib").mkpath
+ FileUtils.cp dylib_path("i386"), a/"lib/i386.dylib"
+ FileUtils.ln a/"lib/i386.dylib", ... | true |
Other | Homebrew | brew | cb3ad215b4fc011e3405e6e577b97819c683036a.json | test: Add tests for Keg#mach_o_files link behavior.
Move dylib_path and bundle_path from test_mach to testing_env to
accommodate the new tests.
Closes #400.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de> | Library/Homebrew/test/test_mach.rb | @@ -1,14 +1,6 @@
require "testing_env"
class MachOPathnameTests < Homebrew::TestCase
- def dylib_path(name)
- Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.dylib")
- end
-
- def bundle_path(name)
- Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.bundle")
- end
-
def test_fat_dylib
pn = dylib_path("fat... | true |
Other | Homebrew | brew | cb3ad215b4fc011e3405e6e577b97819c683036a.json | test: Add tests for Keg#mach_o_files link behavior.
Move dylib_path and bundle_path from test_mach to testing_env to
accommodate the new tests.
Closes #400.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de> | Library/Homebrew/test/testing_env.rb | @@ -112,5 +112,13 @@ def refute_eql(exp, act, msg = nil)
}
refute exp.eql?(act), msg
end
+
+ def dylib_path(name)
+ Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.dylib")
+ end
+
+ def bundle_path(name)
+ Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.bundle")
+ end
end
end | true |
Other | Homebrew | brew | d3ef56425a6b4c190317c2527137b97c0ff5daf8.json | keg_relocate: Exclude hardlinks from mach_o_files. | Library/Homebrew/keg_relocate.rb | @@ -157,10 +157,15 @@ def find_dylib(bad_name)
end
def mach_o_files
+ hardlinks = Set.new
mach_o_files = []
path.find do |pn|
next if pn.symlink? || pn.directory?
- mach_o_files << pn if pn.dylib? || pn.mach_o_bundle? || pn.mach_o_executable?
+ next unless pn.dylib? || pn.mach_o_bu... | false |
Other | Homebrew | brew | cab97cf4d782ce36762f0cd615ca59718f55b0d5.json | Revert "keg_relocate: Exclude hardlinks from mach_o_files."
This reverts commit 3e5e14a59580325faf397b48d62a52f0013a17f2. | Library/Homebrew/keg_relocate.rb | @@ -157,12 +157,8 @@ def find_dylib(bad_name)
end
def mach_o_files
- hardlinks = Set.new
mach_o_files = []
path.find do |pn|
- # if we've already processed a file, ignore its hardlinks (which have the same dev ID and inode)
- # this prevents relocations from being performed on a binary mo... | false |
Other | Homebrew | brew | 70ceb851a596c4f40ccfb448d543bb5eb5089b4a.json | Revert "test: Add test for Keg#mach_o_files hardlink behavior."
This reverts commit 62d7079684cdb568600e22531c62888622a71ff1. | Library/Homebrew/test/test_keg.rb | @@ -304,19 +304,4 @@ def test_removes_broken_symlinks_that_conflict_with_directories
keg.unlink
keg.uninstall
end
-
- def test_mach_o_files_skips_hardlinks
- a = HOMEBREW_CELLAR.join("a", "1.0")
- a.join("lib").mkpath
- FileUtils.cp dylib_path("i386"), a.join("lib", "i386.dylib")
- FileUtils.l... | true |
Other | Homebrew | brew | 70ceb851a596c4f40ccfb448d543bb5eb5089b4a.json | Revert "test: Add test for Keg#mach_o_files hardlink behavior."
This reverts commit 62d7079684cdb568600e22531c62888622a71ff1. | Library/Homebrew/test/test_mach.rb | @@ -1,6 +1,14 @@
require "testing_env"
class MachOPathnameTests < Homebrew::TestCase
+ def dylib_path(name)
+ Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.dylib")
+ end
+
+ def bundle_path(name)
+ Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.bundle")
+ end
+
def test_fat_dylib
pn = dylib_path("fat... | true |
Other | Homebrew | brew | 70ceb851a596c4f40ccfb448d543bb5eb5089b4a.json | Revert "test: Add test for Keg#mach_o_files hardlink behavior."
This reverts commit 62d7079684cdb568600e22531c62888622a71ff1. | Library/Homebrew/test/testing_env.rb | @@ -112,13 +112,5 @@ def refute_eql(exp, act, msg = nil)
}
refute exp.eql?(act), msg
end
-
- def dylib_path(name)
- Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.dylib")
- end
-
- def bundle_path(name)
- Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.bundle")
- end
end
end | true |
Other | Homebrew | brew | 62d7079684cdb568600e22531c62888622a71ff1.json | test: Add test for Keg#mach_o_files hardlink behavior.
Move dylib_path and bundle_path from test_mach to testing_env to
accommodate the new test.
Closes #400.
Signed-off-by: Tim D. Smith <git@tim-smith.us> | Library/Homebrew/test/test_keg.rb | @@ -304,4 +304,19 @@ def test_removes_broken_symlinks_that_conflict_with_directories
keg.unlink
keg.uninstall
end
+
+ def test_mach_o_files_skips_hardlinks
+ a = HOMEBREW_CELLAR.join("a", "1.0")
+ a.join("lib").mkpath
+ FileUtils.cp dylib_path("i386"), a.join("lib", "i386.dylib")
+ FileUtils.l... | true |
Other | Homebrew | brew | 62d7079684cdb568600e22531c62888622a71ff1.json | test: Add test for Keg#mach_o_files hardlink behavior.
Move dylib_path and bundle_path from test_mach to testing_env to
accommodate the new test.
Closes #400.
Signed-off-by: Tim D. Smith <git@tim-smith.us> | Library/Homebrew/test/test_mach.rb | @@ -1,14 +1,6 @@
require "testing_env"
class MachOPathnameTests < Homebrew::TestCase
- def dylib_path(name)
- Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.dylib")
- end
-
- def bundle_path(name)
- Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.bundle")
- end
-
def test_fat_dylib
pn = dylib_path("fat... | true |
Other | Homebrew | brew | 62d7079684cdb568600e22531c62888622a71ff1.json | test: Add test for Keg#mach_o_files hardlink behavior.
Move dylib_path and bundle_path from test_mach to testing_env to
accommodate the new test.
Closes #400.
Signed-off-by: Tim D. Smith <git@tim-smith.us> | Library/Homebrew/test/testing_env.rb | @@ -112,5 +112,13 @@ def refute_eql(exp, act, msg = nil)
}
refute exp.eql?(act), msg
end
+
+ def dylib_path(name)
+ Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.dylib")
+ end
+
+ def bundle_path(name)
+ Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.bundle")
+ end
end
end | true |
Other | Homebrew | brew | 3e5e14a59580325faf397b48d62a52f0013a17f2.json | keg_relocate: Exclude hardlinks from mach_o_files. | Library/Homebrew/keg_relocate.rb | @@ -157,8 +157,12 @@ def find_dylib(bad_name)
end
def mach_o_files
+ hardlinks = Set.new
mach_o_files = []
path.find do |pn|
+ # if we've already processed a file, ignore its hardlinks (which have the same dev ID and inode)
+ # this prevents relocations from being performed on a binary mo... | false |
Other | Homebrew | brew | 6bd24a7fb806184d401ee98e1f8c82d97f813107.json | audit.rb: require https for ftpmirror.gnu.org (#393)
* audit.rb: require https for ftpmirror.gnu.org
The situation is similar to other mirror redirectors: the server
may subsequently redirect to an insecure url. But it's a step.
* manpage: update HOMEBREW_NO_INSECURE_REDIRECT section | Library/Homebrew/cmd/audit.rb | @@ -1135,12 +1135,7 @@ def audit_download_strategy
def audit_urls
# Check GNU urls; doesn't apply to mirrors
if url =~ %r{^(?:https?|ftp)://(?!alpha).+/gnu/}
- problem "Please use \"http://ftpmirror.gnu.org\" instead of #{url}."
- end
-
- # GNU's ftpmirror does NOT support SSL/TLS.
- if url =... | true |
Other | Homebrew | brew | 6bd24a7fb806184d401ee98e1f8c82d97f813107.json | audit.rb: require https for ftpmirror.gnu.org (#393)
* audit.rb: require https for ftpmirror.gnu.org
The situation is similar to other mirror redirectors: the server
may subsequently redirect to an insecure url. But it's a step.
* manpage: update HOMEBREW_NO_INSECURE_REDIRECT section | Library/Homebrew/manpages/brew.1.md.erb | @@ -180,8 +180,8 @@ can take several different forms:
to insecure HTTP.
While ensuring your downloads are fully secure, this is likely
- to cause from-source Sourceforge & GNOME based formulae
- to fail to download.
+ to cause from-source Sourceforge, some GNU & GNOME based
+ formulae to fail to... | true |
Other | Homebrew | brew | 6bd24a7fb806184d401ee98e1f8c82d97f813107.json | audit.rb: require https for ftpmirror.gnu.org (#393)
* audit.rb: require https for ftpmirror.gnu.org
The situation is similar to other mirror redirectors: the server
may subsequently redirect to an insecure url. But it's a step.
* manpage: update HOMEBREW_NO_INSECURE_REDIRECT section | share/doc/homebrew/brew.1.html | @@ -561,7 +561,7 @@ <h2 id="ENVIRONMENT">ENVIRONMENT</h2>
to insecure HTTP.</p>
<p>While ensuring your downloads are fully secure, this is likely
-to cause from-source Sourceforge & GNOME based formulae
+to cause from-source Sourceforge, some GNU & GNOME based formulae
to fail to download.</p></dd>
<dt><c... | true |
Other | Homebrew | brew | 6bd24a7fb806184d401ee98e1f8c82d97f813107.json | audit.rb: require https for ftpmirror.gnu.org (#393)
* audit.rb: require https for ftpmirror.gnu.org
The situation is similar to other mirror redirectors: the server
may subsequently redirect to an insecure url. But it's a step.
* manpage: update HOMEBREW_NO_INSECURE_REDIRECT section | share/man/man1/brew.1 | @@ -783,7 +783,7 @@ If set, Homebrew will not print the \fBHOMEBREW_INSTALL_BADGE\fR on a successful
If set, Homebrew will not permit redirects from secure HTTPS to insecure HTTP\.
.
.IP
-While ensuring your downloads are fully secure, this is likely to cause from\-source Sourceforge & GNOME based formulae to fail t... | true |
Other | Homebrew | brew | 915eed4c6427271c5b4c01fa36239361c3680c40.json | update-report: remove unconditional cask/formula uninstall. | Library/Homebrew/cmd/update-report.rb | @@ -252,7 +252,6 @@ def migrate_tap_migration
new_tap = Tap.fetch(new_tap_name)
# For formulae migrated to cask: Auto-install cask or provide install instructions.
if new_tap_name == "caskroom/cask"
- system HOMEBREW_BREW_FILE, "uninstall", name
if new_tap.installed? && (HOMEBREW_RE... | false |
Other | Homebrew | brew | 6dc72f2679208f34d9d09f547dda5a2ba0714a9f.json | boneyard-formula-pr: relax hub requirement
Don't force installation of the `hub` formula if it can be found in the
search path. (Avoids unnecessary installation when switching between
multiple Homebrew installations for different tasks.)
Closes #384.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de> | Library/Homebrew/dev-cmd/boneyard-formula-pr.rb | @@ -60,7 +60,7 @@ def boneyard_formula_pr
tap_migrations = tap_migrations.sort.inject({}) { |a, e| a.merge!(e[0] => e[1]) }
tap_migrations_path.atomic_write(JSON.pretty_generate(tap_migrations) + "\n")
end
- unless Formula["hub"].any_version_installed? || local_only
+ unless which("hub") || loc... | false |
Other | Homebrew | brew | 3b3da02cf35103d490459508aaa827b7995aa0c6.json | boneyard-formula-pr: fix local branch creation
In local-only mode, the created branches end up tracking `origin/master`
which isn't desirable. | Library/Homebrew/dev-cmd/boneyard-formula-pr.rb | @@ -70,7 +70,7 @@ def boneyard_formula_pr
branch = "#{formula.name}-boneyard"
if ARGV.dry_run?
puts "cd #{formula.tap.path}"
- puts "git checkout -b #{branch} origin/master"
+ puts "git checkout --no-track -b #{branch} origin/master"
puts "git commit --no-edit --verbose --message=\"#{f... | false |
Other | Homebrew | brew | 806cfeee189bb6e08209186c46e21e84777b78df.json | linkage: simplify display logic
Move check for emptiness into the display method, avoiding repetitive
checks on the call site.
Closes #381.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de> | Library/Homebrew/dev-cmd/linkage.rb | @@ -77,36 +77,24 @@ def check_dylibs
end
def display_normal_output
- unless @system_dylibs.empty?
- display_items "System libraries", @system_dylibs
- end
- unless @brewed_dylibs.empty?
- display_items "Homebrew libraries", @brewed_dylibs
- end
- unless @variable_dylib... | false |
Other | Homebrew | brew | af94c4fc50384924752bc917f6a56b28f257500f.json | pull: skip non-ruby files when collecting formulae names
Closes #377.
Signed-off-by: Baptiste Fontaine <b@ptistefontaine.fr> | Library/Homebrew/cmd/pull.rb | @@ -113,21 +113,23 @@ def pull
"git", "diff-tree", "-r", "--name-only",
"--diff-filter=AM", orig_revision, "HEAD", "--", tap.formula_dir.to_s
).each_line do |line|
+ next unless line.end_with? ".rb\n"
name = "#{tap.name}/#{File.basename(line.chomp, ".rb")}"
- ... | false |
Other | Homebrew | brew | d7b6e9bba92ccc5884dcb9dd0859d16e2bf3fe9c.json | config: expose used Git version and path
Due to our SCM wrapper in `Library/ENV/scm/git`, lookup is a bit more
complicated than just picking the first match in `PATH`. Make debugging
easier by printing the version and path of the Git actually used by us. | Library/Homebrew/system_config.rb | @@ -107,6 +107,11 @@ def describe_java
javas.uniq.join(", ")
end
+ def describe_git
+ return "N/A" unless Utils.git_available?
+ "#{Utils.git_version} => #{Utils.git_path}"
+ end
+
def dump_verbose_config(f = $stdout)
f.puts "HOMEBREW_VERSION: #{HOMEBREW_VERSION}"
f.puts... | false |
Other | Homebrew | brew | 324a34d8ea8f931dd336dd667bbcdd2531cd3c22.json | utils/git: provide git_path and git_version | Library/Homebrew/utils/git.rb | @@ -4,6 +4,20 @@ def self.git_available?
@git = quiet_system HOMEBREW_ENV_PATH/"scm/git", "--version"
end
+ def self.git_path
+ return unless git_available?
+ @git_path ||= Utils.popen_read(
+ HOMEBREW_ENV_PATH/"scm/git", "--homebrew=print-path"
+ ).chuzzle
+ end
+
+ def self.git_version
+ ... | false |
Other | Homebrew | brew | a8165b6dbd9837c0ba3c8a0fa368e80aaf5a5dd9.json | scm/git: allow introspecting path lookup
Print path of first detected Git instead of executing it. This is hidden
behind a `--homebrew=print-path` argument that is unlikely to conflict
with any existing or future Git flags. | Library/ENV/scm/git | @@ -23,6 +23,10 @@ def exec(*args)
# prevent fork-bombs
arg0 = args.first
return if arg0 =~ /^#{F}/i || Pathname.new(arg0).realpath == SELF_REAL
+ if ARGV == %w[--homebrew=print-path]
+ puts arg0
+ exit
+ end
super
end
| false |
Other | Homebrew | brew | 96cbce015e0b327bd7d30fc101cbd25452cd2fd8.json | bump-formula-pr: remove formula revision
If we're bumping the formula's stable version, then we also must reset
the formula revision to zero.
Note that if and only if a revision is being removed, this commit will
enforce the convention that there should be a blank line before a simple
head spec if and only if there i... | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -20,7 +20,9 @@ def inreplace_pairs(path, replacement_pairs)
contents = path.open("r") { |f| Formulary.set_encoding(f).read }
contents.extend(StringInreplaceExtension)
replacement_pairs.each do |old, new|
- ohai "replace \"#{old}\" with \"#{new}\"" unless ARGV.flag?("--quiet")
+ unl... | false |
Other | Homebrew | brew | cc0ca73183f1e92579169eb038b10a98bd7c455a.json | bump-formula-pr: reflect new version in dry-run
- simulate version change for dry-run
- make sure we're using :devel version if called with --devel
Closes #318.
Signed-off-by: ilovezfs <ilovezfs@icloud.com> | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -15,6 +15,39 @@
require "formula"
module Homebrew
+ def inreplace_pairs(path, replacement_pairs)
+ if ARGV.dry_run?
+ contents = path.open("r") { |f| Formulary.set_encoding(f).read }
+ contents.extend(StringInreplaceExtension)
+ replacement_pairs.each do |old, new|
+ ohai "replace \"#{o... | false |
Other | Homebrew | brew | cc10c632a8c2803b7e62a37c9490beca8fb48128.json | macOS Sierra: add pkg-config files | Library/ENV/pkgconfig/10.12/libcurl.pc | @@ -0,0 +1,39 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# ... | true |
Other | Homebrew | brew | cc10c632a8c2803b7e62a37c9490beca8fb48128.json | macOS Sierra: add pkg-config files | Library/ENV/pkgconfig/10.12/libexslt.pc | @@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+
+Name: libexslt
+Version: 0.8.17
+Description: EXSLT Extension library
+Requires: libxml-2.0
+Libs: -L${libdir} -lexslt -lxslt -lxml2 -lz -lpthread -licucore -lm
+Cflags: -I${includedir} | true |
Other | Homebrew | brew | cc10c632a8c2803b7e62a37c9490beca8fb48128.json | macOS Sierra: add pkg-config files | Library/ENV/pkgconfig/10.12/libxml-2.0.pc | @@ -0,0 +1,13 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+modules=1
+
+Name: libXML
+Version: 2.9.3
+Description: libXML library version2.
+Requires:
+Libs: -L${libdir} -lxml2
+Libs.private: -lpthread -lz -lm
+Cflags: -I${includedir}/libxml2 | true |
Other | Homebrew | brew | cc10c632a8c2803b7e62a37c9490beca8fb48128.json | macOS Sierra: add pkg-config files | Library/ENV/pkgconfig/10.12/libxslt.pc | @@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+
+Name: libxslt
+Version: 1.1.28
+Description: XSLT library version 2.
+Requires: libxml-2.0
+Libs: -L${libdir} -lxslt -lxml2 -lz -lpthread -licucore -lm
+Cflags: -I${includedir} | true |
Other | Homebrew | brew | cc10c632a8c2803b7e62a37c9490beca8fb48128.json | macOS Sierra: add pkg-config files | Library/ENV/pkgconfig/10.12/sqlite3.pc | @@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: SQLite
+Description: SQL database engine
+Version: 3.13.0
+Libs: -L${libdir} -lsqlite3
+Libs.private:
+Cflags: -I${includedir} | true |
Other | Homebrew | brew | cc10c632a8c2803b7e62a37c9490beca8fb48128.json | macOS Sierra: add pkg-config files | Library/ENV/pkgconfig/10.12/zlib.pc | @@ -0,0 +1,13 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+sharedlibdir=${libdir}
+includedir=${prefix}/include
+
+Name: zlib
+Description: zlib compression library
+Version: 1.2.5
+
+Requires:
+Libs: -L${libdir} -L${sharedlibdir} -lz
+Cflags: -I${includedir} | true |
Other | Homebrew | brew | 7727c7764c9941bbe78c342dbe5b3c1a57ac5cd6.json | hardware: prettify config output on 6/8-core CPUs (#313) | Library/Homebrew/hardware.rb | @@ -55,6 +55,8 @@ def self.cores_as_words
when 1 then "single"
when 2 then "dual"
when 4 then "quad"
+ when 6 then "hexa"
+ when 8 then "octa"
else
Hardware::CPU.cores
end | false |
Other | Homebrew | brew | 8a70b000e55dbeadf2372b1c75360ca837219605.json | tests: fix problems in 'log with formula' test (#350)
Problems fixed:
- Broken and leaking test if run as part of `brew tests --coverage` due
to the `cmd` call being nested in the `Pathname#cd` block.
- Output during `git clone` operation because of a missing `shutup do`.
- Still incomplete coverage for `cmd/l... | Library/Homebrew/test/test_integration_cmds.rb | @@ -717,19 +717,20 @@ class Testball < Formula
end
end
- homebrew_core_clone = Pathname.new core_tap.path.dirname/"homebrew-core-clone"
- shallow = Pathname.new homebrew_core_clone/".git/shallow"
-
- (core_tap.path.dirname).cd do
- system "git", "clone", "--depth=1", "file://#{core_tap.path}... | false |
Other | Homebrew | brew | 86538c9d6ac6fb898a6b2bba30239acc5eabf96c.json | tests: simplify SimpleCov configuration (#348)
There is no good reason to configure the options specific to integration
tests in a completely different location from all other options. | Library/Homebrew/test/.simplecov | @@ -13,9 +13,17 @@ SimpleCov.start do
add_filter "Homebrew/vendor/"
add_filter "Taps/"
- # Not using this during integration tests makes the tests 4x times faster
- # without changing the coverage.
- unless ENV["HOMEBREW_INTEGRATION_TEST"]
+ if ENV["HOMEBREW_INTEGRATION_TEST"]
+ command_name ENV["HOMEBRE... | false |
Other | Homebrew | brew | 92f51abf597db6323bbc3ffa6eac99fb22336f32.json | tests: avoid compat code in --no-compat mode (#347)
Simply drop because the `require`s are not actually used by the tests
and no file from `compat/` should be loaded unconditionally. (This can
otherwise lead to incorrect results for `brew tests --no-compat`.) | Library/Homebrew/test/test_formula_installer.rb | @@ -1,6 +1,5 @@
require "testing_env"
require "formula"
-require "compat/formula_specialties"
require "formula_installer"
require "keg"
require "tab" | true |
Other | Homebrew | brew | 92f51abf597db6323bbc3ffa6eac99fb22336f32.json | tests: avoid compat code in --no-compat mode (#347)
Simply drop because the `require`s are not actually used by the tests
and no file from `compat/` should be loaded unconditionally. (This can
otherwise lead to incorrect results for `brew tests --no-compat`.) | Library/Homebrew/test/test_formula_installer_bottle.rb | @@ -1,6 +1,5 @@
require "testing_env"
require "formula"
-require "compat/formula_specialties"
require "formula_installer"
require "keg"
require "tab" | true |
Other | Homebrew | brew | 01b514f57a01293c770b6dc63b17c838ff34ce0c.json | tests: add test bottle for Sierra
Fixes:
```
1) Error:
FormularyFactoryTest#test_factory_from_bottle:
Errno::ENOENT: No such file or directory - /usr/local/Library/Homebrew/test/bottles/testball_bottle-0.1.sierra.bottle.tar.gz
/usr/local/Library/Homebrew/formulary.rb:98:in `realpath'
/usr/local/Library/Home... | Library/Homebrew/test/bottles/testball_bottle-0.1.sierra.bottle.tar.gz | @@ -0,0 +1 @@
+testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file | false |
Other | Homebrew | brew | 425eedf43e7e6171f18e42f1d43c400bea3b0d02.json | xcode: expect 8.0 on macOS 10.12
Closes #357.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com> | Library/Homebrew/os/mac/xcode.rb | @@ -16,10 +16,11 @@ def latest_version
when "10.9" then "6.2"
when "10.10" then "7.2.1"
when "10.11" then "7.3.1"
+ when "10.12" then "8.0"
else
# Default to newest known version of Xcode for unreleased OSX versions.
if OS::Mac.prerelease?
- "... | false |
Other | Homebrew | brew | 1c46db9a73e6d0fa56d0a83db2ed04a1d62837b4.json | os/mac/version: add macOS Sierra. (#353) | Library/Homebrew/os/mac/version.rb | @@ -4,6 +4,7 @@ module OS
module Mac
class Version < ::Version
SYMBOLS = {
+ :sierra => "10.12",
:el_capitan => "10.11",
:yosemite => "10.10",
:mavericks => "10.9", | false |
Other | Homebrew | brew | e9cc2a5d88da6d1719763a26c1fc455c51e2c3db.json | Add "build_dependencies" key to JSON output (#340)
This gives the JSON output the same type of information as
`recommended_dependencies` or `optional_dependencies`, but for those
marked `:build` in the formula. | Library/Homebrew/formula.rb | @@ -1256,6 +1256,7 @@ def to_hash
"dependencies" => deps.map(&:name).uniq,
"recommended_dependencies" => deps.select(&:recommended?).map(&:name).uniq,
"optional_dependencies" => deps.select(&:optional?).map(&:name).uniq,
+ "build_dependencies" => deps.select(&:build?).map(&:name).uniq,
... | false |
Other | Homebrew | brew | 11d47e8325f50ab7993f3fca0432876da0ea1c11.json | boneyard-formula-pr: add new command.
Add a new developer command (i.e., requires `HOMEBREW_DEVELOPER` set in
your environment) to "boneyard" a formula, by creating one pull request
removing the formula from its current tap and updating (or creating)
tap_migrations.json, and another pull request importing the formula ... | Library/Homebrew/dev-cmd/boneyard-formula-pr.rb | @@ -0,0 +1,136 @@
+# Creates a pull request to boneyard a formula.
+#
+# Usage: brew boneyard-formula-pr [options...] <formula-name>
+#
+# Options:
+# --dry-run: Print what would be done rather than doing it.
+
+require "formula"
+require "utils/json"
+require "fileutils"
+
+begin
+ require "json"
+rescue LoadError... | false |
Other | Homebrew | brew | 8d64b6a02d78811f50d5f747ce10df09d54b4791.json | introduce global lock directory (#337)
Since #292, HOMEBREW_CACHE was moved to a per-user directory. This makes
it unsuitable to store global lock files on multiple users environment.
Therefore, introducing a global lock directory `/Library/Lock.d` to
store lock files from formula lockers as well as `brew update`... | .gitignore | @@ -15,6 +15,7 @@
/Library/Homebrew/test/coverage
/Library/Homebrew/test/fs_leak_log
/Library/LinkedKegs
+/Library/Locks
/Library/PinnedKegs
/Library/PinnedTaps
/Library/Taps | true |
Other | Homebrew | brew | 8d64b6a02d78811f50d5f747ce10df09d54b4791.json | introduce global lock directory (#337)
Since #292, HOMEBREW_CACHE was moved to a per-user directory. This makes
it unsuitable to store global lock files on multiple users environment.
Therefore, introducing a global lock directory `/Library/Lock.d` to
store lock files from formula lockers as well as `brew update`... | Library/Homebrew/cleanup.rb | @@ -106,9 +106,9 @@ def self.cleanup_path(path)
end
def self.cleanup_lockfiles
- return unless HOMEBREW_CACHE_FORMULA.directory?
- candidates = HOMEBREW_CACHE_FORMULA.children
- lockfiles = candidates.select { |f| f.file? && f.extname == ".brewing" }
+ return unless HOMEBREW_LOCK_DIR.di... | true |
Other | Homebrew | brew | 8d64b6a02d78811f50d5f747ce10df09d54b4791.json | introduce global lock directory (#337)
Since #292, HOMEBREW_CACHE was moved to a per-user directory. This makes
it unsuitable to store global lock files on multiple users environment.
Therefore, introducing a global lock directory `/Library/Lock.d` to
store lock files from formula lockers as well as `brew update`... | Library/Homebrew/config.rb | @@ -1,7 +1,7 @@
HOMEBREW_CACHE = Pathname.new(ENV["HOMEBREW_CACHE"] || "~/Library/Caches/Homebrew").expand_path
# Where brews installed via URL are cached
-HOMEBREW_CACHE_FORMULA = HOMEBREW_CACHE+"Formula"
+HOMEBREW_CACHE_FORMULA = HOMEBREW_CACHE/"Formula"
if ENV["HOMEBREW_BREW_FILE"]
HOMEBREW_BREW_FILE = Pat... | true |
Other | Homebrew | brew | 8d64b6a02d78811f50d5f747ce10df09d54b4791.json | introduce global lock directory (#337)
Since #292, HOMEBREW_CACHE was moved to a per-user directory. This makes
it unsuitable to store global lock files on multiple users environment.
Therefore, introducing a global lock directory `/Library/Lock.d` to
store lock files from formula lockers as well as `brew update`... | Library/Homebrew/formula_lock.rb | @@ -1,7 +1,7 @@
require "fcntl"
class FormulaLock
- LOCKDIR = HOMEBREW_CACHE_FORMULA
+ LOCKDIR = HOMEBREW_LOCK_DIR
def initialize(name)
@name = name | true |
Other | Homebrew | brew | 8d64b6a02d78811f50d5f747ce10df09d54b4791.json | introduce global lock directory (#337)
Since #292, HOMEBREW_CACHE was moved to a per-user directory. This makes
it unsuitable to store global lock files on multiple users environment.
Therefore, introducing a global lock directory `/Library/Lock.d` to
store lock files from formula lockers as well as `brew update`... | Library/Homebrew/test/lib/config.rb | @@ -18,6 +18,7 @@
HOMEBREW_LOAD_PATH = [File.expand_path("..", __FILE__), HOMEBREW_LIBRARY_PATH].join(":")
HOMEBREW_CACHE = HOMEBREW_PREFIX.parent+"cache"
HOMEBREW_CACHE_FORMULA = HOMEBREW_PREFIX.parent+"formula_cache"
+HOMEBREW_LOCK_DIR = HOMEBREW_PREFIX.parent+"locks"
HOMEBREW_CELLAR = HOM... | true |
Other | Homebrew | brew | 8d64b6a02d78811f50d5f747ce10df09d54b4791.json | introduce global lock directory (#337)
Since #292, HOMEBREW_CACHE was moved to a per-user directory. This makes
it unsuitable to store global lock files on multiple users environment.
Therefore, introducing a global lock directory `/Library/Lock.d` to
store lock files from formula lockers as well as `brew update`... | Library/Homebrew/test/testing_env.rb | @@ -7,7 +7,7 @@
# Test environment setup
(HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-core/Formula").mkpath
-%w[cache formula_cache cellar logs].each { |d| HOMEBREW_PREFIX.parent.join(d).mkpath }
+%w[cache formula_cache locks cellar logs].each { |d| HOMEBREW_PREFIX.parent.join(d).mkpath }
# Test fixtures and files ... | true |
Other | Homebrew | brew | 8d64b6a02d78811f50d5f747ce10df09d54b4791.json | introduce global lock directory (#337)
Since #292, HOMEBREW_CACHE was moved to a per-user directory. This makes
it unsuitable to store global lock files on multiple users environment.
Therefore, introducing a global lock directory `/Library/Lock.d` to
store lock files from formula lockers as well as `brew update`... | Library/Homebrew/utils/lock.sh | @@ -3,7 +3,9 @@
# Noted due to the fixed FD, a shell process can only create one lock.
lock() {
local name="$1"
- local lock_file="/tmp/homebrew${HOMEBREW_REPOSITORY//\//-}-${name}.lock"
+ local lock_dir="$HOMEBREW_LIBRARY/Locks"
+ local lock_file="$lock_dir/$name"
+ [[ -d "$lock_dir" ]] || mkdir -p "$lock_dir... | true |
Other | Homebrew | brew | 21ca138edf584daebf1795a52d6edd6ec34ce605.json | Resource.unpack: install invisible files and dirs
Since patches sometimes change .gitignore and .travis.yml, it's
desirable to install them along with everything else if a resource needs
patching. Also, for resources that are git respositories, this allows
install to interact with git objects other than the commit spe... | Library/Homebrew/resource.rb | @@ -98,7 +98,7 @@ def unpack(target = nil)
yield ResourceStageContext.new(self, staging)
elsif target
target = Pathname.new(target) unless target.is_a? Pathname
- target.install Dir["*"]
+ target.install Pathname.pwd.children
end
end
end | false |
Other | Homebrew | brew | af42deca4ab70816216ffc060f3aa8f55e469cac.json | audit: detect more 'pkgshare' candidates (#328)
The new check also allows the `+` operator instead of our (still heavily
preferred) `/` operator for path concatenation and also triggers if the
operator is surrounded by whitespace.
Also recognizes single-quoted strings and uses a back reference to
match the closi... | Library/Homebrew/cmd/audit.rb | @@ -919,8 +919,8 @@ def audit_line(line, lineno)
problem "Use \#{pkgshare} instead of \#{share}/#{formula.name}"
end
- if line =~ %r{share/"#{Regexp.escape(formula.name)}[/'"]}
- problem "Use pkgshare instead of (share/\"#{formula.name}\")"
+ if line =~ %r{share(\s*[/+]\s*)(['"])#{Reg... | false |
Other | Homebrew | brew | 2cd81e50513f96a657454031e52fa4aec773ea97.json | update: pop the stash more quietly
git stash pop -q will print "Already up-to-date!" if untracked changes
are being poppped. This quiets it down unless verbose is set.
Closes #320.
Signed-off-by: ilovezfs <ilovezfs@icloud.com> | Library/Homebrew/cmd/update.sh | @@ -95,11 +95,13 @@ read_current_revision() {
pop_stash() {
[[ -z "$STASHED" ]] && return
- git stash pop "${QUIET_ARGS[@]}"
if [[ -n "$HOMEBREW_VERBOSE" ]]
then
+ git stash pop
echo "Restoring your stashed changes to $DIR:"
git status --short --untracked-files
+ else
+ git stash pop "${QU... | false |
Other | Homebrew | brew | d363ae53c08abd7e658a0124e7d3bb79d38a1f08.json | doc/External-Commands: update default HOMEBREW_CACHE (#316) | share/doc/homebrew/External-Commands.md | @@ -27,7 +27,7 @@ A shell script for an command named `extcmd` should be named `brew-extcmd`. This
</tr>
<tr>
<td>HOMEBREW_CACHE</td>
- <td>Where Homebrew caches downloaded tarballs to, typically <code>/Library/Caches/Homebrew</code>. </td>
+ <td>Where Homebrew caches downloaded tarballs to, by default <cod... | false |
Other | Homebrew | brew | 656c713d6c549a1ae1dc25cdc1f9bb887dfd8440.json | bottle: use short formula name in bottle commit | Library/Homebrew/cmd/bottle.rb | @@ -427,11 +427,12 @@ def merge
end
unless ARGV.include? "--no-commit"
+ short_name = formula_name.split("/", -1).last
pkg_version = bottle_hash["formula"]["pkg_version"]
path.parent.cd do
safe_system "git", "commit", "--no-edit", "--verbose",
- ... | false |
Other | Homebrew | brew | b2c9625d780277f021c63e21cac4a7c954170784.json | formula_installer: accumulate inherited options
When a given dependency appears multiple times in a formula's dependency
tree, the inherited options for that dependency should accumulate rather
than being overwritten each time that dependency is considered by
expand_dependencies. In particular, this impacts "universal... | Library/Homebrew/formula_installer.rb | @@ -341,10 +341,10 @@ def expand_requirements
end
def expand_dependencies(deps)
- inherited_options = {}
+ inherited_options = Hash.new { |hash, key| hash[key] = Options.new }
expanded_deps = Dependency.expand(formula, deps) do |dependent, dep|
- options = inherited_options[dep.name] = inherit... | false |
Other | Homebrew | brew | 5b1372e7587e5b1ea34301111d05685d773de728.json | README: add 1Password for Teams. | README.md | @@ -56,6 +56,10 @@ Our bottles (binary packages) are hosted by Bintray.
[](https://bintray.com/homebrew)
+Secure password storage and syncing provided by [1Password for Teams](https://1password.com/teams/) by AgileBits
+
+[![AgileB... | false |
Other | Homebrew | brew | d2cdbcbb18aaf667077eb46c2abc2cfd8690f919.json | tests: add missing require
Amends e4d0187120e61bc80d31ebecc3b38f0740b20bb5. The `require` was
accidentally omitted causing the tests to fail very sporadically (or
always, when invoked as `brew tests --only=integration_cmds`). | Library/Homebrew/test/test_integration_cmds.rb | @@ -2,6 +2,7 @@
require "testing_env"
require "fileutils"
require "pathname"
+require "formula"
class IntegrationCommandTests < Homebrew::TestCase
def setup | false |
Other | Homebrew | brew | 4da713dd9a8538588b763cc99a31c165f6b434a3.json | xquartz: expect 2.7.9 on 10.6-10.11 (#307) | Library/Homebrew/os/mac/xquartz.rb | @@ -23,7 +23,8 @@ module XQuartz
"2.7.54" => "2.7.5",
"2.7.61" => "2.7.6",
"2.7.73" => "2.7.7",
- "2.7.86" => "2.7.8"
+ "2.7.86" => "2.7.8",
+ "2.7.94" => "2.7.9",
}.freeze
# This returns the version number of XQuartz, not of the upstream X.org.
@@ -50,7 +... | false |
Other | Homebrew | brew | a9abbab9175379d990d49d06341c14579db92bb2.json | Move HOMEBREW_CACHE to ~/Library/Caches (#292)
* cleanup: accept cache as an argument.
* config: move default HOMEBREW_CACHE to ~/Library.
* brew.1: document new default Homebrew cache.
* update-report: migrate legacy Homebrew cache. | Library/Homebrew/cleanup.rb | @@ -43,9 +43,9 @@ def self.cleanup_cellar
end
end
- def self.cleanup_cache
- return unless HOMEBREW_CACHE.directory?
- HOMEBREW_CACHE.children.each do |path|
+ def self.cleanup_cache(cache=HOMEBREW_CACHE)
+ return unless cache.directory?
+ cache.children.each do |path|
i... | true |
Other | Homebrew | brew | a9abbab9175379d990d49d06341c14579db92bb2.json | Move HOMEBREW_CACHE to ~/Library/Caches (#292)
* cleanup: accept cache as an argument.
* config: move default HOMEBREW_CACHE to ~/Library.
* brew.1: document new default Homebrew cache.
* update-report: migrate legacy Homebrew cache. | Library/Homebrew/cmd/update-report.rb | @@ -2,6 +2,7 @@
require "migrator"
require "formulary"
require "descriptions"
+require "cleanup"
module Homebrew
def update_preinstall_header
@@ -69,6 +70,8 @@ def update_report
updated = true
end
+ migrate_legacy_cache_if_necessary
+
if !updated
if !ARGV.include?("--preinstall") &... | true |
Other | Homebrew | brew | a9abbab9175379d990d49d06341c14579db92bb2.json | Move HOMEBREW_CACHE to ~/Library/Caches (#292)
* cleanup: accept cache as an argument.
* config: move default HOMEBREW_CACHE to ~/Library.
* brew.1: document new default Homebrew cache.
* update-report: migrate legacy Homebrew cache. | Library/Homebrew/config.rb | @@ -1,27 +1,4 @@
-def cache
- if ENV["HOMEBREW_CACHE"]
- Pathname.new(ENV["HOMEBREW_CACHE"]).expand_path
- else
- # we do this for historic reasons, however the cache *should* be the same
- # directory whichever user is used and whatever instance of brew is executed
- home_cache = Pathname.new("~/Library/... | true |
Other | Homebrew | brew | a9abbab9175379d990d49d06341c14579db92bb2.json | Move HOMEBREW_CACHE to ~/Library/Caches (#292)
* cleanup: accept cache as an argument.
* config: move default HOMEBREW_CACHE to ~/Library.
* brew.1: document new default Homebrew cache.
* update-report: migrate legacy Homebrew cache. | Library/Homebrew/manpages/brew.1.md.erb | @@ -118,8 +118,7 @@ can take several different forms:
* `HOMEBREW_CACHE`:
If set, instructs Homebrew to use the given directory as the download cache.
- *Default:* `~/Library/Caches/Homebrew` if it exists; otherwise,
- `/Library/Caches/Homebrew`.
+ *Default:* `~/Library/Caches/Homebrew`.
* `HOME... | true |
Other | Homebrew | brew | a9abbab9175379d990d49d06341c14579db92bb2.json | Move HOMEBREW_CACHE to ~/Library/Caches (#292)
* cleanup: accept cache as an argument.
* config: move default HOMEBREW_CACHE to ~/Library.
* brew.1: document new default Homebrew cache.
* update-report: migrate legacy Homebrew cache. | share/doc/homebrew/brew.1.html | @@ -523,8 +523,7 @@ <h2 id="ENVIRONMENT">ENVIRONMENT</h2>
using this environment variable.</p></dd>
<dt><code>HOMEBREW_CACHE</code></dt><dd><p>If set, instructs Homebrew to use the given directory as the download cache.</p>
-<p><em>Default:</em> <code>~/Library/Caches/Homebrew</code> if it exists; otherwise,
-<code... | true |
Other | Homebrew | brew | a9abbab9175379d990d49d06341c14579db92bb2.json | Move HOMEBREW_CACHE to ~/Library/Caches (#292)
* cleanup: accept cache as an argument.
* config: move default HOMEBREW_CACHE to ~/Library.
* brew.1: document new default Homebrew cache.
* update-report: migrate legacy Homebrew cache. | share/man/man1/brew.1 | @@ -720,7 +720,7 @@ If set, instructs Homebrew to compile from source even when a formula provides a
If set, instructs Homebrew to use the given directory as the download cache\.
.
.IP
-\fIDefault:\fR \fB~/Library/Caches/Homebrew\fR if it exists; otherwise, \fB/Library/Caches/Homebrew\fR\.
+\fIDefault:\fR \fB~/Libra... | true |
Other | Homebrew | brew | 8486f6e04d46323e3e17a71c4c8b3ce948d35bae.json | Prefer $stderr over STDERR for consistency (#304)
Prior to this change there were only 3 instances of `STD(IN|OUT|ERR)`
versus 74 instances of `$std(in|out|err)` in the Homebrew code base. The
latter variant is also strongly suggested by bbatsov's Ruby Style Guide. | Library/Homebrew/formulary.rb | @@ -86,7 +86,7 @@ def klass
private
def load_file
- STDERR.puts "#{$0} (#{self.class.name}): loading #{path}" if ARGV.debug?
+ $stderr.puts "#{$0} (#{self.class.name}): loading #{path}" if ARGV.debug?
raise FormulaUnavailableError.new(name) unless path.file?
Formulary.load_formula_fr... | true |
Other | Homebrew | brew | 8486f6e04d46323e3e17a71c4c8b3ce948d35bae.json | Prefer $stderr over STDERR for consistency (#304)
Prior to this change there were only 3 instances of `STD(IN|OUT|ERR)`
versus 74 instances of `$std(in|out|err)` in the Homebrew code base. The
latter variant is also strongly suggested by bbatsov's Ruby Style Guide. | Library/Homebrew/utils/popen.rb | @@ -20,7 +20,7 @@ def self.popen(args, mode)
return pipe.read
end
else
- STDERR.reopen("/dev/null", "w")
+ $stderr.reopen("/dev/null", "w")
exec(*args)
end
end | true |
Other | Homebrew | brew | 8e728d6604720b75e1442e9c2ed5f10b780b58a4.json | style: unify indentation in RuboCop configuration
Some elements already used two-space indentation and we also prefer two
spaces in our Ruby code.
Closes #306.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de> | Library/.rubocop.yml | @@ -5,111 +5,111 @@ AllCops:
# 1.8-style hash keys
Style/HashSyntax:
- EnforcedStyle: hash_rockets
+ EnforcedStyle: hash_rockets
# ruby style guide favorite
Style/StringLiterals:
- EnforcedStyle: double_quotes
+ EnforcedStyle: double_quotes
# consistency with above
Style/StringLiteralsInInterpolatio... | false |
Other | Homebrew | brew | 8b97a00036124da6a0bcc23dbd76c411600b2377.json | style: use RuboCop 0.40 | Library/Homebrew/cmd/style.rb | @@ -47,7 +47,7 @@ def check_style_json(files, options = {})
def check_style_impl(files, output_type, options = {})
fix = options[:fix]
- Homebrew.install_gem_setup_path! "rubocop", "0.39"
+ Homebrew.install_gem_setup_path! "rubocop", "0.40"
args = %W[
--force-exclusion | false |
Other | Homebrew | brew | 331fdba29d9364ba20e99e1fa8db074ac482ca9c.json | audit: prefer https/s over ftp where known available
The FTP protocol is prone to getting firewalled to death in places, so where
we know we can avoid that by using either secure or more commonly accepted
protocols let's do so.
Examples of output:
```
* Stable: ftp://ftp.cpan.org/pub/CPAN/authors/id/N/NE/NEILB/Time-... | Library/Homebrew/cmd/audit.rb | @@ -1175,6 +1175,16 @@ def audit_urls
end
end
+ # Prefer HTTP/S when possible over FTP protocol due to possible firewalls.
+ urls.each do |p|
+ case p
+ when %r{^ftp://ftp\.mirrorservice\.org}
+ problem "Please use https:// for #{p}"
+ when %r{^ftp://ftp\.cpan\.org/pub/CPAN(.*)... | false |
Other | Homebrew | brew | 7dad182ed1f457258d9fd6f7a10e880669d8a268.json | Bottle: remove local installation instructions.
These aren't targeted at end users. | share/doc/homebrew/Bottles.md | @@ -6,9 +6,6 @@ If a bottle is available and usable it will be downloaded and poured automatical
Bottles will not be used if the user requests it (see above), if the formula requests it (with `pour_bottle?`), if any options are specified on installation (bottles are all compiled with default options), if the bottle ... | false |
Other | Homebrew | brew | f946693b561bae7f065d06776751a19d199f7031.json | test-bot: remove support for legacy Homebrew repo. (#287)
We're not really getting any more PRs here and this code makes this file
harder to follow and refactor. | Library/Homebrew/cmd/test-bot.rb | @@ -11,8 +11,6 @@
# --junit: Generate a JUnit XML test results file.
# --no-bottle: Run brew install without --build-bottle.
# --keep-old: Run brew bottle --keep-old to build new bottles for a single platform.
-# --legacy Build formula from legacy Homebrew/legacy-homebrew repo.
-# ... | false |
Other | Homebrew | brew | 6ba466f5d858c5e6f9d162c11ec03134df6e686e.json | Use JSON files for bottle upload data. (#166)
This means that we do not need to read formulae or evaluate Ruby at
upload time. | Library/Homebrew/cmd/bottle.rb | @@ -281,7 +281,8 @@ def bottle_formula(f)
bottle.prefix prefix
end
bottle.revision bottle_revision
- bottle.sha256 bottle_path.sha256 => Utils::Bottles.tag
+ sha256 = bottle_path.sha256
+ bottle.sha256 sha256 => Utils::Bottles.tag
old_spec = f.bottle_specification
if ARGV.include?(... | true |
Other | Homebrew | brew | 6ba466f5d858c5e6f9d162c11ec03134df6e686e.json | Use JSON files for bottle upload data. (#166)
This means that we do not need to read formulae or evaluate Ruby at
upload time. | Library/Homebrew/cmd/pull.rb | @@ -119,7 +119,7 @@ def pull
end
patch_puller.apply_patch
- changed_formulae = []
+ changed_formulae_names = []
if tap
Utils.popen_read(
@@ -128,7 +128,7 @@ def pull
).each_line do |line|
name = "#{tap.name}/#{File.basename(line.chomp, ".rb")}"
... | true |
Other | Homebrew | brew | 6ba466f5d858c5e6f9d162c11ec03134df6e686e.json | Use JSON files for bottle upload data. (#166)
This means that we do not need to read formulae or evaluate Ruby at
upload time. | Library/Homebrew/cmd/test-bot.rb | @@ -114,7 +114,7 @@ def log_file_path
end
def command_short
- (@command - %w[brew --force --retry --verbose --build-bottle --rb]).join(" ")
+ (@command - %w[brew --force --retry --verbose --build-bottle --json]).join(" ")
end
def passed?
@@ -570,15 +570,15 @@ def formula(formula_name)
... | true |
Other | Homebrew | brew | 6ba466f5d858c5e6f9d162c11ec03134df6e686e.json | Use JSON files for bottle upload data. (#166)
This means that we do not need to read formulae or evaluate Ruby at
upload time. | Library/Homebrew/formulary.rb | @@ -16,6 +16,10 @@ def self.formula_class_get(path)
end
def self.load_formula(name, path, contents, namespace)
+ if ENV["HOMEBREW_DISABLE_LOAD_FORMULA"]
+ raise "Formula loading disabled by HOMEBREW_DISABLE_LOAD_FORMULA!"
+ end
+
mod = Module.new
const_set(namespace, mod)
mod.module_ev... | true |
Other | Homebrew | brew | 9cf2710dc95f1c81e8c5111e22681836225e32e2.json | os/mac/*_mach: move shared code into 'SharedMachO' (#282)
Both the `CctoolsMachO` and `RubyMachO` module implement a common set of
methods that simplify querying `mach_data`. Move these into a shared
module, that gets included after either of these implementations is
loaded and included in `Pathname`. | Library/Homebrew/os/mac/cctools_mach.rb | @@ -1,5 +1,3 @@
-require "os/mac/architecture_list"
-
module CctoolsMachO
# @private
OTOOL_RX = /\t(.*) \(compatibility version (?:\d+\.)*\d+, current version (?:\d+\.)*\d+\)/
@@ -54,53 +52,6 @@ def mach_data
end
end
- def archs
- mach_data.map { |m| m.fetch :arch }.extend(ArchitectureListExtension... | true |
Other | Homebrew | brew | 9cf2710dc95f1c81e8c5111e22681836225e32e2.json | os/mac/*_mach: move shared code into 'SharedMachO' (#282)
Both the `CctoolsMachO` and `RubyMachO` module implement a common set of
methods that simplify querying `mach_data`. Move these into a shared
module, that gets included after either of these implementations is
loaded and included in `Pathname`. | Library/Homebrew/os/mac/pathname.rb | @@ -1,3 +1,5 @@
+require "os/mac/shared_mach"
+
class Pathname
if ENV["HOMEBREW_RUBY_MACHO"]
require "os/mac/ruby_mach"
@@ -6,4 +8,6 @@ class Pathname
require "os/mac/cctools_mach"
include CctoolsMachO
end
+
+ include SharedMachO
end | true |
Other | Homebrew | brew | 9cf2710dc95f1c81e8c5111e22681836225e32e2.json | os/mac/*_mach: move shared code into 'SharedMachO' (#282)
Both the `CctoolsMachO` and `RubyMachO` module implement a common set of
methods that simplify querying `mach_data`. Move these into a shared
module, that gets included after either of these implementations is
loaded and included in `Pathname`. | Library/Homebrew/os/mac/ruby_mach.rb | @@ -1,5 +1,4 @@
require "vendor/macho/macho"
-require "os/mac/architecture_list"
module RubyMachO
# @private
@@ -54,53 +53,6 @@ def mach_data
end
end
- def archs
- mach_data.map { |m| m.fetch :arch }.extend(ArchitectureListExtension)
- end
-
- def arch
- case archs.length
- when 0 then :dun... | true |
Other | Homebrew | brew | 9cf2710dc95f1c81e8c5111e22681836225e32e2.json | os/mac/*_mach: move shared code into 'SharedMachO' (#282)
Both the `CctoolsMachO` and `RubyMachO` module implement a common set of
methods that simplify querying `mach_data`. Move these into a shared
module, that gets included after either of these implementations is
loaded and included in `Pathname`. | Library/Homebrew/os/mac/shared_mach.rb | @@ -0,0 +1,50 @@
+require "os/mac/architecture_list"
+
+module SharedMachO
+ def archs
+ mach_data.map { |m| m.fetch :arch }.extend(ArchitectureListExtension)
+ end
+
+ def arch
+ case archs.length
+ when 0 then :dunno
+ when 1 then archs.first
+ else :universal
+ end
+ end
+
+ def universal?
+ ... | true |
Other | Homebrew | brew | 78f8c60343b514ee7129cf3c86f216460a4ed3ab.json | tests: fix external command test and code style (#281)
The check that `t4` is not an external command would always succeed, but
not because the file wasn't executable, but because it wasn't even found
due to the missing `brew-` prefix.
Also change the valid but atypical file mode from 0744 to 0755 and apply
mino... | Library/Homebrew/test/test_commands.rb | @@ -19,7 +19,7 @@ def setup
end
def teardown
- @cmds.each { |f| f.unlink }
+ @cmds.each(&:unlink)
end
def test_internal_commands
@@ -43,12 +43,12 @@ def test_external_commands
%w[brew-t1 brew-t2.rb brew-t3.py].each do |file|
path = "#{dir}/#{file}"
FileUtils.touch path
- ... | false |
Other | Homebrew | brew | 1c581a232cb59bea25d5cb3a4d4885854938ccb8.json | search: add alias -S back to zero-argument help
Amends 132ada2b0ebb3751c0f8f42ca83bb257b55a50fd until we properly figure
out a way of documenting built-in aliases (or not doing that) across all
commands that currently have aliases. See #270 for full discussion. | Library/Homebrew/cmd/search.rb | @@ -1,4 +1,4 @@
-#: * `search`:
+#: * `search`, `-S`:
#: Display all locally available formulae for brewing (including tapped ones).
#: No online search is performed if called without arguments.
#: | true |
Other | Homebrew | brew | 1c581a232cb59bea25d5cb3a4d4885854938ccb8.json | search: add alias -S back to zero-argument help
Amends 132ada2b0ebb3751c0f8f42ca83bb257b55a50fd until we properly figure
out a way of documenting built-in aliases (or not doing that) across all
commands that currently have aliases. See #270 for full discussion. | share/doc/homebrew/brew.1.html | @@ -314,7 +314,7 @@ <h2 id="COMMANDS">COMMANDS</h2>
<p>If <code>--dry-run</code> or <code>-n</code> is passed, show what would be removed, but do not
actually remove anything.</p></dd>
<dt><code>reinstall</code> <var>formula</var></dt><dd><p>Uninstall then install <var>formula</var></p></dd>
-<dt class="flush"><code... | true |
Other | Homebrew | brew | 1c581a232cb59bea25d5cb3a4d4885854938ccb8.json | search: add alias -S back to zero-argument help
Amends 132ada2b0ebb3751c0f8f42ca83bb257b55a50fd until we properly figure
out a way of documenting built-in aliases (or not doing that) across all
commands that currently have aliases. See #270 for full discussion. | share/man/man1/brew.1 | @@ -426,7 +426,7 @@ If \fB\-\-dry\-run\fR or \fB\-n\fR is passed, show what would be removed, but do
Uninstall then install \fIformula\fR
.
.TP
-\fBsearch\fR
+\fBsearch\fR, \fB\-S\fR
Display all locally available formulae for brewing (including tapped ones)\. No online search is performed if called without argument... | true |
Other | Homebrew | brew | 75ab94c8ea8940f1609e62d23d45d8729dd4a83f.json | CurlDownloadStrategy: move no insecure redirect check to _fetch
This mainly fixes the problems for subclasses of CurlDownloadStrategy.
More specifically it fixes two things:
* It allows the no insecure redirect check to be applied to
CurlApacheMirrorDownloadStrategy.
* It fixes previous broken CurlPostDownloadStr... | Library/Homebrew/download_strategy.rb | @@ -284,17 +284,6 @@ def fetch
ohai "Downloading #{@url}"
unless cached_location.exist?
- urls = actual_urls
- unless urls.empty?
- ohai "Downloading from #{urls.last}"
- if !ENV["HOMEBREW_NO_INSECURE_REDIRECT"].nil? && @url.start_with?("https://") &&
- urls.any? { |u| !u.s... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.