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 | 316d8d756cb7a466060fd1f61d1b789956d064d7.json | Reduce scope of ensure block, remove conditionals | Library/Homebrew/extend/fileutils.rb | @@ -14,14 +14,17 @@ def mktemp(prefix=name)
# /tmp volume to the other volume. So we let the user override the tmp
# prefix if they need to.
- tempd = with_system_path { `mktemp -d #{HOMEBREW_TEMP}/#{prefix}-XXXXXX` }.chuzzle
- raise "Failed to create sandbox" if tempd.nil?
+ tempd = with_system_pa... | false |
Other | Homebrew | brew | f3e4b563d40335586a1de1d6bc6c36b48255b71e.json | Remove fish completion
fish already ships more comprehensive completions which are enabled by
default.
Closes Homebrew/homebrew#37582. | Library/Contributions/brew_fish_completion.fish | @@ -1,160 +0,0 @@
-# fish (http://fishshell.org) completion script for brew(1)
-# To install, symlink into (brew --prefix)/share/fish/completions
-# or ~/.config/fish/completions with the name 'brew.fish'
-# e.g.:
-# mkdir -p ~/.config/fish/completions
-# ln -s (brew --prefix)/Library/Contributions/brew_fish_comple... | false |
Other | Homebrew | brew | 511c92158159843b15e33b05a2659b46a0f76a94.json | Move dbslayer to the boneyard
Closes Homebrew/homebrew#37056.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/tap_migrations.rb | @@ -27,6 +27,7 @@
"curlftpfs" => "homebrew/x11",
"cwm" => "homebrew/x11",
"dart" => "dart-lang/dart",
+ "dbslayer" => "homebrew/boneyard",
"ddd" => "homebrew/x11",
"denyhosts" => "homebrew/boneyard",
"dmenu" => "homebrew/x11", | false |
Other | Homebrew | brew | 68a8d1a5e7abe6a572e2973c244dfeeb49cfb289.json | test-bot: check syntax with readall.
Closes Homebrew/homebrew#37471.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/test-bot.rb | @@ -505,7 +505,7 @@ def formula formula_name
def homebrew
@category = __method__
test "brew", "tests"
- test "brew", "readall"
+ test "brew", "readall", "--syntax"
end
def cleanup_before | false |
Other | Homebrew | brew | fb993934220bb2af300b6f8789a2c598165ed4c5.json | test-bot: fix ambiguous arguments. | Library/Homebrew/cmd/test-bot.rb | @@ -617,7 +617,7 @@ def test_bot
tap ||= bot_argv.value('tap')
end
- tap.gsub! /homebrew\/homebrew-/i, "Homebrew/" if tap
+ tap.gsub!(/homebrew\/homebrew-/i, "Homebrew/") if tap
git_url = ENV['UPSTREAM_GIT_URL'] || ENV['GIT_URL']
if !tap && git_url | false |
Other | Homebrew | brew | 36b7bae93cedfa59cba797f7ad3bdcdced700fb7.json | test-bot: remove unused variables. | Library/Homebrew/cmd/test-bot.rb | @@ -457,7 +457,6 @@ def formula formula_name
if formula.stable? && !ARGV.include?('--no-bottle')
bottle_args = ["--rb", canonical_formula_name]
if @tap
- tap_user, tap_repo = @tap.split "/"
bottle_args << "--root-url=#{BottleSpecification::DEFAULT_DOMAIN}/#{Bintray... | false |
Other | Homebrew | brew | 95a8a50aa0d968f6ab762bef7ca9f78bb7043463.json | install_renamed: ignore unused parameter. | Library/Homebrew/install_renamed.rb | @@ -1,5 +1,5 @@
module InstallRenamed
- def install_p src, new_basename = nil
+ def install_p _, new_basename = nil
super do |src, dst|
dst += "/#{File.basename(src)}" if File.directory? dst
| false |
Other | Homebrew | brew | 80714aaa7cd6278c5864e31b068a5d017ba6baed.json | uses: remove unused variable. | Library/Homebrew/cmd/uses.rb | @@ -31,7 +31,7 @@ def uses
deps.any? { |dep| dep.to_formula.name == ff.name } ||
f.requirements.any? { |req| req.name == ff.name }
end
- rescue FormulaUnavailableError => e
+ rescue FormulaUnavailableError
# Silently ignore this case as we don't care about... | false |
Other | Homebrew | brew | 1308070e66b3b4dbf979eceb2f374d3a3a81bb5d.json | pull: remove unused variable. | Library/Homebrew/cmd/pull.rb | @@ -109,7 +109,7 @@ def pull
begin
changed_formulae << Formula[name]
# Make sure we catch syntax errors.
- rescue Exception => e
+ rescue Exception
next
end
end | false |
Other | Homebrew | brew | 57336ea68b13ec816c9403f03c437e3e503b2ca5.json | commands: move argument to fix warning. | Library/Homebrew/cmd/commands.rb | @@ -1,8 +1,9 @@
module Homebrew
def commands
# Find commands in Homebrew/cmd
+ with_directory = false
cmds = (HOMEBREW_REPOSITORY/"Library/Homebrew/cmd").
- children(with_directory=false).
+ children(with_directory).
map {|f| File.basename(f, '.rb')}
puts "Built-in ... | false |
Other | Homebrew | brew | 3d71826e6dc794b0f3b6b9098ff0b49e3f997bfa.json | bottle: remove unused variable. | Library/Homebrew/cmd/bottle.rb | @@ -52,8 +52,6 @@ def print_filename string, filename
result = false
keg.each_unique_file_matching(string) do |file|
- put_filename = false
-
# Check dynamic library linkage. Importantly, do not run otool on static
# libraries, which will falsely report "linkage" to themselves.
if ... | false |
Other | Homebrew | brew | 11defcf847666adac44f0ff53a7f8ead9a7ac5f1.json | formula_versions: use Utils.popen_read instead of backticks
Closes Homebrew/homebrew#37446.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/formula_versions.rb | @@ -47,7 +47,7 @@ def rev_list(branch="HEAD")
end
def file_contents_at_revision(rev)
- repository.cd { `git cat-file blob #{rev}:#{entry_name}` }
+ repository.cd { Utils.popen_read("git", "cat-file", "blob", "#{rev}:#{entry_name}") }
end
def version_at_revision(rev) | false |
Other | Homebrew | brew | 144453368ed42c13e24143dd4e234795eb67f3cb.json | test-bot pathname: use Utils.popen_read instead of backticks
Closes Homebrew/homebrew#37418.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/cmd/test-bot.rb | @@ -365,12 +365,12 @@ def formula formula_name
end
test "brew", "uses", canonical_formula_name
- dependencies = `brew deps #{canonical_formula_name}`.split("\n")
- dependencies -= `brew list`.split("\n")
+ dependencies = Utils.popen_read("brew", "deps", canonical_formula_name).split("\n")... | true |
Other | Homebrew | brew | 144453368ed42c13e24143dd4e234795eb67f3cb.json | test-bot pathname: use Utils.popen_read instead of backticks
Closes Homebrew/homebrew#37418.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/extend/pathname.rb | @@ -413,10 +413,11 @@ def install_metafiles from=Pathname.pwd
end
def abv
- out=''
- n=`find #{to_s} -type f ! -name .DS_Store | wc -l`.to_i
+ out = ""
+ n = Utils.popen_read("find", expand_path.to_s, "-type", "f", "!", "-name", ".DS_Store").split("\n").size
out << "#{n} files, " if n > 1
- ... | true |
Other | Homebrew | brew | 4d5c1526665bda7ccd3948e388bec27001ddd1e7.json | Remove unnecessary nil check
The backticks will either return a string or raise an exception, so
`executable` cannot be nil. | Library/Homebrew/requirements/python_dependency.rb | @@ -36,9 +36,7 @@ def python_short_version
def which_python
python = which python_binary
return unless python
- executable = `#{python} -c "import sys; print(sys.executable)"`.strip
- return unless executable
- Pathname.new executable
+ Pathname.new Utils.popen_read(python, "-c", "import sys; p... | false |
Other | Homebrew | brew | db772eee8a50f8adaaae01eac6b5a59053a0f330.json | Use env DSL | Library/Homebrew/requirements/python_dependency.rb | @@ -18,7 +18,7 @@ def pour_bottle?
build? || system_python?
end
- def modify_build_environment
+ env do
if system_python?
if python_binary == "python"
version = python_short_version | false |
Other | Homebrew | brew | 03d3f9d292808f7af908726a450629adca78c182.json | cmd/install: add force/debug/verbose to cask.
Closes Homebrew/homebrew#37217. | Library/Homebrew/cmd/install.rb | @@ -31,9 +31,13 @@ def install
if ARGV.casks.any?
brew_cask = Formulary.factory("brew-cask")
install_formula(brew_cask) unless brew_cask.installed?
+ args = []
+ args << "--force" if ARGV.force?
+ args << "--debug" if ARGV.debug?
+ args << "--verbose" if ARGV.verbose... | false |
Other | Homebrew | brew | f27f427d95bc181b67ee5522f4781b508e9d9df9.json | test-bot: use canonical names for taps. | Library/Homebrew/cmd/test-bot.rb | @@ -358,19 +358,25 @@ def setup
def formula formula_name
@category = "#{__method__}.#{formula_name}"
- test "brew", "uses", formula_name
- dependencies = `brew deps #{formula_name}`.split("\n")
+ canonical_formula_name = if @tap
+ "#{@tap}/#{formula_name}"
+ else
+ formul... | false |
Other | Homebrew | brew | 17bfb0f804555cfaef70e64a1c7fcc5697195f48.json | Remove SourceForge references.
It was fun but we just love Bintray more than you.
Closes Homebrew/homebrew#37211.
Closes Homebrew/homebrew#37213.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/test-bot.rb | @@ -452,11 +452,7 @@ def formula formula_name
bottle_args = ["--rb", formula_name]
if @tap
tap_user, tap_repo = @tap.split "/"
- if ENV["HOMEBREW_SOURCEFORGE_TESTING"]
- bottle_args << "--root-url=#{BottleSpecification::DEFAULT_ROOT_URL}/#{tap_repo}"
- ... | true |
Other | Homebrew | brew | 17bfb0f804555cfaef70e64a1c7fcc5697195f48.json | Remove SourceForge references.
It was fun but we just love Bintray more than you.
Closes Homebrew/homebrew#37211.
Closes Homebrew/homebrew#37213.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/download_strategy.rb | @@ -372,12 +372,6 @@ def _fetch
# This strategy extracts our binary packages.
class CurlBottleDownloadStrategy < CurlDownloadStrategy
- def curl(*args)
- mirror = ENV["HOMEBREW_SOURCEFORGE_MIRROR"]
- args << "-G" << "-d" << "use_mirror=#{mirror}" if mirror
- super
- end
-
def stage
ohai "Pouring ... | true |
Other | Homebrew | brew | 17bfb0f804555cfaef70e64a1c7fcc5697195f48.json | Remove SourceForge references.
It was fun but we just love Bintray more than you.
Closes Homebrew/homebrew#37211.
Closes Homebrew/homebrew#37213.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/manpages/brew.1.md | @@ -562,12 +562,6 @@ can take several different forms:
Text printed before the installation summary of each successful build.
Defaults to the beer emoji.
- * HOMEBREW\_SOURCEFORGE\_MIRROR:
- If set, Homebrew will use the value of `HOMEBREW_SOURCEFORGE_MIRROR` to
- select a SourceForge mirror for down... | true |
Other | Homebrew | brew | 17bfb0f804555cfaef70e64a1c7fcc5697195f48.json | Remove SourceForge references.
It was fun but we just love Bintray more than you.
Closes Homebrew/homebrew#37211.
Closes Homebrew/homebrew#37213.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/software_spec.rb | @@ -251,12 +251,8 @@ def build_url(root_url, filename)
class BottleSpecification
DEFAULT_PREFIX = "/usr/local".freeze
DEFAULT_CELLAR = "/usr/local/Cellar".freeze
- if ENV["HOMEBREW_SOURCEFORGE_TESTING"]
- DEFAULT_ROOT_URL = "https://downloads.sf.net/project/machomebrew/Bottles".freeze
- else
- DEFAULT_DO... | true |
Other | Homebrew | brew | 17bfb0f804555cfaef70e64a1c7fcc5697195f48.json | Remove SourceForge references.
It was fun but we just love Bintray more than you.
Closes Homebrew/homebrew#37211.
Closes Homebrew/homebrew#37213.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/test/test_versions.rb | @@ -230,35 +230,35 @@ def test_debian_style_2
end
def test_bottle_style
- assert_version_detected '4.8.0', 'https://downloads.sf.net/project/machomebrew/Bottles/qt-4.8.0.lion.bottle.tar.gz'
+ assert_version_detected '4.8.0', 'https://homebrew.bintray.com/bottles/qt-4.8.0.lion.bottle.tar.gz'
end
de... | true |
Other | Homebrew | brew | 17bfb0f804555cfaef70e64a1c7fcc5697195f48.json | Remove SourceForge references.
It was fun but we just love Bintray more than you.
Closes Homebrew/homebrew#37211.
Closes Homebrew/homebrew#37213.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | share/man/man1/brew.1 | @@ -584,13 +584,6 @@ HOMEBREW_INSTALL_BADGE
Text printed before the installation summary of each successful build\. Defaults to the beer emoji\.
.
.TP
-HOMEBREW_SOURCEFORGE_MIRROR
-If set, Homebrew will use the value of \fBHOMEBREW_SOURCEFORGE_MIRROR\fR to select a SourceForge mirror for downloading bottles\.
-.
-.I... | true |
Other | Homebrew | brew | 328fa80f413af936fb1612156208d27c42dd4697.json | pathname: skip directory in env_script_all_files
Closes Homebrew/homebrew#37180.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/extend/pathname.rb | @@ -382,6 +382,7 @@ def write_env_script target, env
def env_script_all_files dst, env
dst.mkpath
Pathname.glob("#{self}/*") do |file|
+ next if file.directory?
dst.install_p file
new_file = dst+file.basename
file.write_env_script(new_file, env) | false |
Other | Homebrew | brew | da25d3e5797317e78076f7ab5f2caa5f4815e064.json | Move adobe-air-sdk to homebrew/binary
Closes Homebrew/homebrew#37104.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/tap_migrations.rb | @@ -1,4 +1,5 @@
TAP_MIGRATIONS = {
+ "adobe-air-sdk" => "homebrew/binary",
"agedu" => "homebrew/head-only",
"aimage" => "homebrew/boneyard",
"aplus" => "homebrew/boneyard", | false |
Other | Homebrew | brew | 39473f769413c1239aeb99d6c7b5ce564461fb43.json | audit: fix FormulaText match
It's used in `audit_text`
Closes Homebrew/homebrew#37139.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/cmd/audit.rb | @@ -69,6 +69,14 @@ def has_END?
def has_trailing_newline?
/\Z\n/ =~ @text
end
+
+ def =~ regex
+ regex =~ @text
+ end
+
+ def !~ regex
+ regex !~ @text
+ end
end
class FormulaAuditor | false |
Other | Homebrew | brew | 346ad93f901b50f200c5f869cf77fa727abe0d23.json | SUPPORTERS: add some (very) late links. | SUPPORTERS.md | @@ -179,7 +179,7 @@ These brilliant people supported our Kickstarter by giving us £15 or more:
* [Nick Jones](mailto:nick@dischord.org)
* [Esmé Cowles](https://github.com/escowles)
* [Garrett L. Ward](http://glward.net)
-* Carl Laird
+* [Carl Laird](http://allthingsoptimal.com)
* [Mx A. Matienzo](http://matienzo.or... | false |
Other | Homebrew | brew | 64d9c16942b972439a2fbfc4a0ff5f69b0fd0023.json | test-bot: pass tap argument to bottle --write. | Library/Homebrew/cmd/test-bot.rb | @@ -736,7 +736,9 @@ def test_bot
ENV["GIT_AUTHOR_NAME"] = ENV["GIT_COMMITTER_NAME"]
ENV["GIT_AUTHOR_EMAIL"] = ENV["GIT_COMMITTER_EMAIL"]
- safe_system "brew", "bottle", "--merge", "--write", *Dir["*.bottle.rb"]
+ bottle_args = ["--merge", "--write", *Dir["*.bottle.rb"]]
+ bottle_args << "... | false |
Other | Homebrew | brew | 30a8d8e470ea75e5796b7df9591a676a1a6fa429.json | bottle: --write: use canonical name with tap arg. | Library/Homebrew/cmd/bottle.rb | @@ -237,7 +237,13 @@ def merge
puts output
if ARGV.include? '--write'
- f = Formulary.factory(formula_name)
+ tap = ARGV.value('tap')
+ canonical_formula_name = if tap
+ "#{tap}/#{formula_name}"
+ else
+ formula_name
+ end
+ f = Formulary.facto... | false |
Other | Homebrew | brew | cf3ee4546f782a0bbe082e97c9746c5ad9b04841.json | add inspect to Requirement subclass
Closes Homebrew/homebrew#37116.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/requirements.rb | @@ -43,6 +43,10 @@ def message
EOS
end
end
+
+ def inspect
+ "#<#{self.class.name}: #{name.inspect} #{tags.inspect} version=#{@version.inspect}>"
+ end
end
class MysqlDependency < Requirement | true |
Other | Homebrew | brew | cf3ee4546f782a0bbe082e97c9746c5ad9b04841.json | add inspect to Requirement subclass
Closes Homebrew/homebrew#37116.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/requirements/mpi_dependency.rb | @@ -34,6 +34,10 @@ def mpi_wrapper_works? compiler
quiet_system compiler, '--version'
end
+ def inspect
+ "#<#{self.class.name}: #{name.inspect} #{tags.inspect} lang_list=#{@lang_list.inspect}>"
+ end
+
satisfy do
@lang_list.each do |lang|
case lang | true |
Other | Homebrew | brew | 1f541f7dfb5ae373acfd9831792d1e4cdd6948ea.json | test-bot: upload packages from canonical name. | Library/Homebrew/cmd/test-bot.rb | @@ -725,8 +725,12 @@ def test_bot
existing_bottles = {}
Dir.glob("*.bottle*.tar.gz") do |filename|
formula_name = bottle_filename_formula_name filename
- formula = Formulary.factory formula_name rescue nil
- next unless formula
+ canonical_formula_name = if tap
+ "#{... | false |
Other | Homebrew | brew | e50badf11c517f0be661da2050a02aa0b0554caa.json | pull: use link_tap_formula method. | Library/Homebrew/cmd/pull.rb | @@ -3,6 +3,7 @@
require 'utils'
require 'formula'
+require 'cmd/tap'
module Homebrew
def tap arg
@@ -92,9 +93,9 @@ def pull
pull_url url
changed_formulae = []
+ changed_formulae_paths = []
if tap_dir
- safe_system "brew", "tap", "--repair", "--debug"
formula_dir =... | false |
Other | Homebrew | brew | 7926ea171c84b8fe5439cb4969533f316a941d8e.json | README: add xu-cheng to maintainers. | README.md | @@ -20,7 +20,7 @@ Second, read the [Troubleshooting Checklist](https://github.com/Homebrew/homebre
Please report security issues to security@brew.sh.
## Who Are You?
-Homebrew's current maintainers are [Misty De Meo](https://github.com/mistydemeo), [Adam Vandenberg](https://github.com/adamv), [Jack Nagel](https://g... | false |
Other | Homebrew | brew | 22cf99094f7944de1c7989235c628c599dc760c7.json | Set the path on "fake" install receipts | Library/Homebrew/tab.rb | @@ -101,7 +101,7 @@ def self.dummy_tab f=nil
:stdlib => nil,
:compiler => "clang",
:source => {
- :path => nil,
+ :path => f ? f.path.to_s : nil,
},
}
| false |
Other | Homebrew | brew | 77d47de3b482b78782dec7fdd1392a7dee436a38.json | Switch bottle provider over to Bintray. | Library/Homebrew/software_spec.rb | @@ -251,11 +251,11 @@ def build_url(root_url, filename)
class BottleSpecification
DEFAULT_PREFIX = "/usr/local".freeze
DEFAULT_CELLAR = "/usr/local/Cellar".freeze
- if ENV["HOMEBREW_BINTRAY_TESTING"]
+ if ENV["HOMEBREW_SOURCEFORGE_TESTING"]
+ DEFAULT_ROOT_URL = "https://downloads.sf.net/project/machomebrew/... | false |
Other | Homebrew | brew | e773d0c3b915edfc490c0c6f57f2f1cead88c64e.json | pull: use Bintray package naming. | Library/Homebrew/cmd/pull.rb | @@ -161,14 +161,15 @@ def pull
bintray_key = ENV["BINTRAY_KEY"]
if bintray_user && bintray_key
- bintray_repo = Bintray.repository(tap_name)
+ repo = Bintray.repository(tap_name)
changed_formulae.each do |f|
next unless `git show --oneline --no-patch` =~ /: ... | false |
Other | Homebrew | brew | e5f145ababc6635024260820c98af6e0980a9662.json | test-bot: use Bintray package naming. | Library/Homebrew/cmd/test-bot.rb | @@ -747,24 +747,25 @@ def test_bot
Dir.glob("*.bottle*.tar.gz") do |filename|
version = Bintray.version filename
- formula = bottle_filename_formula_name filename
- existing_bottle = existing_bottles[formula]
+ formula_name = bottle_filename_formula_name filename
+ bintray_... | false |
Other | Homebrew | brew | 857da689bfd513b11ea050102b00c69340a6fa90.json | test-bot: add flag to reset repository and taps. | Library/Homebrew/cmd/test-bot.rb | @@ -16,10 +16,11 @@
# --dry-run: Just print commands, don't run them.
# --fail-fast: Immediately exit on a failing step.
#
-# --ci-master: Shortcut for Homebrew master branch CI options.
-# --ci-pr: Shortcut for Homebrew pull request CI options.
-# --ci-testing: Shortcut for Homebr... | false |
Other | Homebrew | brew | a0980f05a1399a434b057e551995847fa9db4e64.json | test-bot: fix tap variable naming. | Library/Homebrew/cmd/test-bot.rb | @@ -722,7 +722,7 @@ def test_bot
safe_system "git", "push", "--force", remote, "master:master", ":refs/tags/#{tag}"
# Bintray upload (will take over soon)
- bintray_repo = Bintray.repository(tap_name)
+ bintray_repo = Bintray.repository(tap)
bintray_repo_url = "https://api.bintray.com/p... | false |
Other | Homebrew | brew | e303a97aa710e781c9ccb0b5b7c7675f26862be3.json | bottles: add Bintray class.
For some utility functions. | Library/Homebrew/bottles.rb | @@ -46,6 +46,17 @@ def bottle_filename_formula_name filename
basename.rpartition("-#{version}").first
end
+class Bintray
+ def self.repository(tap=nil)
+ return "bottles" if tap.to_s.empty?
+ "bottles-#{tap.sub(/^homebrew\/homebrew-/i, "")}"
+ end
+
+ def self.version(path)
+ BottleVersion.parse(path)... | false |
Other | Homebrew | brew | 258c4ddefe60f65570aee2aef9243eb23a6ee5a9.json | pull: check bottle commit URL before branching.
Otherwise we annoyingly end up on a branch unnecessarily. | Library/Homebrew/cmd/pull.rb | @@ -141,13 +141,16 @@ def pull
end
if ARGV.include? "--bottle"
- bottle_branch = "pull-bottle-#{issue}"
- safe_system "git", "checkout", "-B", bottle_branch, revision
- if tap_name
- pull_url "https://github.com/BrewTestBot/homebrew-#{tap_name}/compare/homebrew:master...pr-... | false |
Other | Homebrew | brew | 40e64263226d4017b2437fbd5fd777c41ab3f063.json | audit: give better suggestion on git/hg dependency
Closes Homebrew/homebrew#36959.
Signed-off-by: Xu Cheng <xucheng@me.com> | Library/Homebrew/cmd/audit.rb | @@ -174,8 +174,12 @@ def audit_deps
Or if it is indeed a runtime denpendency
depends_on "#{dep}" => :run
EOS
- when "git", "ruby", "mercurial"
- problem "Don't use #{dep} as a dependency. We allow non-Homebrew #{dep} installations."
+ when "git"
+ p... | false |
Other | Homebrew | brew | e92a87179a2f90d8a43731b67adcd0b0b104a0eb.json | Use ternary instead of inline rescue | Library/Homebrew/tab.rb | @@ -92,7 +92,7 @@ def self.for_formula f
def self.dummy_tab f=nil
attributes = {
:used_options => [],
- :unused_options => (f.options.as_flags rescue []),
+ :unused_options => f ? f.options.as_flags : [],
:built_as_bottle => false,
:poured_from_bottle => false,
:tapped_from... | false |
Other | Homebrew | brew | 579f288bd2507d781d315e9fcc56ea6d52eaefee.json | test-bot: construct formula object correctly. | Library/Homebrew/cmd/test-bot.rb | @@ -707,8 +707,9 @@ def test_bot
Dir.glob("*.bottle*.tar.gz") do |filename|
# Skip taps for now until we're using Bintray for Homebrew/homebrew
next if tap
- formula = bottle_filename_formula_name filename
- existing_bottles[formula.name] = !!formula.bottle
+ formula_name =... | false |
Other | Homebrew | brew | 675991eb611af0a970dce6945f5b882c4343875f.json | pull: publish bottles on Bintray. | Library/Homebrew/cmd/pull.rb | @@ -153,9 +153,25 @@ def pull
safe_system "git", "merge", "--ff-only", "--no-edit", bottle_branch
safe_system "git", "branch", "-D", bottle_branch
- # TODO: publish on bintray
- # safe_system "curl", "-u#{user}:#{key}", "-X", "POST",
- # "https://api.bintray.com/content/homebr... | false |
Other | Homebrew | brew | e9e2be94040b103c5d5cf45755d487294120a0ab.json | test-bot: autopublish existing bottles on Bintray. | Library/Homebrew/cmd/test-bot.rb | @@ -664,11 +664,14 @@ def test_bot
jenkins = ENV['JENKINS_HOME']
job = ENV['UPSTREAM_JOB_NAME']
id = ENV['UPSTREAM_BUILD_ID']
- raise "Missing Jenkins variables!" unless jenkins and job and id
+ raise "Missing Jenkins variables!" if !jenkins || !job || !id
- user = ENV["BINTRAY_USE... | false |
Other | Homebrew | brew | 4f13858fe8af6dc385c2cd80ed127ea05d216180.json | Fix a couple of formatting issues in man page | Library/Homebrew/manpages/brew.1.md | @@ -237,7 +237,7 @@ Note that these flags should only appear after a command.
If `--force` is passed, Homebrew will allow keg-only formulae to be linked.
- * `linkapps [--local] [<formulae>]`:
+ * `linkapps [--local]` [<formulae>]:
Find installed formulae that have compiled `.app`-style "application"
... | true |
Other | Homebrew | brew | 4f13858fe8af6dc385c2cd80ed127ea05d216180.json | Fix a couple of formatting issues in man page | share/man/man1/brew.1 | @@ -254,7 +254,7 @@ If \fB\-\-dry\-run\fR or \fB\-n\fR is passed, Homebrew will list all files which
If \fB\-\-force\fR is passed, Homebrew will allow keg\-only formulae to be linked\.
.
.TP
-\fBlinkapps [\-\-local] [<formulae>]\fR
+\fBlinkapps [\-\-local]\fR [\fIformulae\fR]
Find installed formulae that have compi... | true |
Other | Homebrew | brew | 67828cd01523fed03b3e59780862a405f0c5b7dc.json | test-bot: specify bintray username/password. | Library/Homebrew/cmd/test-bot.rb | @@ -738,8 +738,9 @@ def test_bot
package_url = "https://api.bintray.com/packages/homebrew/#{repo}/#{formula}"
unless system "curl", "--silent", "--fail", "--output", "/dev/null", package_url
- safe_system "curl", "-H", "Content-Type: application/json",
- "-d", "{'name':'#{formula... | false |
Other | Homebrew | brew | 51956d343a5b38a683db9afe51e39dabbd715ac0.json | audit: extend ssl checks
Extends the audit checks to GnuPG, a significant chunk of Freedesktop
domains, and Github Pages. I’ve somewhat hardened my stance towards
Github Pages from the last time we extended this, hence the new
inclusion - I did a pretty thorough check through the Homebrew formulae
that use Github Page... | Library/Homebrew/cmd/audit.rb | @@ -243,13 +243,40 @@ def audit_urls
problem "Savannah homepages should be https:// links (URL is #{homepage})."
end
+ if homepage =~ %r[^http://((?:trac|tools|www)\.)?ietf\.org]
+ problem "ietf homepages should be https:// links (URL is #{homepage})."
+ end
+
+ if homepage =~ %r[^http://((?... | false |
Other | Homebrew | brew | 3f3b7746dda4a36a05ad3c6bda32526dbeea5c19.json | Fix another filesystem leak in updater tests | Library/Homebrew/test/test_updater.rb | @@ -51,6 +51,10 @@ def setup
@report = Report.new
end
+ def teardown
+ FileUtils.rm_rf HOMEBREW_LIBRARY.join("Taps")
+ end
+
def perform_update(fixture_name="")
@updater.diff = fixture(fixture_name)
@updater.in_repo_expect("git checkout -q master") | false |
Other | Homebrew | brew | 6648f976fbd96772b3664774a543a9d124eb1699.json | Remove unnecessary use of Dir[] | Library/Homebrew/download_strategy.rb | @@ -672,7 +672,7 @@ def initialize(name, resource)
end
def stage
- cp_r Dir[cached_location+"{.}"], Dir.pwd
+ cp_r File.join(cached_location, "."), Dir.pwd
end
private
@@ -751,7 +751,7 @@ def initialize(name, resource)
def stage
# The export command doesn't work on checkouts
# See htt... | false |
Other | Homebrew | brew | d0e2d126a1969c6cf3d975576108a8da2c618254.json | audit: catch empty installations
Closes Homebrew/homebrew#36794.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/audit.rb | @@ -668,6 +668,24 @@ def audit_line(line, lineno)
end
end
+ def audit_prefix_has_contents
+ return unless formula.prefix.directory?
+
+ Pathname.glob("#{formula.prefix}/**/*") do |file|
+ next if file.directory?
+ basename = file.basename.to_s
+ next if Metafiles.copy?(basename)
+ n... | false |
Other | Homebrew | brew | e34d9a7b37101062c79a98ade47fe141a9b8e149.json | outdated: handle HEAD, URL and path installation.
Handles edge cases missed in Homebrew/homebrew#36699.
Closes Homebrew/homebrew#36741.
Closes Homebrew/homebrew#36760.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/outdated.rb | @@ -23,9 +23,11 @@ def outdated_brews(formulae)
keg = Keg.new dir
version = keg.version
all_versions << version
+ same_or_head_version = f.version == version || version.head?
tap = Tab.for_keg(keg).tapped_from
- if f.tap == tap || f.version == version
+ same_or... | false |
Other | Homebrew | brew | 384c444be89eae07df858174e995bbc10079e05b.json | Drop unnecessary call to compact | Library/ENV/4.3/cc | @@ -118,7 +118,7 @@ class Cmd
args + cppflags
when :ld
ldflags + args
- end.compact
+ end
make_fuss(allflags)
allflags
end | false |
Other | Homebrew | brew | 28b926686b59b7ed6a10a1c478ccce699fb217e6.json | Get the basename and dirname once | Library/ENV/4.3/cc | @@ -29,8 +29,8 @@ class Cmd
attr_reader :config, :prefix, :cellar, :tmpdir, :sysroot
attr_reader :archflags, :optflags
- def initialize path, args
- @arg0 = File.basename(path).freeze
+ def initialize(arg0, args)
+ @arg0 = arg0
@args = args.freeze
@config = ENV.fetch("HOMEBREW_CCCFG") { "" }
... | false |
Other | Homebrew | brew | 2320c0a6c1130dd24d7f73c073c66ad798caa8b0.json | pull: copy new subject when bumping. | Library/Homebrew/cmd/pull.rb | @@ -129,6 +129,7 @@ def pull
f = changed_formulae.first
subject = "#{f.name} #{f.version}"
ohai "New bump commit subject: #{subject}"
+ system "/bin/echo -n #{subject} | pbcopy"
message = "#{subject}\n\n#{message}"
end
| false |
Other | Homebrew | brew | 4d17d4c8dbef49a9ed9fd174ed2ac2f8a7b4e9a6.json | gist-logs: show the formula origin for non core-formula
Closes Homebrew/homebrew#36730.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/gist-logs.rb | @@ -12,6 +12,14 @@ def gistify_logs f
Homebrew.dump_verbose_config(s)
files["config.out"] = { :content => s.string }
files["doctor.out"] = { :content => `brew doctor 2>&1` }
+ unless f.core_formula?
+ tap = <<-EOS.undent
+ Formula: #{f.name}
+ Tap: #{f.tap}
+ Path: #{f.path}
... | false |
Other | Homebrew | brew | f640cbac9ed83abab64e4dcb4b630f6765fd2962.json | brew uses: parse ARGV properly
`ARGV.flag?` = `ARGV.include?` + `ARGV.switch?`
Closes Homebrew/homebrew#36727.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/uses.rb | @@ -12,8 +12,8 @@ def uses
formulae = (ARGV.include? "--installed") ? Formula.installed : Formula
recursive = ARGV.flag? "--recursive"
ignores = []
- ignores << "build?" if ARGV.flag? "--skip-build"
- ignores << "optional?" if ARGV.flag? "--skip-optional"
+ ignores << "build?" if ARGV.include? "... | false |
Other | Homebrew | brew | 8e12390fc8d9b198dd4b68ca20c0108e5d60e1a5.json | Update Example Formula documentation.
I feel like we’re probably fighting a losing battle here, but here’s a
bundle more updates to the example formula to cover some ground not
already covered.
Closes Homebrew/homebrew#36644.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Contributions/example-formula.rb | @@ -30,8 +30,8 @@ class ExampleFormula < Formula
version "1.2-final"
# For integrity and security, we verify the hash (`openssl dgst -sha1 <FILE>`)
- # You may also use sha256 if the software uses sha256 on their homepage.
- # Leave it empty at first and `brew install` will tell you the expected.
+ # You may... | true |
Other | Homebrew | brew | 8e12390fc8d9b198dd4b68ca20c0108e5d60e1a5.json | Update Example Formula documentation.
I feel like we’re probably fighting a losing battle here, but here’s a
bundle more updates to the example formula to cover some ground not
already covered.
Closes Homebrew/homebrew#36644.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | share/doc/homebrew/Formula-Cookbook.md | @@ -81,7 +81,7 @@ Formulae aren’t that complicated. [etl](https://github.com/Homebrew/homebrew/b
And then [Git](https://github.com/Homebrew/homebrew/tree/master/Library/Formula/git.rb) and [flac](https://github.com/Homebrew/homebrew/tree/master/Library/Formula/flac.rb) show more advanced functionality.
-A more com... | true |
Other | Homebrew | brew | e547438ff43426e31dac3ef070b2feecd8a4621b.json | cmd/info: prevent duplicate dependency display.
Before:
$ brew info llvm
==> Dependencies
Build: xz ✔, xz ✔, xz ✔, xz ✔, xz ✔, xz ✔
$ brew info --json=v1 llvm
... "dependencies":["xz","xz","xz","xz","xz","xz"], ...
After
$ brew info llvm
==> Dependencies
Build: xz ✔
$ brew info... | Library/Homebrew/cmd/info.rb | @@ -122,7 +122,7 @@ def info_formula f
unless f.deps.empty?
ohai "Dependencies"
%w{build required recommended optional}.map do |type|
- deps = f.deps.send(type)
+ deps = f.deps.send(type).uniq
puts "#{type.capitalize}: #{decorate_dependencies deps}" unless deps.empty?
en... | true |
Other | Homebrew | brew | e547438ff43426e31dac3ef070b2feecd8a4621b.json | cmd/info: prevent duplicate dependency display.
Before:
$ brew info llvm
==> Dependencies
Build: xz ✔, xz ✔, xz ✔, xz ✔, xz ✔, xz ✔
$ brew info --json=v1 llvm
... "dependencies":["xz","xz","xz","xz","xz","xz"], ...
After
$ brew info llvm
==> Dependencies
Build: xz ✔
$ brew info... | Library/Homebrew/formula.rb | @@ -593,7 +593,7 @@ def to_hash
"installed" => [],
"linked_keg" => (linked_keg.resolved_path.basename.to_s if linked_keg.exist?),
"keg_only" => keg_only?,
- "dependencies" => deps.map(&:name),
+ "dependencies" => deps.map(&:name).uniq,
"conflicts_with" => conflicts.map(&:name),
... | true |
Other | Homebrew | brew | 2abd3298f9520b25550b4f5b27884452b4ddec13.json | audit: catch more examples from example_formula
See
https://github.com/Homebrew/homebrew/pull/36629#discussion_r24293912
amongst other recent examples. The example formula isn’t as strongly
policed as the ` brew create ` default, this tries to do something
about that.
Closes Homebrew/homebrew#36639.
Signed-off-by: M... | Library/Homebrew/cmd/audit.rb | @@ -455,9 +455,18 @@ def audit_line(line, lineno)
if line =~ /# PLEASE REMOVE/
problem "Please remove default template comments"
end
+ if line =~ /# Documentation:/
+ problem "Please remove default template comments"
+ end
if line =~ /# if this fails, try separate make\/make install ste... | false |
Other | Homebrew | brew | 357d0f279614c1c18f709f2dd4e310ad388d3915.json | Use start_with? to simplify path sanity check | Library/ENV/4.3/cc | @@ -199,15 +199,7 @@ class Cmd
end
def keep? path
- case path
- when %r{^#{Regexp.escape(prefix)}}o, %r{^#{Regexp.escape(cellar)}}o, %r{^#{Regexp.escape(tmpdir)}}o
- # maybe homebrew is installed to /sw or /opt/brew
- true
- when %r{^/opt}, %r{^/sw}, %r{/usr/X11}
- false
- else
- ... | false |
Other | Homebrew | brew | 4851b1e7a877246d57ca87e9e48b7d962f100015.json | Use a local instead of an instance variable | Library/Homebrew/formula.rb | @@ -621,7 +621,7 @@ def verify_download_integrity fn
end
def run_test
- @oldhome = ENV["HOME"]
+ old_home = ENV["HOME"]
self.build = Tab.for_formula(self)
mktemp do
@testpath = Pathname.pwd
@@ -630,7 +630,7 @@ def run_test
end
ensure
@testpath = nil
- ENV["HOME"] = @oldhom... | false |
Other | Homebrew | brew | e40d302deeb8e1011d4f0c9dc3aa1ceafefb654c.json | audit_installed: give better Python advice
Update advice about easy-install.pth files.
Closes Homebrew/homebrew#36547. | Library/Homebrew/formula_cellar_checks.rb | @@ -127,8 +127,7 @@ def check_easy_install_pth lib
<<-EOS.undent
easy-install.pth files were found
These .pth files are likely to cause link conflicts. Please invoke
- setup.py with options
- --single-version-externally-managed --record=install.txt
+ setup.py using Language::Python.s... | false |
Other | Homebrew | brew | d362f5a2fbc82810f819a7d024b92fee4813cf3e.json | Remove message that is never displayed
Requirements with default formulae cannot fail the build. | Library/Homebrew/requirements/apr_dependency.rb | @@ -14,27 +14,4 @@ class AprDependency < Requirement
ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr-util"].opt_libexec}/lib/pkgconfig"
end
end
-
- def message
- message = <<-EOS.undent
- Due to packaging problems on Apple's part, software that compiles
- against APR requires the standa... | false |
Other | Homebrew | brew | 5e854164a7a11cb6bf44e8dde414dc0c703fa52e.json | untap: Handle multiple arguments
Closes Homebrew/homebrew#36436.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/tap.rb | @@ -108,8 +108,8 @@ def each_tap
end
end
- def tap_args
- ARGV.first =~ HOMEBREW_TAP_ARGS_REGEX
+ def tap_args(tap_name=ARGV.first)
+ tap_name =~ HOMEBREW_TAP_ARGS_REGEX
raise "Invalid tap name" unless $1 && $3
[$1, $3]
end | true |
Other | Homebrew | brew | 5e854164a7a11cb6bf44e8dde414dc0c703fa52e.json | untap: Handle multiple arguments
Closes Homebrew/homebrew#36436.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/untap.rb | @@ -4,25 +4,27 @@ module Homebrew
def untap
raise "Usage is `brew untap <tap-name>`" if ARGV.empty?
- user, repo = tap_args
-
- # we consistently downcase in tap to ensure we are not bitten by case-insensive
- # filesystem issues. Which is the default on mac. The problem being the
- # filesystem c... | true |
Other | Homebrew | brew | e298f09ab6a50929a61880c3649779ceab98b4bb.json | Move mysqlreport to the boneyard
The project was deprecated in favor of percona-toolkit:
http://blog.codenode.com/2015/01/hack-mysql-has-been-retired.html
Closes Homebrew/homebrew#36342. | Library/Homebrew/tap_migrations.rb | @@ -104,6 +104,7 @@
"msgpack-rpc" => "homebrew/boneyard",
"mupdf" => "homebrew/x11",
"mydumper" => "homebrew/boneyard",
+ "mysqlreport" => "homebrew/boneyard",
"newick-utils" => "homebrew/science",
"nlopt" => "homebrew/science",
"octave" => "homebrew/science", | false |
Other | Homebrew | brew | 649579072ca7a0f5fe2576f78499a7a35597161f.json | Move cdf to the boneyard
Closes Homebrew/homebrew#36009. | Library/Homebrew/tap_migrations.rb | @@ -15,6 +15,7 @@
"cantera" => "homebrew/science",
"cardpeek" => "homebrew/x11",
"catdoc" => "homebrew/boneyard",
+ "cdf" => "homebrew/boneyard",
"clam" => "homebrew/boneyard",
"cloudfoundry-cli" => "pivotal/tap",
"clusterit" => "homebrew/x11", | false |
Other | Homebrew | brew | a9c4091de733e54cc73bab7e0fe0b729f5f6bde6.json | Fix more version misdetections for URLs with archs
Closes Homebrew/homebrew#36368.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/test/test_versions.rb | @@ -353,7 +353,13 @@ def test_win_style
def test_with_arch
assert_version_detected '4.0.18-1',
'http://ftpmirror.gnu.org/mtools/mtools-4.0.18-1.i686.rpm'
+ assert_version_detected '5.5.7-5',
+ 'http://ftpmirror.gnu.org/autogen/autogen-5.5.7-5.i386.rpm'
assert_version_detected '2.8',
'... | true |
Other | Homebrew | brew | a9c4091de733e54cc73bab7e0fe0b729f5f6bde6.json | Fix more version misdetections for URLs with archs
Closes Homebrew/homebrew#36368.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/version.rb | @@ -273,8 +273,9 @@ def self._parse spec
return m.captures.first.gsub('_', '.') unless m.nil?
# e.g. foobar-4.5.1-1
+ # e.g. unrtf_0.20.4-1
# e.g. ruby-1.9.1-p243
- m = /-((?:\d+\.)*\d\.\d+-(?:p|rc|RC)?\d+)(?:[-._](?:bin|dist|stable|src|sources))?$/.match(stem)
+ m = /[-_]((?:\d+\.)*\d\.\d+-(?... | true |
Other | Homebrew | brew | a9e8dfb9960b6d3c75f7152a16f7496b41679943.json | Fix version misdetections for URLs with OS/archs
Closes Homebrew/homebrew#36308.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/test/test_versions.rb | @@ -342,4 +342,18 @@ def test_aespipe_version_style
assert_version_detected '2.4c',
'http://loop-aes.sourceforge.net/aespipe/aespipe-v2.4c.tar.bz2'
end
+
+ def test_win_style
+ assert_version_detected '0.9.17',
+ 'http://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-0.9.17-w32.zip'
+ assert_v... | true |
Other | Homebrew | brew | a9e8dfb9960b6d3c75f7152a16f7496b41679943.json | Fix version misdetections for URLs with OS/archs
Closes Homebrew/homebrew#36308.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/version.rb | @@ -293,6 +293,16 @@ def self._parse spec
m = /-((?:\d+\.)*\d+-beta\d*)$/.match(stem)
return m.captures.first unless m.nil?
+ # e.g. http://ftpmirror.gnu.org/libidn/libidn-1.29-win64.zip
+ # e.g. http://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-0.9.17-w32.zip
+ m = /-(\d+\.\d+(?:\.\d+)?)-w(?:in... | true |
Other | Homebrew | brew | eaba2607c4a2f58a9dab0bc910c571b477e2a762.json | Add brewdler tap to documentation. | share/doc/homebrew/Interesting-Taps-&-Branches.md | @@ -41,11 +41,14 @@ Homebrew has the capability to add (and remove) multiple taps to your local inst
- Formula are not deleted, they are moved here.
* [homebrew/nginx](https://github.com/Homebrew/homebrew-nginx)
- - Feature rich Nginx tap for modules
+ - Feature rich Nginx tap for modules.
* [homeb... | false |
Other | Homebrew | brew | f0fc15ade8cdff5ad50da4a6d5b900ab3cd1dd90.json | Remove unnecessary early return
Iterating over an empty list is a no-op so we can remove this early
return. | Library/Homebrew/formula.rb | @@ -761,7 +761,6 @@ def stage
def prepare_patches
active_spec.add_legacy_patches(patches)
- return if patchlist.empty?
patchlist.grep(DATAPatch) { |p| p.path = path }
| false |
Other | Homebrew | brew | 797820946922d8c043f320adeb4cbaa88abbfcd4.json | Use formula patches accessor | Library/Homebrew/formula.rb | @@ -387,7 +387,7 @@ def require_universal_deps?
def patch
ohai "Patching"
- active_spec.patches.each(&:apply)
+ patchlist.each(&:apply)
end
# yields self with current working directory set to the uncompressed tarball
@@ -761,9 +761,9 @@ def prepare_patches
active_spec.add_legacy_patches(pat... | false |
Other | Homebrew | brew | af1e9a9610f39480f8a476f4f960e111aa000ff4.json | Expose bottle details on the formula object
Fixes Homebrew/homebrew#36032. | Library/Homebrew/cmd/test-bot.rb | @@ -365,7 +365,7 @@ def formula formula_name
dependents -= @formulae
dependents = dependents.map {|d| Formulary.factory(d)}
- testable_dependents = dependents.select {|d| d.test_defined? && d.stable.bottled? }
+ testable_dependents = dependents.select { |d| d.test_defined? && d.bottled? }
... | true |
Other | Homebrew | brew | af1e9a9610f39480f8a476f4f960e111aa000ff4.json | Expose bottle details on the formula object
Fixes Homebrew/homebrew#36032. | Library/Homebrew/formula.rb | @@ -147,10 +147,20 @@ def head?
active_spec == head
end
+ # @private
+ def bottled?
+ active_spec.bottled?
+ end
+
+ # @private
+ def bottle_specification
+ active_spec.bottle_specification
+ end
+
# The Bottle object for the currently active {SoftwareSpec}.
# @private
def bottle
- Bot... | true |
Other | Homebrew | brew | af1e9a9610f39480f8a476f4f960e111aa000ff4.json | Expose bottle details on the formula object
Fixes Homebrew/homebrew#36032. | Library/Homebrew/formula_versions.rb | @@ -78,7 +78,7 @@ def bottle_version_map(branch="HEAD")
map = Hash.new { |h, k| h[k] = [] }
rev_list(branch) do |rev|
formula_at_revision(rev) do |f|
- bottle = f.stable.bottle_specification
+ bottle = f.bottle_specification
unless bottle.checksums.empty?
map[f.pkg_ver... | true |
Other | Homebrew | brew | 6a6b56127c0c25a8de51a305c6c94ad5bf11447b.json | test-bot: handle devel-only formulae. | Library/Homebrew/cmd/test-bot.rb | @@ -364,14 +364,24 @@ def formula formula_name
dependents = `brew uses #{formula_name}`.split("\n")
dependents -= @formulae
dependents = dependents.map {|d| Formulary.factory(d)}
+
testable_dependents = dependents.select {|d| d.test_defined? && d.stable.bottled? }
formula = Formular... | false |
Other | Homebrew | brew | 6d786e7dbbeb9c1c473ec80aabbf4a61ecaca1a1.json | brew-config: show realpath for pyenv and rbenv
Closes Homebrew/homebrew#35819.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/config.rb | @@ -74,11 +74,21 @@ def describe_perl
end
def describe_python
- describe_path(which 'python')
+ python = which 'python'
+ if %r{/shims/python$} =~ python && which('pyenv')
+ "#{python} => #{Pathname.new(`pyenv which python`.strip).realpath}" rescue describe_path(python)
+ else
+ describe_p... | false |
Other | Homebrew | brew | 3f318b8ed4f33fa1f27f5ce1816ca72513196208.json | install: handle devel-only correctly
See the discussion in
https://github.com/Homebrew/homebrew-devel-only/pull/6
Closes Homebrew/homebrew#35793.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/install.rb | @@ -40,20 +40,32 @@ def install
end
ARGV.formulae.each do |f|
- # Building head-only without --HEAD is an error
- if not ARGV.build_head? and f.stable.nil?
+ # head-only without --HEAD is an error
+ if not ARGV.build_head? and f.stable.nil? and f.devel.nil?
raise <... | false |
Other | Homebrew | brew | b109e4f1f1c39fb4d7ba49dc954c4de9ab3d286b.json | metafile: extend ext list
Closes Homebrew/homebrew#35820.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/metafiles.rb | @@ -1,5 +1,9 @@
class Metafiles
- EXTENSIONS = %w[.md .html .rtf .txt]
+ # https://github.com/github/markup#markups
+ EXTENSIONS = %w[
+ .adoc .asc .asciidoc .creole .html .markdown .md .mdown .mediawiki .mkdn
+ .org .pod .rdoc .rst .rtf .textile .txt .wiki
+ ]
BASENAMES = %w[
about authors changelog... | false |
Other | Homebrew | brew | 4bdfb27d9fb4958a5845e598fd7b9c7cefab94e7.json | Move assertion setup into formula_assertions.rb | Library/Homebrew/cmd/test.rb | @@ -1,33 +1,11 @@
require "extend/ENV"
require "timeout"
require "debrew"
+require "formula_assertions"
module Homebrew
TEST_TIMEOUT_SECONDS = 5*60
- if defined?(Gem)
- begin
- gem "minitest", "< 5.0.0"
- rescue Gem::LoadError
- require "test/unit/assertions"
- else
- require "minite... | true |
Other | Homebrew | brew | 4bdfb27d9fb4958a5845e598fd7b9c7cefab94e7.json | Move assertion setup into formula_assertions.rb | Library/Homebrew/formula_assertions.rb | @@ -1,7 +1,26 @@
-require 'test/unit/assertions'
-
module Homebrew
module Assertions
+ if defined?(Gem)
+ begin
+ gem "minitest", "< 5.0.0"
+ rescue Gem::LoadError
+ require "test/unit/assertions"
+ else
+ require "minitest/unit"
+ require "test/unit/assertions"
+ ... | true |
Other | Homebrew | brew | d298e54e50fdea57456385a6e6eaad6f3fc193b8.json | doctor: check access on HOMEBREW_PREFIX/opt | Library/Homebrew/cmd/doctor.rb | @@ -478,6 +478,16 @@ def check_access_cellar
end
end
+def check_access_prefix_opt
+ opt = HOMEBREW_PREFIX.join("opt")
+ if opt.exist? && !opt.writable_real?
+ <<-EOS.undent
+ #{opt} isn't writable.
+ You should `chown` #{opt}
+ EOS
+ end
+end
+
def check_ruby_version
ruby_version = MacOS.ve... | false |
Other | Homebrew | brew | b1514c1c40390b2238f378ff132b76e2e8a744ef.json | doctor: check cellar access | Library/Homebrew/cmd/doctor.rb | @@ -469,6 +469,15 @@ def check_access_cache
end
end
+def check_access_cellar
+ if HOMEBREW_CELLAR.exist? && !HOMEBREW_CELLAR.writable_real?
+ <<-EOS.undent
+ #{HOMEBREW_CELLAR} isn't writable.
+ You should `chown` #{HOMEBREW_CELLAR}
+ EOS
+ end
+end
+
def check_ruby_version
ruby_version = Ma... | false |
Other | Homebrew | brew | 7a49c143e4e44a280c7625404d8f84bab5677d88.json | Use attr_accessor for checksum | Library/Homebrew/resource.rb | @@ -8,9 +8,9 @@
class Resource
include FileUtils
- attr_reader :checksum, :mirrors, :specs, :using
- attr_writer :checksum, :version
- attr_accessor :download_strategy
+ attr_reader :mirrors, :specs, :using
+ attr_writer :version
+ attr_accessor :download_strategy, :checksum
# Formula name must be set ... | false |
Other | Homebrew | brew | 3f08b8881b9a7ddebbe3e4fcd2e036e7f2ea01d0.json | cleanup-installed: use uninstall --force. | Library/Homebrew/cmd/cleanup-installed.rb | @@ -15,6 +15,6 @@ def cleanup_installed
current_formulae = `brew list`.lines.map(&:strip)
uninstall_formulae = current_formulae - kept_formulae
return if uninstall_formulae.empty?
- safe_system "brew", "uninstall", *uninstall_formulae
+ safe_system "brew", "uninstall", "--force", *uninstall_formula... | false |
Other | Homebrew | brew | 26b80ecccca8db33fb067158634ac54630fec2d0.json | test-bot: improve output of dependent testing. | Library/Homebrew/cmd/test-bot.rb | @@ -365,9 +365,6 @@ def formula formula_name
dependents -= @formulae
dependents = dependents.map {|d| Formulary.factory(d)}
testable_dependents = dependents.select {|d| d.test_defined? && d.stable.bottled? }
- uninstalled_testable_dependents = testable_dependents.reject {|d| d.installed? }
- ... | false |
Other | Homebrew | brew | 424ded8fdb9e3e71851a5f8678bfab5a2c3d76c7.json | test-bot: ignore changed dependents. | Library/Homebrew/cmd/test-bot.rb | @@ -362,6 +362,7 @@ def formula formula_name
changed_dependences = dependencies - unchanged_dependencies
dependents = `brew uses #{formula_name}`.split("\n")
+ dependents -= @formulae
dependents = dependents.map {|d| Formulary.factory(d)}
testable_dependents = dependents.select {|d| d... | false |
Other | Homebrew | brew | 459f92b065546ebef244f101636c49aca9bc4b2b.json | Remove another use of the direct url writer
masgn is hard to grep for :/ | Library/Homebrew/cmd/create.rb | @@ -109,7 +109,9 @@ def generate!
if fetch? && version
r = Resource.new
- r.url, r.version, r.owner = url, version, self
+ r.url(url)
+ r.version(version)
+ r.owner = self
@sha1 = r.fetch.sha1 if r.download_strategy == CurlDownloadStrategy
end
| false |
Other | Homebrew | brew | 0f01e9ff43c1576bc91741732ca961ee3d7e0545.json | Remove the direct url writer from Resource | Library/Homebrew/patch.rb | @@ -161,7 +161,7 @@ def inspect
class LegacyPatch < ExternalPatch
def initialize(strip, url)
super(strip)
- resource.url = url
+ resource.url(url)
resource.download_strategy = CurlDownloadStrategy
end
| true |
Other | Homebrew | brew | 0f01e9ff43c1576bc91741732ca961ee3d7e0545.json | Remove the direct url writer from Resource | Library/Homebrew/resource.rb | @@ -9,7 +9,7 @@ class Resource
include FileUtils
attr_reader :checksum, :mirrors, :specs, :using
- attr_writer :url, :checksum, :version
+ attr_writer :checksum, :version
attr_accessor :download_strategy
# Formula name must be set after the DSL, as we have no access to the | true |
Other | Homebrew | brew | 0f01e9ff43c1576bc91741732ca961ee3d7e0545.json | Remove the direct url writer from Resource | Library/Homebrew/software_spec.rb | @@ -224,7 +224,7 @@ def initialize(formula, spec)
checksum, tag = spec.checksum_for(bottle_tag)
filename = Filename.create(formula, tag, spec.revision)
- @resource.url = build_url(spec.root_url, filename)
+ @resource.url(build_url(spec.root_url, filename))
@resource.download_strategy = CurlBottle... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.