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 | 3dc0df5a774272766e2187b46df97742b3aec28a.json | missing_formula.rb: add help message for cargo
...modeled after the existing message for pip.
Also sync format of the gfortran and lzma messages,
and use typographic apostrophe in the *tex message. | Library/Homebrew/missing_formula.rb | @@ -15,7 +15,7 @@ def blacklisted_reason(name)
EOS
when "tex", "tex-live", "texlive", "latex" then <<~EOS
Installing TeX from source is weird and gross, requires a lot of patches,
- and only builds 32-bit (and thus can't use Homebrew dependencies)
+ and only builds 32-bit (and thus can’t use Homebrew dependencies)
We recommend using a MacTeX distribution: https://www.tug.org/mactex/
@@ -36,8 +36,10 @@ def blacklisted_reason(name)
You can read more about it at:
#{Formatter.url("https://github.com/MacRuby/MacRuby")}
EOS
- when /(lib)?lzma/
- "lzma is now part of the xz formula."
+ when /(lib)?lzma/ then <<~EOS
+ lzma is now part of the xz formula, and can be installed with:
+ brew install xz.
+ EOS
when "gtest", "googletest", "google-test" then <<~EOS
Installing gtest system-wide is not recommended; it should be vendored
in your projects that use it.
@@ -54,7 +56,7 @@ def blacklisted_reason(name)
Install gsutil with `pip2 install gsutil`
EOS
when "gfortran" then <<~EOS
- GNU Fortran is now provided as part of GCC, and can be installed with:
+ GNU Fortran is now part of the GCC formula, and can be installed with:
brew install gcc
EOS
when "play" then <<~EOS
@@ -79,6 +81,9 @@ def blacklisted_reason(name)
If you wish to use the 2.x release you can install with Homebrew Cask:
brew cask install ngrok
EOS
+ when "cargo" then <<~EOS
+ Homebrew provides cargo via: `brew install rust`.
+ EOS
end
end
alias generic_blacklisted_reason blacklisted_reason | false |
Other | Homebrew | brew | 04473795b1abed43463cb4668a75cf3b0ea30b75.json | docs: Remove Linux from the unsupported tap list | docs/Interesting-Taps-and-Forks.md | @@ -32,5 +32,3 @@ Your taps are Git repositories located at `$(brew --repository)/Library/Taps`.
## Unsupported interesting forks
* [mistydemeo/tigerbrew](https://github.com/mistydemeo/tigerbrew): Experimental Tiger PowerPC version.
-
-* [Linuxbrew/brew](https://github.com/Linuxbrew/brew): Experimental Linux version. | false |
Other | Homebrew | brew | 947b90961bd4a5d903f39ba870d92da9e711d2f7.json | Note leadership changes
Today the Homebrew maintainers elected a new PLC, TSC and project lead.
Documentation is to follow detailing exactly the responsibilities for
each of these roles but adjust these to reflect the current state until
that point. | Library/Homebrew/dev-cmd/man.rb | @@ -67,22 +67,22 @@ def build_man_page
variables[:global_options] = global_options_manpage
readme = HOMEBREW_REPOSITORY/"README.md"
- variables[:lead_maintainer] =
- readme.read[/(Homebrew's lead maintainer .*\.)/, 1]
+ variables[:lead] =
+ readme.read[/(Homebrew's project lead .*\.)/, 1]
.gsub(/\[([^\]]+)\]\([^)]+\)/, '\1')
- variables[:leadership] =
+ variables[:plc] =
readme.read[/(Homebrew's project leadership committee .*\.)/, 1]
.gsub(/\[([^\]]+)\]\([^)]+\)/, '\1')
- variables[:brew_maintainers] =
- readme.read[%r{(Homebrew/brew's other current maintainers .*\.)}, 1]
+ variables[:tsc] =
+ readme.read[/(Homebrew's technical steering committee .*\.)/, 1]
.gsub(/\[([^\]]+)\]\([^)]+\)/, '\1')
- variables[:linux_maintainers] =
+ variables[:linux] =
readme.read[%r{(Homebrew/brew's Linux support \(and Linuxbrew\) maintainers are .*\.)}, 1]
.gsub(/\[([^\]]+)\]\([^)]+\)/, '\1')
- variables[:core_maintainers] =
- readme.read[%r{(Homebrew/homebrew-core's other current maintainers .*\.)}, 1]
+ variables[:maintainers] =
+ readme.read[/(Homebrew's other current maintainers .*\.)/, 1]
.gsub(/\[([^\]]+)\]\([^)]+\)/, '\1')
- variables[:former_maintainers] =
+ variables[:alumni] =
readme.read[/(Former maintainers .*\.)/, 1]
.gsub(/\[([^\]]+)\]\([^)]+\)/, '\1')
| true |
Other | Homebrew | brew | 947b90961bd4a5d903f39ba870d92da9e711d2f7.json | Note leadership changes
Today the Homebrew maintainers elected a new PLC, TSC and project lead.
Documentation is to follow detailing exactly the responsibilities for
each of these roles but adjust these to reflect the current state until
that point. | Library/Homebrew/manpages/brew.1.md.erb | @@ -308,17 +308,17 @@ Homebrew Documentation: <https://docs.brew.sh>
## AUTHORS
-<%= lead_maintainer.concat("\n") %>
+<%= lead.concat("\n") %>
-<%= leadership.concat("\n") %>
+<%= plc.concat("\n") %>
-<%= brew_maintainers.concat("\n") %>
+<%= tsc.concat("\n") %>
-<%= linux_maintainers.concat("\n") %>
+<%= linux.concat("\n") %>
-<%= core_maintainers.concat("\n") %>
+<%= maintainers.concat("\n") %>
-<%= former_maintainers.concat("\n") %>
+<%= alumni.concat("\n") %>
## BUGS
| true |
Other | Homebrew | brew | 947b90961bd4a5d903f39ba870d92da9e711d2f7.json | Note leadership changes
Today the Homebrew maintainers elected a new PLC, TSC and project lead.
Documentation is to follow detailing exactly the responsibilities for
each of these roles but adjust these to reflect the current state until
that point. | README.md | @@ -35,15 +35,15 @@ Good luck!
Please report security issues to our [HackerOne](https://hackerone.com/homebrew/).
## Who Are You?
-Homebrew's lead maintainer is [Mike McQuaid](https://github.com/mikemcquaid).
+Homebrew's project lead is [Mike McQuaid](https://github.com/MikeMcQuaid).
-Homebrew's project leadership committee is [Mike McQuaid](https://github.com/mikemcquaid), [Misty De Meo](https://github.com/mistydemeo) and [Markus Reiter](https://github.com/reitermarkus).
+Homebrew's project leadership committee is [Misty De Meo](https://github.com/mistydemeo), [Shaun Jackman](https://github.com/sjackman), [Jonathan Chang](https://github.com/jonchang), [Mike McQuaid](https://github.com/MikeMcQuaid) and [Markus Reiter](https://github.com/reitermarkus).
-Homebrew/brew's other current maintainers are [Claudia Pellegrino](https://github.com/claui), [Michka Popoff](https://github.com/imichka), [Shaun Jackman](https://github.com/sjackman), [Chongyu Zhu](https://github.com/lembacon), [Vitor Galvao](https://github.com/vitorgalvao), [Misty De Meo](https://github.com/mistydemeo), [Gautham Goli](https://github.com/GauthamGoli), [Markus Reiter](https://github.com/reitermarkus), [Steven Peters](https://github.com/scpeters), [Jonathan Chang](https://github.com/jonchang) and [William Woodruff](https://github.com/woodruffw).
+Homebrew's technical steering committee is [Michka Popoff](https://github.com/imichka), [FX Coudert](https://github.com/fxcoudert), [Markus Reiter](https://github.com/reitermarkus), [Misty De Meo](https://github.com/mistydemeo) and [Mike McQuaid](https://github.com/MikeMcQuaid).
Homebrew/brew's Linux support (and Linuxbrew) maintainers are [Michka Popoff](https://github.com/imichka) and [Shaun Jackman](https://github.com/sjackman).
-Homebrew/homebrew-core's other current maintainers are [Claudia Pellegrino](https://github.com/claui), [Igor Kapkov](https://github.com/igas), [Michka Popoff](https://github.com/imichka), [Shaun Jackman](https://github.com/sjackman), [Chongyu Zhu](https://github.com/lembacon), [Izaak Beekman](https://github.com/zbeekman), [Sean Molenaar](https://github.com/SMillerDev), [Jan Viljanen](https://github.com/javian), [Jason Tedor](https://github.com/jasontedor), [Viktor Szakats](https://github.com/vszakats), [FX Coudert](https://github.com/fxcoudert), [Thierry Moisan](https://github.com/moisan), [Steven Peters](https://github.com/scpeters), [Misty De Meo](https://github.com/mistydemeo) and [Tom Schoonjans](https://github.com/tschoonj).
+Homebrew's other current maintainers are [Claudia Pellegrino](https://github.com/claui), [Chongyu Zhu](https://github.com/lembacon), [Vitor Galvao](https://github.com/vitorgalvao), [Gautham Goli](https://github.com/GauthamGoli), [Steven Peters](https://github.com/scpeters), [William Woodruff](https://github.com/woodruffw), [Igor Kapkov](https://github.com/igas), [Izaak Beekman](https://github.com/zbeekman), [Sean Molenaar](https://github.com/SMillerDev), [Jan Viljanen](https://github.com/javian), [Jason Tedor](https://github.com/jasontedor), [Viktor Szakats](https://github.com/vszakats), [Thierry Moisan](https://github.com/moisan), [Steven Peters](https://github.com/scpeters) and [Tom Schoonjans](https://github.com/tschoonj).
Former maintainers with significant contributions include [JCount](https://github.com/jcount), [commitay](https://github.com/commitay), [Dominyk Tiller](https://github.com/DomT4), [Tim Smith](https://github.com/tdsmith), [Baptiste Fontaine](https://github.com/bfontaine), [Xu Cheng](https://github.com/xu-cheng), [Martin Afanasjew](https://github.com/UniqMartin), [Brett Koonce](https://github.com/asparagui), [Charlie Sharpsteen](https://github.com/Sharpie), [Jack Nagel](https://github.com/jacknagel), [Adam Vandenberg](https://github.com/adamv), [Andrew Janke](https://github.com/apjanke), [Alex Dunn](https://github.com/dunn), [neutric](https://github.com/neutric), [Tomasz Pajor](https://github.com/nijikon), [Uladzislau Shablinski](https://github.com/vladshablinsky), [Alyssa Ross](https://github.com/alyssais), [ilovezfs](https://github.com/ilovezfs) and Homebrew's creator: [Max Howell](https://github.com/mxcl).
| true |
Other | Homebrew | brew | 947b90961bd4a5d903f39ba870d92da9e711d2f7.json | Note leadership changes
Today the Homebrew maintainers elected a new PLC, TSC and project lead.
Documentation is to follow detailing exactly the responsibilities for
each of these roles but adjust these to reflect the current state until
that point. | docs/Maintainer-Guidelines.md | @@ -156,30 +156,7 @@ All maintainers (and lead maintainer) communication through any medium is bound
Maintainers should feel free to pleasantly disagree with the work and decisions of other maintainers. Healthy, friendly, technical disagreement between maintainers is actively encouraged and should occur in public on the issue tracker to make the project better. Interpersonal issues should be handled privately in Slack, ideally with moderation. If work or decisions are insufficiently documented or explained any maintainer or contributor should feel free to ask for clarification. No maintainer may ever justify a decision with e.g. "because I say so" or "it was I who did X" alone. Off-topic discussions on the issue tracker, [bike-shedding](https://en.wikipedia.org/wiki/Law_of_triviality) and personal attacks are forbidden.
-## Lead maintainer guidelines
-There should be one lead maintainer for Homebrew. Decisions are determined by a consensus of the maintainers. When a consensus is not reached, the lead maintainer has the final say in determining the outcome of any decision (though this power should be used sparingly). They should also be seen as the product manager for Homebrew itself and ensuring that changes made to the entire Homebrew ecosystem are consistent and providing an increasingly positive experience for Homebrew's users.
+## Project lead guidelines
+There should be one project lead for Homebrew. On February 4th (to coincide with Homebrew maintainers' conference), Mike stepped down as lead maintainer of Homebrew and was elected by a supermajority of Homebrew maintainers into the new project lead role.
-In the same way that Homebrew maintainers are expected to be spending more of their time reviewing and merging contributions from non-maintainer contributors than making their own contributions, the lead maintainer should be spending most of their time reviewing work from and mentoring other maintainers.
-
-Individual Homebrew repositories should not have formal lead maintainers (although those who do the most work will have the loudest voices).
-
-Maintainers should feel even more free to pleasantly disagree with the work and decisions of the lead maintainer: with greater authority comes greater responsibility to handle and moderate technical disagreements.
-
-Homebrew's last lead maintainer will be Mike McQuaid. On February 4th (to coincide with Homebrew maintainers' conference), Mike will step down as lead maintainer of Homebrew and his responsibilities will be passed on to the project leadership committee and/or a new, technical steering committee and/or something else.
-
-Some food for thought and discussion before those dates:
-
-- [How the Apache Software Foundation Works](https://www.apache.org/foundation/how-it-works.html)
-- [Debian Project Leader documentation]()
-- [Debian Technical Committee documentation](https://www.debian.org/devel/tech-ctte)
-- [Debian's Organizational Structure](https://www.debian.org/intro/organization)
-- [QEMU SFC PLC documentation](https://wiki.qemu.org/Conservancy)
-- [libgit2 SFC PLC creation discussion](https://github.com/libgit2/discussions/issues/9)
-
-Some essential TODO before these dates:
-
-- Decide how to spend more of Homebrew's money to be useful for the project
-- Decide how technical and non-technical decisions are reached and conflicts resolved
-- Move Homebrew to a new CI system which does not require ideally any manual system administration
-- Onboard as many new maintainers as possible
-- Generally hand off and document any other responsibilities that are (and always have been) done by Mike McQuaid alone onto other groups of people
+Additional documentation for the project lead and governance are to follow. | true |
Other | Homebrew | brew | 947b90961bd4a5d903f39ba870d92da9e711d2f7.json | Note leadership changes
Today the Homebrew maintainers elected a new PLC, TSC and project lead.
Documentation is to follow detailing exactly the responsibilities for
each of these roles but adjust these to reflect the current state until
that point. | docs/Manpage.md | @@ -1183,15 +1183,15 @@ Homebrew Documentation: <https://docs.brew.sh>
## AUTHORS
-Homebrew's lead maintainer is Mike McQuaid.
+Homebrew's project lead is Mike McQuaid.
-Homebrew's project leadership committee is Mike McQuaid, Misty De Meo and Markus Reiter.
+Homebrew's project leadership committee is Misty De Meo, Shaun Jackman, Jonathan Chang, Mike McQuaid and Markus Reiter.
-Homebrew/brew's other current maintainers are Claudia Pellegrino, Michka Popoff, Shaun Jackman, Chongyu Zhu, Vitor Galvao, Misty De Meo, Gautham Goli, Markus Reiter, Steven Peters, Jonathan Chang and William Woodruff.
+Homebrew's technical steering committee is Michka Popoff, FX Coudert, Markus Reiter, Misty De Meo and Mike McQuaid.
Homebrew/brew's Linux support (and Linuxbrew) maintainers are Michka Popoff and Shaun Jackman.
-Homebrew/homebrew-core's other current maintainers are Claudia Pellegrino, Igor Kapkov, Michka Popoff, Shaun Jackman, Chongyu Zhu, Izaak Beekman, Sean Molenaar, Jan Viljanen, Jason Tedor, Viktor Szakats, FX Coudert, Thierry Moisan, Steven Peters, Misty De Meo and Tom Schoonjans.
+Homebrew's other current maintainers are Claudia Pellegrino, Chongyu Zhu, Vitor Galvao, Gautham Goli, Steven Peters, William Woodruff, Igor Kapkov, Izaak Beekman, Sean Molenaar, Jan Viljanen, Jason Tedor, Viktor Szakats, Thierry Moisan, Steven Peters and Tom Schoonjans.
Former maintainers with significant contributions include JCount, commitay, Dominyk Tiller, Tim Smith, Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg, Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs and Homebrew's creator: Max Howell.
| true |
Other | Homebrew | brew | 947b90961bd4a5d903f39ba870d92da9e711d2f7.json | Note leadership changes
Today the Homebrew maintainers elected a new PLC, TSC and project lead.
Documentation is to follow detailing exactly the responsibilities for
each of these roles but adjust these to reflect the current state until
that point. | manpages/brew.1 | @@ -1431,19 +1431,19 @@ Homebrew Documentation: \fIhttps://docs\.brew\.sh\fR
\fBbrew\-cask\fR(1), \fBgit\fR(1), \fBgit\-log\fR(1)
.
.SH "AUTHORS"
-Homebrew\'s lead maintainer is Mike McQuaid\.
+Homebrew\'s project lead is Mike McQuaid\.
.
.P
-Homebrew\'s project leadership committee is Mike McQuaid, Misty De Meo and Markus Reiter\.
+Homebrew\'s project leadership committee is Misty De Meo, Shaun Jackman, Jonathan Chang, Mike McQuaid and Markus Reiter\.
.
.P
-Homebrew/brew\'s other current maintainers are Claudia Pellegrino, Michka Popoff, Shaun Jackman, Chongyu Zhu, Vitor Galvao, Misty De Meo, Gautham Goli, Markus Reiter, Steven Peters, Jonathan Chang and William Woodruff\.
+Homebrew\'s technical steering committee is Michka Popoff, FX Coudert, Markus Reiter, Misty De Meo and Mike McQuaid\.
.
.P
Homebrew/brew\'s Linux support (and Linuxbrew) maintainers are Michka Popoff and Shaun Jackman\.
.
.P
-Homebrew/homebrew\-core\'s other current maintainers are Claudia Pellegrino, Igor Kapkov, Michka Popoff, Shaun Jackman, Chongyu Zhu, Izaak Beekman, Sean Molenaar, Jan Viljanen, Jason Tedor, Viktor Szakats, FX Coudert, Thierry Moisan, Steven Peters, Misty De Meo and Tom Schoonjans\.
+Homebrew\'s other current maintainers are Claudia Pellegrino, Chongyu Zhu, Vitor Galvao, Gautham Goli, Steven Peters, William Woodruff, Igor Kapkov, Izaak Beekman, Sean Molenaar, Jan Viljanen, Jason Tedor, Viktor Szakats, Thierry Moisan, Steven Peters and Tom Schoonjans\.
.
.P
Former maintainers with significant contributions include JCount, commitay, Dominyk Tiller, Tim Smith, Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg, Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs and Homebrew\'s creator: Max Howell\. | true |
Other | Homebrew | brew | ff4544eebd4fb711b44b80bdd6e569caf1dce9a8.json | cmd/update: Add quiet flag | Library/Homebrew/cmd/update-report.rb | @@ -26,6 +26,7 @@ def update_report_args
switch "--preinstall",
description: "Run in 'auto-update' mode (faster, less output)."
switch :force
+ switch :quiet
switch :debug
switch :verbose
hide_from_man_page! | false |
Other | Homebrew | brew | 6db1b0abd869c091a889c5342203599a3291d3eb.json | Handle regex not finding anything | Library/Homebrew/utils/curl.rb | @@ -60,7 +60,7 @@ def curl_download(*args, to: nil, **options)
supports_partial_download = http_status.to_i == 206 # Partial Content
if supports_partial_download &&
destination.exist? &&
- destination.size == %r{^.*Content-Range: bytes \d+-\d+/(\d+)\r\n.*$}m.match(headers)[1].to_i
+ destination.size == %r{^.*Content-Range: bytes \d+-\d+/(\d+)\r\n.*$}m.match(headers)&.[](1)&.to_i
return # We've already downloaded all the bytes
end
| false |
Other | Homebrew | brew | 6fe75fb1542995cdc641ca77f0529bfbb66f958e.json | cleanup: fix stale cask detection.
This method is also run to check formulae and if a formula and cask have
the same name (e.g. `cmake`) then this method would mark all formulae
downloads to being stale.
Instead, check the `dirname` (which we're using for globs anyway) to
double check that this is definitely a stale cask. | Library/Homebrew/cleanup.rb | @@ -112,6 +112,8 @@ def stale_formula?(scrub)
def stale_cask?(scrub)
return false unless name = basename.to_s[/\A(.*?)\-\-/, 1]
+ return if dirname.basename.to_s != "Cask"
+
cask = begin
Cask::CaskLoader.load(name)
rescue Cask::CaskUnavailableError | false |
Other | Homebrew | brew | 7c1d3bef2b8a3c40dc4150a0355339c0d36f4c2d.json | Commit typo manpage updates. | docs/Manpage.md | @@ -49,7 +49,7 @@ If `regenerate-uuid` is passed, regenerate UUID used in Homebrew's analytics.
### `cat` *`formula`*
-Display the source to *`formula`*.
+Display the source of *`formula`*.
### `cleanup` [*`options`*] [*`formula`*|*`cask`*]
| true |
Other | Homebrew | brew | 7c1d3bef2b8a3c40dc4150a0355339c0d36f4c2d.json | Commit typo manpage updates. | manpages/brew-cask.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW\-CASK" "1" "January 2019" "Homebrew" "brew-cask"
+.TH "BREW\-CASK" "1" "February 2019" "Homebrew" "brew-cask"
.
.SH "NAME"
\fBbrew\-cask\fR \- a friendly binary installer for macOS | true |
Other | Homebrew | brew | 7c1d3bef2b8a3c40dc4150a0355339c0d36f4c2d.json | Commit typo manpage updates. | manpages/brew.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "January 2019" "Homebrew" "brew"
+.TH "BREW" "1" "February 2019" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for macOS
@@ -45,7 +45,7 @@ If \fBstate\fR is passed, display anonymous user behaviour analytics state\. Rea
If \fBregenerate\-uuid\fR is passed, regenerate UUID used in Homebrew\'s analytics\.
.
.SS "\fBcat\fR \fIformula\fR"
-Display the source to \fIformula\fR\.
+Display the source of \fIformula\fR\.
.
.SS "\fBcleanup\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR]"
Remove stale lock files and outdated downloads for formulae and casks, and remove old versions of installed formulae\. If arguments are specified, only do this for the specified formulae and casks\. | true |
Other | Homebrew | brew | fd4e45c688631db4c24841e98a811376d4a58e08.json | lines_spec: fix a typo. | Library/Homebrew/cmd/update-report.rb | @@ -4,6 +4,7 @@
require "descriptions"
require "cleanup"
require "description_cache_store"
+require "cli_parser"
module Homebrew
module_function | true |
Other | Homebrew | brew | fd4e45c688631db4c24841e98a811376d4a58e08.json | lines_spec: fix a typo. | Library/Homebrew/test/rubocops/lines_spec.rb | @@ -650,7 +650,7 @@ def install
RUBY
end
- it "dependecies which have to vendored" do
+ it "dependencies which have to vendored" do
expect_offense(<<~RUBY)
class Foo < Formula
desc "foo" | true |
Other | Homebrew | brew | f1d6c0f5a459e0a3ebefc6b15646e35d40d3ff80.json | completions/zsh: fix a typo. | completions/zsh/_brew | @@ -115,7 +115,7 @@ __brew_common_commands() {
'link:link a formula'
'list:list files in a formula or not-installed formulae'
'log:git commit log for a formula'
- 'missing:check all installed formuale for missing dependencies.'
+ 'missing:check all installed formulae for missing dependencies.'
'migrate:migrate renamed formula to new name'
'outdated:list formulae for which a newer version is available'
'pin:pin specified formulae' | false |
Other | Homebrew | brew | 4ace1af297b633b1297a57650f5ca85c5aa9becb.json | help: improve command --help output. | Library/Homebrew/help.rb | @@ -76,10 +76,13 @@ def help(cmd = nil, flags = {})
def command_help(path)
# Let OptionParser generate help text for commands which have a parser defined
+ cmd = path.basename(path.extname)
+ cmd_args_method_name = "#{cmd.to_s.tr("-", "_")}_args".to_sym
begin
- cmd = path.basename(path.extname)
- return Homebrew.send("#{cmd.to_s.tr("-", "_")}_args".to_sym).generate_help_text
- rescue NoMethodError
+ return Homebrew.send(cmd_args_method_name)
+ .generate_help_text
+ rescue NoMethodError => e
+ raise if e.name != cmd_args_method_name
nil
end
@@ -89,7 +92,8 @@ def command_help(path)
HOMEBREW_HELP
else
help_lines.map do |line|
- line.sub(/^ \* /, "#{Tty.bold}brew#{Tty.reset} ")
+ line.gsub(/^ /, "")
+ .sub(/^\* /, "#{Tty.bold}Usage: brew#{Tty.reset} ")
.gsub(/`(.*?)`/, "#{Tty.bold}\\1#{Tty.reset}")
.gsub(%r{<([^\s]+?://[^\s]+?)>}) { |url| Formatter.url(url) }
.gsub(/<(.*?)>/, "#{Tty.underline}\\1#{Tty.reset}") | true |
Other | Homebrew | brew | 4ace1af297b633b1297a57650f5ca85c5aa9becb.json | help: improve command --help output. | Library/Homebrew/test/cmd/help_spec.rb | @@ -20,7 +20,7 @@
it "prints help for a documented shell command" do
expect { brew "help", "update" }
- .to output(/^brew update/).to_stdout
+ .to output(/^Usage: brew update/).to_stdout
.and be_a_success
end
| true |
Other | Homebrew | brew | 1bdcd2001c53556a3cdc472b0b3797d3822a800b.json | cli_parser: allow hiding from man page. | Library/Homebrew/cli_parser.rb | @@ -5,7 +5,7 @@
module Homebrew
module CLI
class Parser
- attr_reader :processed_options
+ attr_reader :processed_options, :hide_from_man_page
def self.parse(args = ARGV, &block)
new(&block).parse(args)
@@ -29,6 +29,7 @@ def initialize(&block)
@conflicts = []
@processed_options = []
@desc_line_length = 43
+ @hide_from_man_page = false
instance_eval(&block)
post_initialize
end
@@ -163,6 +164,10 @@ def formula_options
end
end
+ def hide_from_man_page!
+ @hide_from_man_page = true
+ end
+
private
def enable_switch(*names) | false |
Other | Homebrew | brew | a10ba20459d8dec55d09ee0d4b6442258ea642eb.json | brew.1.md.erb: improve output consistency. | Library/Homebrew/manpages/brew.1.md.erb | @@ -29,52 +29,55 @@ For the full command list, see the [COMMANDS](#commands) section.
With `--verbose` or `-v`, many commands print extra debugging information. Note that
these flags should only appear after a command.
- * `install` <formula>:
- Install <formula>.
+### `install` <formula>:
- * `uninstall` <formula>:
- Uninstall <formula>.
+Install <formula>.
- * `update`:
- Fetch the newest version of Homebrew from GitHub using `git`(1).
+### `uninstall` <formula>:
- * `list`:
- List all installed formulae.
+Uninstall <formula>.
- * `search` (<text>|`/`<text>`/`):
- Perform a substring search of cask tokens and formula names for <text>. If <text>
- is surrounded with slashes, then it is interpreted as a regular expression.
- The search for <text> is extended online to `homebrew/core` and `homebrew/cask`.
- If no search term is given, all locally available formulae are listed.
+### `list`:
+
+List all installed formulae.
+
+### `search` (<text>|`/`<text>`/`):
+Perform a substring search of cask tokens and formula names for <text>. If <text>
+is surrounded with slashes, then it is interpreted as a regular expression.
+The search for <text> is extended online to `homebrew/core` and `homebrew/cask`.
+If no search term is given, all locally available formulae are listed.
## COMMANDS
-<%= commands.join("\n") %>
+<%= commands %>
## DEVELOPER COMMANDS
-<%= developer_commands.join("\n") %>
+<%= developer_commands %>
## GLOBAL OPTIONS
-<%= global_options.join("\n") %>
+<%= global_options %>
## OFFICIAL EXTERNAL COMMANDS
- <%= homebrew_bundle.join.strip %>
+### `bundle` <subcommand>:
+
+Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App Store. See `brew bundle --help`.
+**Homebrew/homebrew-bundle**: <https://github.com/Homebrew/homebrew-bundle>
- **Homebrew/homebrew-bundle**: <https://github.com/Homebrew/homebrew-bundle>
+### `cask` <subcommand>:
- * `cask` [`--version` | `audit` | `cat` | `cleanup` | `create` | `doctor` | `edit` | `fetch` | `home` | `info`]:
- Install macOS applications distributed as binaries.
+Install macOS applications distributed as binaries. See brew-cask(1).
- **Homebrew/homebrew-cask**: <https://github.com/Homebrew/homebrew-cask>
+**Homebrew/homebrew-cask**: <https://github.com/Homebrew/homebrew-cask>
- <%= homebrew_services.join.strip %>
+### `services` <subcommand>:
+Manage background services with macOS' `launchctl`(1) daemon manager. See `brew services --help`.
- **Homebrew/homebrew-services**: <https://github.com/Homebrew/homebrew-services>
+**Homebrew/homebrew-services**: <https://github.com/Homebrew/homebrew-services>
## CUSTOM EXTERNAL COMMANDS
@@ -213,7 +216,7 @@ Note that environment variables must have a value set to be detected. For exampl
rather than falling back to building from source.
* `HOMEBREW_NO_COLOR`:
- If set, Homebrew will not print text with color added.
+ If set, Homebrew will not print text with colour added.
* `HOMEBREW_NO_EMOJI`:
If set, Homebrew will not print the `HOMEBREW_INSTALL_BADGE` on a | false |
Other | Homebrew | brew | 0fff6e0c09f2d1bdf9d1486b193840f0b1bc356e.json | man: improve manpage output. | Library/Homebrew/dev-cmd/man.rb | @@ -11,24 +11,8 @@
require "erb"
require "ostruct"
require "cli_parser"
-require "dev-cmd/audit"
-require "dev-cmd/bottle"
-require "dev-cmd/bump-formula-pr"
-require "dev-cmd/create"
-require "dev-cmd/edit"
-require "dev-cmd/extract"
-require "dev-cmd/formula"
-require "dev-cmd/irb"
-require "dev-cmd/linkage"
-require "dev-cmd/mirror"
-require "dev-cmd/prof"
-require "dev-cmd/pull"
-require "dev-cmd/release-notes"
-require "dev-cmd/ruby"
-require "dev-cmd/tap-new"
-require "dev-cmd/test"
-require "dev-cmd/tests"
-require "dev-cmd/update-test"
+# Require all commands
+Dir.glob("#{HOMEBREW_LIBRARY_PATH}/{dev-,}cmd/*.rb").each { |cmd| require cmd }
module Homebrew
module_function
@@ -83,22 +67,14 @@ def regenerate_man_pages
convert_man_page(cask_markup, TARGET_MAN_PATH/"brew-cask.1")
end
- def path_glob_commands(glob)
- Pathname.glob(glob)
- .sort_by { |source_file| sort_key_for_path(source_file) }
- .map(&:read).map(&:lines)
- .map { |lines| lines.grep(/^#:/).map { |line| line.slice(2..-1) }.join }
- .reject { |s| s.strip.empty? || s.include?("@hide_from_man_page") }
- end
-
def build_man_page
template = (SOURCE_PATH/"brew.1.md.erb").read
variables = OpenStruct.new
- variables[:commands] = path_glob_commands("#{HOMEBREW_LIBRARY_PATH}/cmd/*.{rb,sh}")
+ variables[:commands] = generate_cmd_manpages("#{HOMEBREW_LIBRARY_PATH}/cmd/*.{rb,sh}")
+ variables[:developer_commands] = generate_cmd_manpages("#{HOMEBREW_LIBRARY_PATH}/dev-cmd/{*.rb,sh}")
+ variables[:global_options] = global_options_manpage
- variables[:developer_commands] = generate_cmd_manpages("#{HOMEBREW_LIBRARY_PATH}/dev-cmd/*.{rb,sh}")
- variables[:global_options] = global_options_manpage_lines
readme = HOMEBREW_REPOSITORY/"README.md"
variables[:lead_maintainer] =
readme.read[/(Homebrew's lead maintainer .*\.)/, 1]
@@ -119,9 +95,6 @@ def build_man_page
readme.read[/(Former maintainers .*\.)/, 1]
.gsub(/\[([^\]]+)\]\([^)]+\)/, '\1')
- variables[:homebrew_bundle] = help_output(:bundle)
- variables[:homebrew_services] = help_output(:services)
-
ERB.new(template, nil, ">").result(variables.instance_eval { binding })
end
@@ -162,6 +135,7 @@ def convert_man_page(markup, target)
odie "Got no output from ronn!" unless ronn_output
if format_flag == "--markdown"
ronn_output = ronn_output.gsub(%r{<var>(.*?)</var>}, "*`\\1`*")
+ .gsub(/\n\n\n+/, "\n\n")
elsif format_flag == "--roff"
ronn_output = ronn_output.gsub(%r{<code>(.*?)</code>}, "\\fB\\1\\fR")
.gsub(%r{<var>(.*?)</var>}, "\\fI\\1\\fR")
@@ -171,12 +145,6 @@ def convert_man_page(markup, target)
end
end
- def help_output(command)
- tap = Tap.fetch("Homebrew/homebrew-#{command}")
- tap.install unless tap.installed?
- command_help_lines(which("brew-#{command}.rb", Tap.cmd_directories))
- end
-
def target_path_to_format(target)
case target.basename
when /\.md$/ then ["--markdown", "markdown"]
@@ -190,38 +158,61 @@ def generate_cmd_manpages(glob)
cmd_paths = Pathname.glob(glob).sort
man_page_lines = []
man_args = Homebrew.args
- cmd_paths.each do |cmd_path|
- begin
- cmd_parser = Homebrew.send(cmd_arg_parser(cmd_path))
- man_page_lines << cmd_manpage_lines(cmd_parser).join
- rescue NoMethodError
- man_page_lines << path_glob_commands(cmd_path.to_s).first
+ # preserve existing manpage order
+ cmd_paths.sort_by(&method(:sort_key_for_path))
+ .each do |cmd_path|
+ cmd_args_method_name = cmd_arg_parser(cmd_path)
+
+ cmd_man_page_lines = begin
+ cmd_parser = Homebrew.send(cmd_args_method_name)
+ next if cmd_parser.hide_from_man_page
+ cmd_parser_manpage_lines(cmd_parser).join
+ rescue NoMethodError => e
+ raise if e.name != cmd_args_method_name
+ nil
end
+ cmd_man_page_lines ||= cmd_comment_manpage_lines(cmd_path)
+
+ man_page_lines << cmd_man_page_lines
end
Homebrew.args = man_args
- man_page_lines
+ man_page_lines.compact.join("\n")
end
def cmd_arg_parser(cmd_path)
"#{cmd_path.basename.to_s.gsub(".rb", "").tr("-", "_")}_args".to_sym
end
- def cmd_manpage_lines(cmd_parser)
+ def cmd_parser_manpage_lines(cmd_parser)
lines = [format_usage_banner(cmd_parser.usage_banner_text)]
lines += cmd_parser.processed_options.map do |short, long, _, desc|
next if !long.nil? && cmd_parser.global_option?(cmd_parser.option_to_name(long))
generate_option_doc(short, long, desc)
+ end.reject(&:blank?)
+ lines
+ end
+
+ def cmd_comment_manpage_lines(cmd_path)
+ comment_lines = cmd_path.read.lines.grep(/^#:/)
+ return if comment_lines.empty?
+ return if comment_lines.first.include?("@hide_from_man_page")
+ lines = [format_usage_banner(comment_lines.first).chomp]
+ comment_lines.slice(1..-1)
+ .each do |line|
+ line = line.slice(4..-1)
+ next unless line
+ lines << line.gsub(/^ +(-+[a-z-]+) */, "* `\\1`:\n ")
end
lines
end
- def global_options_manpage_lines
+ def global_options_manpage
lines = ["These options are applicable across all sub-commands.\n"]
lines += Homebrew::CLI::Parser.global_options.values.map do |names, _, desc|
short, long = names
generate_option_doc(short, long, desc)
end
- lines
+ lines.join("\n")
end
def generate_option_doc(short, long, desc)
@@ -238,6 +229,6 @@ def format_long_opt(opt)
end
def format_usage_banner(usage_banner)
- usage_banner.sub(/^/, "### ")
+ usage_banner&.sub(/^(#: *\* )?/, "### ")
end
end | false |
Other | Homebrew | brew | 51a260cf1cb467265b645f2ed7a99e7ac76fee12.json | deps: accept formula options.
Also, cleanup usage of `<formula>`.
As requested in comments of #5587. | Library/Homebrew/cmd/deps.rb | @@ -1,13 +1,13 @@
-#: * `deps` [`--1`] [`-n`] [`--union`] [`--full-name`] [`--installed`] [`--include-build`] [`--include-optional`] [`--skip-recommended`] [`--include-requirements`] <formulae>:
-#: Show dependencies for <formulae>. When given multiple formula arguments,
-#: show the intersection of dependencies for <formulae>.
+#: * `deps` [`--1`] [`-n`] [`--union`] [`--full-name`] [`--installed`] [`--include-build`] [`--include-optional`] [`--skip-recommended`] [`--include-requirements`] <formula>:
+#: Show dependencies for <formula>. When given multiple formula arguments,
+#: show the intersection of dependencies for every formula.
#:
#: If `--1` is passed, only show dependencies one level down, instead of
#: recursing.
#:
#: If `-n` is passed, show dependencies in topological order.
#:
-#: If `--union` is passed, show the union of dependencies for <formulae>,
+#: If `--union` is passed, show the union of dependencies for <formula>,
#: instead of the intersection.
#:
#: If `--full-name` is passed, list dependencies by their full name.
@@ -16,13 +16,13 @@
#: currently installed.
#:
#: By default, `deps` shows required and recommended dependencies for
-#: <formulae>. To include the `:build` type dependencies, pass `--include-build`.
+#: <formula>. To include the `:build` type dependencies, pass `--include-build`.
#: Similarly, pass `--include-optional` to include `:optional` dependencies or
#: `--include-test` to include (non-recursive) `:test` dependencies.
#: To skip `:recommended` type dependencies, pass `--skip-recommended`.
#: To include requirements in addition to dependencies, pass `--include-requirements`.
#:
-#: * `deps` `--tree` [`--1`] [<filters>] [`--annotate`] (<formulae>|`--installed`):
+#: * `deps` `--tree` [`--1`] [<filters>] [`--annotate`] (<formula>|`--installed`):
#: Show dependencies as a tree. When given multiple formula arguments, output
#: individual trees for every formula.
#:
@@ -45,6 +45,9 @@
#: The <filters> placeholder is any combination of options `--include-build`,
#: `--include-optional`, `--include-test`, and `--skip-recommended` as
#: documented above.
+#:
+#: Additional options specific to <formula> may be appended to the command,
+#: and can be listed with `brew options` <formula>.
# The undocumented `--for-each` option will switch into the mode used by `deps --all`,
# but only list dependencies for specified formula, one specified formula per line.
@@ -62,33 +65,33 @@ module Homebrew
def deps_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
- `deps` [<options>] <formulae>
+ `deps` [<options>] <formula>
- Show dependencies for <formulae>. When given multiple formula arguments,
- show the intersection of dependencies for <formulae>.
+ Show dependencies for <formula>. When given multiple formula arguments,
+ show the intersection of dependencies for <formula>.
EOS
switch "--1",
description: "Only show dependencies one level down, instead of recursing."
switch "-n",
description: "Show dependencies in topological order."
switch "--union",
- description: "Show the union of dependencies for <formulae>, instead of the intersection."
+ description: "Show the union of dependencies for <formula>, instead of the intersection."
switch "--full-name",
description: "List dependencies by their full name."
switch "--installed",
description: "Only list those dependencies that are currently installed."
switch "--all",
description: "List all the dependencies for all available formuale."
switch "--include-build",
- description: "Show `:build` type dependencies for <formulae>."
+ description: "Show `:build` type dependencies for <formula>."
switch "--include-optional",
- description: "Show `:optional` dependecies for <formulae>."
+ description: "Show `:optional` dependecies for <formula>."
switch "--include-test",
- description: "Show `:test` dependencies for <formulae> (non-recursive)."
+ description: "Show `:test` dependencies for <formula> (non-recursive)."
switch "--skip-recommended",
- description: "Skip `:recommended` type dependencies for <formulae>."
+ description: "Skip `:recommended` type dependencies for <formula>."
switch "--include-requirements",
- description: "Include requirements in addition to dependencies for <formulae>."
+ description: "Include requirements in addition to dependencies for <formula>."
switch "--tree",
description: "Show dependencies as a tree. When given multiple formula arguments "\
"output individual trees for every formula."
@@ -99,6 +102,7 @@ def deps_args
switch :verbose
switch :debug
conflicts "--installed", "--all"
+ formula_options
end
end
| true |
Other | Homebrew | brew | 51a260cf1cb467265b645f2ed7a99e7ac76fee12.json | deps: accept formula options.
Also, cleanup usage of `<formula>`.
As requested in comments of #5587. | docs/Manpage.md | @@ -79,16 +79,16 @@ these flags should only appear after a command.
a bug report, you will likely be asked for this information if you do not
provide it.
- * `deps` [`--1`] [`-n`] [`--union`] [`--full-name`] [`--installed`] [`--include-build`] [`--include-optional`] [`--skip-recommended`] [`--include-requirements`] *`formulae`*:
- Show dependencies for *`formulae`*. When given multiple formula arguments,
- show the intersection of dependencies for *`formulae`*.
+ * `deps` [`--1`] [`-n`] [`--union`] [`--full-name`] [`--installed`] [`--include-build`] [`--include-optional`] [`--skip-recommended`] [`--include-requirements`] *`formula`*:
+ Show dependencies for *`formula`*. When given multiple formula arguments,
+ show the intersection of dependencies for every formula.
If `--1` is passed, only show dependencies one level down, instead of
recursing.
If `-n` is passed, show dependencies in topological order.
- If `--union` is passed, show the union of dependencies for *`formulae`*,
+ If `--union` is passed, show the union of dependencies for *`formula`*,
instead of the intersection.
If `--full-name` is passed, list dependencies by their full name.
@@ -97,13 +97,13 @@ these flags should only appear after a command.
currently installed.
By default, `deps` shows required and recommended dependencies for
- *`formulae`*. To include the `:build` type dependencies, pass `--include-build`.
+ *`formula`*. To include the `:build` type dependencies, pass `--include-build`.
Similarly, pass `--include-optional` to include `:optional` dependencies or
`--include-test` to include (non-recursive) `:test` dependencies.
To skip `:recommended` type dependencies, pass `--skip-recommended`.
To include requirements in addition to dependencies, pass `--include-requirements`.
- * `deps` `--tree` [`--1`] [*`filters`*] [`--annotate`] (*`formulae`*|`--installed`):
+ * `deps` `--tree` [`--1`] [*`filters`*] [`--annotate`] (*`formula`*|`--installed`):
Show dependencies as a tree. When given multiple formula arguments, output
individual trees for every formula.
@@ -127,6 +127,9 @@ these flags should only appear after a command.
`--include-optional`, `--include-test`, and `--skip-recommended` as
documented above.
+ Additional options specific to *`formula`* may be appended to the command,
+ and can be listed with `brew options` *`formula`*.
+
* `desc` *`formula`*:
Display *`formula`*'s name and one-line description.
| true |
Other | Homebrew | brew | 51a260cf1cb467265b645f2ed7a99e7ac76fee12.json | deps: accept formula options.
Also, cleanup usage of `<formula>`.
As requested in comments of #5587. | manpages/brew.1 | @@ -88,8 +88,8 @@ If \fB\-\-quiet\fR is passed, list only the names of commands without the header
Show Homebrew and system configuration useful for debugging\. If you file a bug report, you will likely be asked for this information if you do not provide it\.
.
.TP
-\fBdeps\fR [\fB\-\-1\fR] [\fB\-n\fR] [\fB\-\-union\fR] [\fB\-\-full\-name\fR] [\fB\-\-installed\fR] [\fB\-\-include\-build\fR] [\fB\-\-include\-optional\fR] [\fB\-\-skip\-recommended\fR] [\fB\-\-include\-requirements\fR] \fIformulae\fR
-Show dependencies for \fIformulae\fR\. When given multiple formula arguments, show the intersection of dependencies for \fIformulae\fR\.
+\fBdeps\fR [\fB\-\-1\fR] [\fB\-n\fR] [\fB\-\-union\fR] [\fB\-\-full\-name\fR] [\fB\-\-installed\fR] [\fB\-\-include\-build\fR] [\fB\-\-include\-optional\fR] [\fB\-\-skip\-recommended\fR] [\fB\-\-include\-requirements\fR] \fIformula\fR
+Show dependencies for \fIformula\fR\. When given multiple formula arguments, show the intersection of dependencies for every formula\.
.
.IP
If \fB\-\-1\fR is passed, only show dependencies one level down, instead of recursing\.
@@ -98,7 +98,7 @@ If \fB\-\-1\fR is passed, only show dependencies one level down, instead of recu
If \fB\-n\fR is passed, show dependencies in topological order\.
.
.IP
-If \fB\-\-union\fR is passed, show the union of dependencies for \fIformulae\fR, instead of the intersection\.
+If \fB\-\-union\fR is passed, show the union of dependencies for \fIformula\fR, instead of the intersection\.
.
.IP
If \fB\-\-full\-name\fR is passed, list dependencies by their full name\.
@@ -107,10 +107,10 @@ If \fB\-\-full\-name\fR is passed, list dependencies by their full name\.
If \fB\-\-installed\fR is passed, only list those dependencies that are currently installed\.
.
.IP
-By default, \fBdeps\fR shows required and recommended dependencies for \fIformulae\fR\. To include the \fB:build\fR type dependencies, pass \fB\-\-include\-build\fR\. Similarly, pass \fB\-\-include\-optional\fR to include \fB:optional\fR dependencies or \fB\-\-include\-test\fR to include (non\-recursive) \fB:test\fR dependencies\. To skip \fB:recommended\fR type dependencies, pass \fB\-\-skip\-recommended\fR\. To include requirements in addition to dependencies, pass \fB\-\-include\-requirements\fR\.
+By default, \fBdeps\fR shows required and recommended dependencies for \fIformula\fR\. To include the \fB:build\fR type dependencies, pass \fB\-\-include\-build\fR\. Similarly, pass \fB\-\-include\-optional\fR to include \fB:optional\fR dependencies or \fB\-\-include\-test\fR to include (non\-recursive) \fB:test\fR dependencies\. To skip \fB:recommended\fR type dependencies, pass \fB\-\-skip\-recommended\fR\. To include requirements in addition to dependencies, pass \fB\-\-include\-requirements\fR\.
.
.TP
-\fBdeps\fR \fB\-\-tree\fR [\fB\-\-1\fR] [\fIfilters\fR] [\fB\-\-annotate\fR] (\fIformulae\fR|\fB\-\-installed\fR)
+\fBdeps\fR \fB\-\-tree\fR [\fB\-\-1\fR] [\fIfilters\fR] [\fB\-\-annotate\fR] (\fIformula\fR|\fB\-\-installed\fR)
Show dependencies as a tree\. When given multiple formula arguments, output individual trees for every formula\.
.
.IP
@@ -132,6 +132,9 @@ Show dependencies for installed or all available formulae\. Every line of output
.IP
The \fIfilters\fR placeholder is any combination of options \fB\-\-include\-build\fR, \fB\-\-include\-optional\fR, \fB\-\-include\-test\fR, and \fB\-\-skip\-recommended\fR as documented above\.
.
+.IP
+Additional options specific to \fIformula\fR may be appended to the command, and can be listed with \fBbrew options\fR \fIformula\fR\.
+.
.TP
\fBdesc\fR \fIformula\fR
Display \fIformula\fR\'s name and one\-line description\. | true |
Other | Homebrew | brew | de5b35876f31f540f1f7e02d6eb18dd88355702f.json | Use Mechanize to parse Content-Disposition. | .gitignore | @@ -25,6 +25,7 @@
**/vendor/bundle
**/vendor/ruby
**/vendor/bundle-standalone/ruby/*/bin
+**/vendor/bundle-standalone/ruby/*/build_info/
**/vendor/bundle-standalone/ruby/*/cache
**/vendor/bundle-standalone/ruby/*/extensions
**/vendor/bundle-standalone/ruby/*/gems/*/*
@@ -93,15 +94,33 @@
# Ignore rubocop's (and other) dependencies we don't wish to vendor
**/vendor/bundle-standalone/ruby/*/gems/ast-*/
+**/vendor/bundle-standalone/ruby/*/gems/connection_pool-*/lib
+**/vendor/bundle-standalone/ruby/*/gems/domain_name-*/lib
+**/vendor/bundle-standalone/ruby/*/gems/http-cookie-*/lib
**/vendor/bundle-standalone/ruby/*/gems/jaro_winkler-*/
+**/vendor/bundle-standalone/ruby/*/gems/mime-types-data-*/lib
+**/vendor/bundle-standalone/ruby/*/gems/mime-types-*/lib
+**/vendor/bundle-standalone/ruby/*/gems/mini_portile2-*/lib
**/vendor/bundle-standalone/ruby/*/gems/minitest-*/lib
+**/vendor/bundle-standalone/ruby/*/gems/net-http-digest_auth-*/lib
+**/vendor/bundle-standalone/ruby/*/gems/net-http-persistent-*/lib
+**/vendor/bundle-standalone/ruby/*/gems/nokogiri-*/lib
+**/vendor/bundle-standalone/ruby/*/gems/ntlm-http-*/lib
**/vendor/bundle-standalone/ruby/*/gems/parallel-*/
**/vendor/bundle-standalone/ruby/*/gems/parser-*/
**/vendor/bundle-standalone/ruby/*/gems/powerpack-*/
**/vendor/bundle-standalone/ruby/*/gems/rainbow-*/
**/vendor/bundle-standalone/ruby/*/gems/rubocop-0*/
**/vendor/bundle-standalone/ruby/*/gems/ruby-progressbar-*/
+**/vendor/bundle-standalone/ruby/*/gems/unf_ext-*/lib
+**/vendor/bundle-standalone/ruby/*/gems/unf-*/lib
**/vendor/bundle-standalone/ruby/*/gems/unicode-display_width-*/
+**/vendor/bundle-standalone/ruby/*/gems/webrobots-*/lib
+
+# Only include the `Mechanize::HTTP::ContentDispositionParser`.
+**/vendor/bundle-standalone/ruby/*/gems/mechanize-*/lib
+!**/vendor/bundle-standalone/ruby/*/gems/mechanize-*/lib/mechanize/http/content_disposition_parser.rb
+!**/vendor/bundle-standalone/ruby/*/gems/mechanize-*/lib/mechanize/version.rb
# Ignore `bin` contents (again).
/bin | true |
Other | Homebrew | brew | de5b35876f31f540f1f7e02d6eb18dd88355702f.json | Use Mechanize to parse Content-Disposition. | Library/Homebrew/download_strategy.rb | @@ -5,6 +5,9 @@
require "lazy_object"
require "cgi"
+require "mechanize/version"
+require "mechanize/http/content_disposition_parser"
+
class AbstractDownloadStrategy
extend Forwardable
include FileUtils
@@ -363,9 +366,20 @@ def resolve_url_basename_time(url)
end
end
- filenames =
- lines.map { |line| line[/^Content\-Disposition:\s*(?:inline|attachment);\s*filename=(["']?)([^;]+)\1/i, 2] }
- .compact
+ content_disposition_parser = Mechanize::HTTP::ContentDispositionParser.new
+
+ parse_content_disposition = lambda do |line|
+ next unless content_disposition = content_disposition_parser.parse(line, true)
+
+ if filename_with_encoding = content_disposition.parameters["filename*"]
+ encoding, encoded_filename = filename_with_encoding.split("''", 2)
+ URI.decode_www_form_component(encoded_filename).encode(encoding)
+ else
+ content_disposition.filename
+ end
+ end
+
+ filenames = lines.map(&parse_content_disposition).compact
time =
lines.map { |line| line[/^Last\-Modified:\s*(.+)/i, 1] } | true |
Other | Homebrew | brew | de5b35876f31f540f1f7e02d6eb18dd88355702f.json | Use Mechanize to parse Content-Disposition. | Library/Homebrew/vendor/Gemfile | @@ -3,6 +3,7 @@ source "https://rubygems.org"
gem "activesupport"
gem "concurrent-ruby"
gem "backports"
+gem "mechanize"
gem "plist"
gem "ruby-macho"
gem "rubocop-rspec" | true |
Other | Homebrew | brew | de5b35876f31f540f1f7e02d6eb18dd88355702f.json | Use Mechanize to parse Content-Disposition. | Library/Homebrew/vendor/Gemfile.lock | @@ -9,10 +9,34 @@ GEM
ast (2.4.0)
backports (3.11.4)
concurrent-ruby (1.1.4)
+ connection_pool (2.2.2)
+ domain_name (0.5.20180417)
+ unf (>= 0.0.5, < 1.0.0)
+ http-cookie (1.0.3)
+ domain_name (~> 0.5)
i18n (1.5.3)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.2)
+ mechanize (2.7.6)
+ domain_name (~> 0.5, >= 0.5.1)
+ http-cookie (~> 1.0)
+ mime-types (>= 1.17.2)
+ net-http-digest_auth (~> 1.1, >= 1.1.1)
+ net-http-persistent (>= 2.5.2)
+ nokogiri (~> 1.6)
+ ntlm-http (~> 0.1, >= 0.1.1)
+ webrobots (>= 0.0.9, < 0.2)
+ mime-types (3.2.2)
+ mime-types-data (~> 3.2015)
+ mime-types-data (3.2018.0812)
+ mini_portile2 (2.4.0)
minitest (5.11.3)
+ net-http-digest_auth (1.4.1)
+ net-http-persistent (3.0.0)
+ connection_pool (~> 2.2)
+ nokogiri (1.10.1)
+ mini_portile2 (~> 2.4.0)
+ ntlm-http (0.1.1)
parallel (1.13.0)
parser (2.6.0.0)
ast (~> 2.4.0)
@@ -34,7 +58,11 @@ GEM
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
+ unf (0.1.4)
+ unf_ext
+ unf_ext (0.0.7.5)
unicode-display_width (1.4.1)
+ webrobots (0.1.2)
PLATFORMS
ruby
@@ -43,6 +71,7 @@ DEPENDENCIES
activesupport
backports
concurrent-ruby
+ mechanize
plist
rubocop
rubocop-rspec | true |
Other | Homebrew | brew | de5b35876f31f540f1f7e02d6eb18dd88355702f.json | Use Mechanize to parse Content-Disposition. | Library/Homebrew/vendor/bundle-standalone/bundler/setup.rb | @@ -12,8 +12,24 @@
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ast-2.4.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/backports-3.11.4/lib"
$:.unshift "#{path}/"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/connection_pool-2.2.2/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/unf_ext-0.0.7.5"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unf_ext-0.0.7.5/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unf-0.1.4/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/domain_name-0.5.20180417/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/http-cookie-1.0.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/jaro_winkler-1.5.2"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/jaro_winkler-1.5.2/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mime-types-data-3.2018.0812/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mime-types-3.2.2/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/net-http-digest_auth-1.4.1/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/net-http-persistent-3.0.0/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mini_portile2-2.4.0/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/nokogiri-1.10.1"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/nokogiri-1.10.1/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ntlm-http-0.1.1/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/webrobots-0.1.2/lib"
+$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mechanize-2.7.6/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel-1.13.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parser-2.6.0.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.5.0/lib" | true |
Other | Homebrew | brew | de5b35876f31f540f1f7e02d6eb18dd88355702f.json | Use Mechanize to parse Content-Disposition. | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/mechanize-2.7.6/lib/mechanize/http/content_disposition_parser.rb | @@ -0,0 +1,191 @@
+# coding: BINARY
+
+require 'strscan'
+require 'time'
+
+class Mechanize::HTTP
+ ContentDisposition = Struct.new :type, :filename, :creation_date,
+ :modification_date, :read_date, :size, :parameters
+end
+
+##
+# Parser Content-Disposition headers that loosely follows RFC 2183.
+#
+# Beyond RFC 2183, this parser allows:
+#
+# * Missing disposition-type
+# * Multiple semicolons
+# * Whitespace around semicolons
+
+class Mechanize::HTTP::ContentDispositionParser
+
+ attr_accessor :scanner # :nodoc:
+
+ @parser = nil
+
+ ##
+ # Parses the disposition type and params in the +content_disposition+
+ # string. The "Content-Disposition:" must be removed.
+
+ def self.parse content_disposition
+ @parser ||= self.new
+ @parser.parse content_disposition
+ end
+
+ ##
+ # Creates a new parser Content-Disposition headers
+
+ def initialize
+ @scanner = nil
+ end
+
+ ##
+ # Parses the +content_disposition+ header. If +header+ is set to true the
+ # "Content-Disposition:" portion will be parsed
+
+ def parse content_disposition, header = false
+ return nil if content_disposition.empty?
+
+ @scanner = StringScanner.new content_disposition
+
+ if header then
+ return nil unless @scanner.scan(/Content-Disposition/i)
+ return nil unless @scanner.scan(/:/)
+ spaces
+ end
+
+ type = rfc_2045_token
+ @scanner.scan(/;+/)
+
+ if @scanner.peek(1) == '=' then
+ @scanner.pos = 0
+ type = nil
+ end
+
+ disposition = Mechanize::HTTP::ContentDisposition.new type
+
+ spaces
+
+ return nil unless parameters = parse_parameters
+
+ disposition.filename = parameters.delete 'filename'
+ disposition.creation_date = parameters.delete 'creation-date'
+ disposition.modification_date = parameters.delete 'modification-date'
+ disposition.read_date = parameters.delete 'read-date'
+ disposition.size = parameters.delete 'size'
+ disposition.parameters = parameters
+
+ disposition
+ end
+
+ ##
+ # Extracts disposition-parm and returns a Hash.
+
+ def parse_parameters
+ parameters = {}
+
+ while true do
+ return nil unless param = rfc_2045_token
+ param.downcase!
+ return nil unless @scanner.scan(/=/)
+
+ value = case param
+ when /^filename$/ then
+ rfc_2045_value
+ when /^(creation|modification|read)-date$/ then
+ Time.rfc822 rfc_2045_quoted_string
+ when /^size$/ then
+ rfc_2045_value.to_i(10)
+ else
+ rfc_2045_value
+ end
+
+ return nil unless value
+
+ parameters[param] = value
+
+ spaces
+
+ break if @scanner.eos? or not @scanner.scan(/;+/)
+
+ spaces
+ end
+
+ parameters
+ end
+
+ ##
+ # quoted-string = <"> *(qtext/quoted-pair) <">
+ # qtext = <any CHAR excepting <">, "\" & CR,
+ # and including linear-white-space
+ # quoted-pair = "\" CHAR
+ #
+ # Parses an RFC 2045 quoted-string
+
+ def rfc_2045_quoted_string
+ return nil unless @scanner.scan(/"/)
+
+ text = ''
+
+ while true do
+ chunk = @scanner.scan(/[\000-\014\016-\041\043-\133\135-\177]+/) # not \r "
+
+ if chunk then
+ text << chunk
+
+ if @scanner.peek(1) == '\\' then
+ @scanner.get_byte
+ return nil if @scanner.eos?
+ text << @scanner.get_byte
+ elsif @scanner.scan(/\r\n[\t ]+/) then
+ text << " "
+ end
+ else
+ if '\\"' == @scanner.peek(2) then
+ @scanner.skip(/\\/)
+ text << @scanner.get_byte
+ elsif '"' == @scanner.peek(1) then
+ @scanner.get_byte
+ break
+ else
+ return nil
+ end
+ end
+ end
+
+ text
+ end
+
+ ##
+ # token := 1*<any (US-ASCII) CHAR except SPACE, CTLs, or tspecials>
+ #
+ # Parses an RFC 2045 token
+
+ def rfc_2045_token
+ @scanner.scan(/[^\000-\037\177()<>@,;:\\"\/\[\]?= ]+/)
+ end
+
+ ##
+ # value := token / quoted-string
+ #
+ # Parses an RFC 2045 value
+
+ def rfc_2045_value
+ if @scanner.peek(1) == '"' then
+ rfc_2045_quoted_string
+ else
+ rfc_2045_token
+ end
+ end
+
+ ##
+ # 1*SP
+ #
+ # Parses spaces
+
+ def spaces
+ @scanner.scan(/ +/)
+ end
+
+end
+ | true |
Other | Homebrew | brew | de5b35876f31f540f1f7e02d6eb18dd88355702f.json | Use Mechanize to parse Content-Disposition. | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/mechanize-2.7.6/lib/mechanize/version.rb | @@ -0,0 +1,3 @@
+class Mechanize
+ VERSION = "2.7.6"
+end | true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/cmd/deps.rb | @@ -98,6 +98,7 @@ def deps_args
"debugging the `--installed`/`--all` display mode."
switch :verbose
switch :debug
+ conflicts "--installed", "--all"
end
end
| true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/cmd/desc.rb | @@ -37,6 +37,7 @@ def desc_args
description: "Search just the descriptions for provided <text>. If <text> is flanked by slashes, "\
"it is interpreted as a regular expression."
switch :verbose
+ conflicts "--search=", "--name=", "--description="
end
end
| true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/cmd/fetch.rb | @@ -60,6 +60,8 @@ def fetch_args
"even if it would not be used during installation."
switch :verbose
switch :debug
+ conflicts "--devel", "--HEAD"
+ conflicts "--build-from-source", "--build-bottle", "--force-bottle"
end
end
| true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/cmd/info.rb | @@ -79,6 +79,7 @@ def info_args
switch :verbose,
description: "See more verbose analytics data."
switch :debug
+ conflicts "--all", "--installed"
end
end
| true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/cmd/install.rb | @@ -146,6 +146,9 @@ def install_args
"package into a Homebrew package."
switch "-g", "--git",
description: "Create a Git repository, useful for creating patches to the software."
+ conflicts "--ignore-dependencies", "--only-dependencies"
+ conflicts "--devel", "--HEAD"
+ conflicts "--build-from-source", "--build-bottle", "--force-bottle"
formula_options
end
end | true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/cmd/options.rb | @@ -29,6 +29,7 @@ def options_args
switch "--installed",
description: "Show options for all installed formulae."
switch :debug
+ conflicts "--all", "--installed"
end
end
| true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/cmd/outdated.rb | @@ -46,6 +46,7 @@ def outdated_args
"formula is outdated. Otherwise, the repository's HEAD will be checked for "\
"updates when a new stable or devel version has been released."
switch :debug
+ conflicts "--quiet", "--verbose", "--json="
end
end
| true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/cmd/reinstall.rb | @@ -60,6 +60,7 @@ def reinstall_args
description: "Print the verification and postinstall steps."
switch "--display-times",
description: "Print install times for each formula at the end of the run."
+ conflicts "--build-from-source", "--force-bottle"
formula_options
end
end | true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/cmd/unpack.rb | @@ -34,6 +34,7 @@ def unpack_args
switch :force
switch :verbose
switch :debug
+ conflicts "--git", "--patch"
end
end
| true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/cmd/upgrade.rb | @@ -81,6 +81,7 @@ def upgrade_args
description: "Print the verification and postinstall steps."
switch "--display-times",
description: "Print install times for each formula at the end of the run."
+ conflicts "--build-from-source", "--force-bottle"
formula_options
end
end | true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/cmd/uses.rb | @@ -59,6 +59,7 @@ def uses_args
switch "--HEAD",
description: "Show usage of <formulae> by HEAD build."
switch :debug
+ conflicts "--devel", "--HEAD"
end
end
| true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -104,6 +104,7 @@ def bump_formula_pr_args
switch :quiet
switch :verbose
switch :debug
+ conflicts "--no-audit", "--strict"
conflicts "--url", "--tag"
end
end | true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/dev-cmd/create.rb | @@ -59,6 +59,7 @@ def create_args
switch :force
switch :verbose
switch :debug
+ conflicts "--autotools", "--cmake", "--meson"
end
end
| true |
Other | Homebrew | brew | 867b155479be4a50e02580e05df770aec84438be.json | Add missing conflicts to command options. | Library/Homebrew/dev-cmd/test.rb | @@ -41,6 +41,7 @@ def test_args
description: "Keep the temporary files created for the test."
switch :verbose
switch :debug
+ conflicts "--devel", "--HEAD"
end
end
| true |
Other | Homebrew | brew | c3ba863a30e9b21e42453e103155492d114adc2e.json | cmd/install: Add description for `--fetch-HEAD` option | Library/Homebrew/cmd/install.rb | @@ -129,7 +129,10 @@ def install_args
description: "If <formula> defines it, install the development version."
switch "--HEAD",
description: "If <formula> defines it, install the HEAD version, aka master, trunk, unstable."
- switch "--fetch-HEAD"
+ switch "--fetch-HEAD",
+ description: "Fetch the upstream repository to detect if the HEAD installation of the "\
+ "formula is outdated. Otherwise, the repository's HEAD will be checked for "\
+ "updates when a new stable or devel version has been released."
switch "--keep-tmp",
description: "Dont delete the temporary files created during installation."
switch "--build-bottle", | false |
Other | Homebrew | brew | ad4b3b0e7f93ec53b68ce11a29bea0ba48097f15.json | Fix printf error on bash launch | Library/Homebrew/brew.sh | @@ -58,7 +58,7 @@ git() {
numeric() {
# Condense the exploded argument into a single return value.
# shellcheck disable=SC2086,SC2183
- printf "%01d%02d%02d%02d" ${1//./ }
+ printf "%01d%02d%02d%02d" ${1//[.rc]/ }
}
HOMEBREW_VERSION="$(git -C "$HOMEBREW_REPOSITORY" describe --tags --dirty --abbrev=7 2>/dev/null)" | false |
Other | Homebrew | brew | fd74ce2de65ef16e30b833f3e9fe448d3bd10efd.json | cmd: remove misrendered markdown link. | Library/Homebrew/cmd/gist-logs.rb | @@ -2,7 +2,7 @@
#: Upload logs for a failed build of <formula> to a new Gist.
#:
#: <formula> is usually the name of the formula to install, but it can be specified
-#: in several different ways. See [SPECIFYING FORMULAE](#specifying-formulae).
+#: in several different ways.
#:
#: If `--with-hostname` is passed, include the hostname in the Gist.
#:
@@ -32,7 +32,7 @@ def gist_logs_args
Upload logs for a failed build of <formula> to a new Gist.
<formula> is usually the name of the formula to install, but it can be specified
- in several different ways. See [SPECIFYING FORMULAE](#specifying-formulae).
+ in several different ways.
If no logs are found, an error message is presented.
EOS | true |
Other | Homebrew | brew | fd74ce2de65ef16e30b833f3e9fe448d3bd10efd.json | cmd: remove misrendered markdown link. | Library/Homebrew/cmd/install.rb | @@ -2,7 +2,7 @@
#: Install <formula>.
#:
#: <formula> is usually the name of the formula to install, but it can be specified
-#: in several different ways. See [SPECIFYING FORMULAE](#specifying-formulae).
+#: in several different ways.
#:
#: If `--debug` (or `-d`) is passed and brewing fails, open an interactive debugging
#: session with access to IRB or a shell inside the temporary build directory.
@@ -95,7 +95,7 @@ def install_args
Install <formula>.
<formula> is usually the name of the formula to install, but it can be specified
- in several different ways. See [SPECIFYING FORMULAE](#specifying-formulae).
+ in several different ways.
EOS
switch :debug, | true |
Other | Homebrew | brew | fd74ce2de65ef16e30b833f3e9fe448d3bd10efd.json | cmd: remove misrendered markdown link. | docs/Manpage.md | @@ -182,7 +182,7 @@ these flags should only appear after a command.
Upload logs for a failed build of *`formula`* to a new Gist.
*`formula`* is usually the name of the formula to install, but it can be specified
- in several different ways. See [SPECIFYING FORMULAE](#specifying-formulae).
+ in several different ways.
If `--with-hostname` is passed, include the hostname in the Gist.
@@ -240,7 +240,7 @@ these flags should only appear after a command.
Install *`formula`*.
*`formula`* is usually the name of the formula to install, but it can be specified
- in several different ways. See [SPECIFYING FORMULAE](#specifying-formulae).
+ in several different ways.
If `--debug` (or `-d`) is passed and brewing fails, open an interactive debugging
session with access to IRB or a shell inside the temporary build directory. | true |
Other | Homebrew | brew | fd74ce2de65ef16e30b833f3e9fe448d3bd10efd.json | cmd: remove misrendered markdown link. | manpages/brew.1 | @@ -184,7 +184,7 @@ If \fB\-\-force\-bottle\fR is passed, download a bottle if it exists for the cur
Upload logs for a failed build of \fIformula\fR to a new Gist\.
.
.IP
-\fIformula\fR is usually the name of the formula to install, but it can be specified in several different ways\. See \fISPECIFYING FORMULAE\fR\.
+\fIformula\fR is usually the name of the formula to install, but it can be specified in several different ways\.
.
.IP
If \fB\-\-with\-hostname\fR is passed, include the hostname in the Gist\.
@@ -252,7 +252,7 @@ See the docs for examples of using the JSON output: \fIhttps://docs\.brew\.sh/Qu
Install \fIformula\fR\.
.
.IP
-\fIformula\fR is usually the name of the formula to install, but it can be specified in several different ways\. See \fISPECIFYING FORMULAE\fR\.
+\fIformula\fR is usually the name of the formula to install, but it can be specified in several different ways\.
.
.IP
If \fB\-\-debug\fR (or \fB\-d\fR) is passed and brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory\. | true |
Other | Homebrew | brew | 9126a5cf8dbee31eae9df92d25c58c3337e55ed6.json | cmd/install: fix missing formula handling. | Library/Homebrew/cmd/install.rb | @@ -180,209 +180,207 @@ def install
end
end
- begin
- formulae = []
-
- unless ARGV.casks.empty?
- cask_args = []
- cask_args << "--force" if args.force?
- cask_args << "--debug" if args.debug?
- cask_args << "--verbose" if args.verbose?
-
- ARGV.casks.each do |c|
- ohai "brew cask install #{c} #{cask_args.join " "}"
- system("#{HOMEBREW_PREFIX}/bin/brew", "cask", "install", c, *cask_args)
- end
- end
+ formulae = []
- # if the user's flags will prevent bottle only-installations when no
- # developer tools are available, we need to stop them early on
- FormulaInstaller.prevent_build_flags unless DevelopmentTools.installed?
+ unless ARGV.casks.empty?
+ cask_args = []
+ cask_args << "--force" if args.force?
+ cask_args << "--debug" if args.debug?
+ cask_args << "--verbose" if args.verbose?
- ARGV.formulae.each do |f|
- # head-only without --HEAD is an error
- if !Homebrew.args.HEAD? && f.stable.nil? && f.devel.nil?
- raise <<~EOS
- #{f.full_name} is a head-only formula
- Install with `brew install --HEAD #{f.full_name}`
- EOS
- end
-
- # devel-only without --devel is an error
- if !args.devel? && f.stable.nil? && f.head.nil?
- raise <<~EOS
- #{f.full_name} is a devel-only formula
- Install with `brew install --devel #{f.full_name}`
- EOS
- end
+ ARGV.casks.each do |c|
+ ohai "brew cask install #{c} #{cask_args.join " "}"
+ system("#{HOMEBREW_PREFIX}/bin/brew", "cask", "install", c, *cask_args)
+ end
+ end
- if !(args.HEAD? || args.devel?) && f.stable.nil?
- raise "#{f.full_name} has no stable download, please choose --devel or --HEAD"
- end
+ # if the user's flags will prevent bottle only-installations when no
+ # developer tools are available, we need to stop them early on
+ FormulaInstaller.prevent_build_flags unless DevelopmentTools.installed?
+
+ ARGV.formulae.each do |f|
+ # head-only without --HEAD is an error
+ if !Homebrew.args.HEAD? && f.stable.nil? && f.devel.nil?
+ raise <<~EOS
+ #{f.full_name} is a head-only formula
+ Install with `brew install --HEAD #{f.full_name}`
+ EOS
+ end
- # --HEAD, fail with no head defined
- if args.head? && f.head.nil?
- raise "No head is defined for #{f.full_name}"
- end
+ # devel-only without --devel is an error
+ if !args.devel? && f.stable.nil? && f.head.nil?
+ raise <<~EOS
+ #{f.full_name} is a devel-only formula
+ Install with `brew install --devel #{f.full_name}`
+ EOS
+ end
- # --devel, fail with no devel defined
- if args.devel? && f.devel.nil?
- raise "No devel block is defined for #{f.full_name}"
- end
+ if !(args.HEAD? || args.devel?) && f.stable.nil?
+ raise "#{f.full_name} has no stable download, please choose --devel or --HEAD"
+ end
- installed_head_version = f.latest_head_version
- new_head_installed = installed_head_version &&
- !f.head_version_outdated?(installed_head_version, fetch_head: args.fetch_HEAD?)
- prefix_installed = f.prefix.exist? && !f.prefix.children.empty?
-
- if f.keg_only? && f.any_version_installed? && f.optlinked? && !args.force?
- # keg-only install is only possible when no other version is
- # linked to opt, because installing without any warnings can break
- # dependencies. Therefore before performing other checks we need to be
- # sure --force flag is passed.
- if f.outdated?
- optlinked_version = Keg.for(f.opt_prefix).version
- onoe <<~EOS
- #{f.full_name} #{optlinked_version} is already installed
- To upgrade to #{f.version}, run `brew upgrade #{f.name}`
- EOS
- elsif args.only_dependencies?
- formulae << f
- else
- opoo <<~EOS
- #{f.full_name} #{f.pkg_version} is already installed and up-to-date
- To reinstall #{f.pkg_version}, run `brew reinstall #{f.name}`
- EOS
- end
- elsif (args.HEAD? && new_head_installed) || prefix_installed
- # After we're sure that --force flag is passed for linked to opt
- # keg-only we need to be sure that the version we're attempting to
- # install is not already installed.
+ # --HEAD, fail with no head defined
+ if args.head? && f.head.nil?
+ raise "No head is defined for #{f.full_name}"
+ end
- installed_version = if args.HEAD?
- f.latest_head_version
- else
- f.pkg_version
- end
+ # --devel, fail with no devel defined
+ if args.devel? && f.devel.nil?
+ raise "No devel block is defined for #{f.full_name}"
+ end
- msg = "#{f.full_name} #{installed_version} is already installed"
- linked_not_equals_installed = f.linked_version != installed_version
- if f.linked? && linked_not_equals_installed
- msg = <<~EOS
- #{msg}
- The currently linked version is #{f.linked_version}
- You can use `brew switch #{f} #{installed_version}` to link this version.
- EOS
- elsif !f.linked? || f.keg_only?
- msg = <<~EOS
- #{msg}, it's just not linked
- You can use `brew link #{f}` to link this version.
- EOS
- elsif args.only_dependencies?
- msg = nil
- formulae << f
- else
- msg = <<~EOS
- #{msg} and up-to-date
- To reinstall #{f.pkg_version}, run `brew reinstall #{f.name}`
- EOS
- end
- opoo msg if msg
- elsif !f.any_version_installed? && old_formula = f.old_installed_formulae.first
- msg = "#{old_formula.full_name} #{old_formula.installed_version} already installed"
- if !old_formula.linked? && !old_formula.keg_only?
- msg = <<~EOS
- #{msg}, it's just not linked.
- You can use `brew link #{old_formula.full_name}` to link this version.
- EOS
- end
- opoo msg
- elsif f.migration_needed? && !args.force?
- # Check if the formula we try to install is the same as installed
- # but not migrated one. If --force passed then install anyway.
+ installed_head_version = f.latest_head_version
+ new_head_installed = installed_head_version &&
+ !f.head_version_outdated?(installed_head_version, fetch_head: args.fetch_HEAD?)
+ prefix_installed = f.prefix.exist? && !f.prefix.children.empty?
+
+ if f.keg_only? && f.any_version_installed? && f.optlinked? && !args.force?
+ # keg-only install is only possible when no other version is
+ # linked to opt, because installing without any warnings can break
+ # dependencies. Therefore before performing other checks we need to be
+ # sure --force flag is passed.
+ if f.outdated?
+ optlinked_version = Keg.for(f.opt_prefix).version
+ onoe <<~EOS
+ #{f.full_name} #{optlinked_version} is already installed
+ To upgrade to #{f.version}, run `brew upgrade #{f.name}`
+ EOS
+ elsif args.only_dependencies?
+ formulae << f
+ else
opoo <<~EOS
- #{f.oldname} already installed, it's just not migrated
- You can migrate formula with `brew migrate #{f}`
- Or you can force install it with `brew install #{f} --force`
+ #{f.full_name} #{f.pkg_version} is already installed and up-to-date
+ To reinstall #{f.pkg_version}, run `brew reinstall #{f.name}`
EOS
+ end
+ elsif (args.HEAD? && new_head_installed) || prefix_installed
+ # After we're sure that --force flag is passed for linked to opt
+ # keg-only we need to be sure that the version we're attempting to
+ # install is not already installed.
+
+ installed_version = if args.HEAD?
+ f.latest_head_version
else
- # If none of the above is true and the formula is linked, then
- # FormulaInstaller will handle this case.
+ f.pkg_version
+ end
+
+ msg = "#{f.full_name} #{installed_version} is already installed"
+ linked_not_equals_installed = f.linked_version != installed_version
+ if f.linked? && linked_not_equals_installed
+ msg = <<~EOS
+ #{msg}
+ The currently linked version is #{f.linked_version}
+ You can use `brew switch #{f} #{installed_version}` to link this version.
+ EOS
+ elsif !f.linked? || f.keg_only?
+ msg = <<~EOS
+ #{msg}, it's just not linked
+ You can use `brew link #{f}` to link this version.
+ EOS
+ elsif args.only_dependencies?
+ msg = nil
formulae << f
+ else
+ msg = <<~EOS
+ #{msg} and up-to-date
+ To reinstall #{f.pkg_version}, run `brew reinstall #{f.name}`
+ EOS
+ end
+ opoo msg if msg
+ elsif !f.any_version_installed? && old_formula = f.old_installed_formulae.first
+ msg = "#{old_formula.full_name} #{old_formula.installed_version} already installed"
+ if !old_formula.linked? && !old_formula.keg_only?
+ msg = <<~EOS
+ #{msg}, it's just not linked.
+ You can use `brew link #{old_formula.full_name}` to link this version.
+ EOS
end
+ opoo msg
+ elsif f.migration_needed? && !args.force?
+ # Check if the formula we try to install is the same as installed
+ # but not migrated one. If --force passed then install anyway.
+ opoo <<~EOS
+ #{f.oldname} already installed, it's just not migrated
+ You can migrate formula with `brew migrate #{f}`
+ Or you can force install it with `brew install #{f} --force`
+ EOS
+ else
+ # If none of the above is true and the formula is linked, then
+ # FormulaInstaller will handle this case.
+ formulae << f
+ end
- # Even if we don't install this formula mark it as no longer just
- # installed as a dependency.
- next unless f.opt_prefix.directory?
+ # Even if we don't install this formula mark it as no longer just
+ # installed as a dependency.
+ next unless f.opt_prefix.directory?
- keg = Keg.new(f.opt_prefix.resolved_path)
- tab = Tab.for_keg(keg)
- unless tab.installed_on_request
- tab.installed_on_request = true
- tab.write
- end
+ keg = Keg.new(f.opt_prefix.resolved_path)
+ tab = Tab.for_keg(keg)
+ unless tab.installed_on_request
+ tab.installed_on_request = true
+ tab.write
end
+ end
- return if formulae.empty?
+ return if formulae.empty?
- Install.perform_preinstall_checks
+ Install.perform_preinstall_checks
- formulae.each do |f|
- Migrator.migrate_if_needed(f)
- install_formula(f)
- Cleanup.install_formula_clean!(f)
- end
- Homebrew.messages.display_messages
- rescue FormulaUnreadableError, FormulaClassUnavailableError,
- TapFormulaUnreadableError, TapFormulaClassUnavailableError => e
- # Need to rescue before `FormulaUnavailableError` (superclass of this)
- # is handled, as searching for a formula doesn't make sense here (the
- # formula was found, but there's a problem with its implementation).
- ofail e.message
- rescue FormulaUnavailableError => e
- if e.name == "updog"
- ofail "What's updog?"
- return
- end
+ formulae.each do |f|
+ Migrator.migrate_if_needed(f)
+ install_formula(f)
+ Cleanup.install_formula_clean!(f)
+ end
+ Homebrew.messages.display_messages
+ rescue FormulaUnreadableError, FormulaClassUnavailableError,
+ TapFormulaUnreadableError, TapFormulaClassUnavailableError => e
+ # Need to rescue before `FormulaUnavailableError` (superclass of this)
+ # is handled, as searching for a formula doesn't make sense here (the
+ # formula was found, but there's a problem with its implementation).
+ ofail e.message
+ rescue FormulaUnavailableError => e
+ if e.name == "updog"
+ ofail "What's updog?"
+ return
+ end
- ofail e.message
- if (reason = MissingFormula.reason(e.name))
- $stderr.puts reason
- return
- end
+ ofail e.message
+ if (reason = MissingFormula.reason(e.name))
+ $stderr.puts reason
+ return
+ end
- ohai "Searching for similarly named formulae..."
- formulae_search_results = search_formulae(e.name)
- case formulae_search_results.length
- when 0
- ofail "No similarly named formulae found."
- when 1
- puts "This similarly named formula was found:"
- puts formulae_search_results
- puts "To install it, run:\n brew install #{formulae_search_results.first}"
- else
- puts "These similarly named formulae were found:"
- puts Formatter.columns(formulae_search_results)
- puts "To install one of them, run (for example):\n brew install #{formulae_search_results.first}"
- end
+ ohai "Searching for similarly named formulae..."
+ formulae_search_results = search_formulae(e.name)
+ case formulae_search_results.length
+ when 0
+ ofail "No similarly named formulae found."
+ when 1
+ puts "This similarly named formula was found:"
+ puts formulae_search_results
+ puts "To install it, run:\n brew install #{formulae_search_results.first}"
+ else
+ puts "These similarly named formulae were found:"
+ puts Formatter.columns(formulae_search_results)
+ puts "To install one of them, run (for example):\n brew install #{formulae_search_results.first}"
+ end
- # Do not search taps if the formula name is qualified
- return if e.name.include?("/")
-
- ohai "Searching taps..."
- taps_search_results = search_taps(e.name)[:formulae]
- case taps_search_results.length
- when 0
- ofail "No formulae found in taps."
- when 1
- puts "This formula was found in a tap:"
- puts taps_search_results
- puts "To install it, run:\n brew install #{taps_search_results.first}"
- else
- puts "These formulae were found in taps:"
- puts Formatter.columns(taps_search_results)
- puts "To install one of them, run (for example):\n brew install #{taps_search_results.first}"
- end
+ # Do not search taps if the formula name is qualified
+ return if e.name.include?("/")
+
+ ohai "Searching taps..."
+ taps_search_results = search_taps(e.name)[:formulae]
+ case taps_search_results.length
+ when 0
+ ofail "No formulae found in taps."
+ when 1
+ puts "This formula was found in a tap:"
+ puts taps_search_results
+ puts "To install it, run:\n brew install #{taps_search_results.first}"
+ else
+ puts "These formulae were found in taps:"
+ puts Formatter.columns(taps_search_results)
+ puts "To install one of them, run (for example):\n brew install #{taps_search_results.first}"
end
end
| false |
Other | Homebrew | brew | 28fa8a7c97da99ec8e8726c2d7fb35347765db00.json | version: add CPU tests.
Add a new API inspired by discussion in
https://github.com/Homebrew/homebrew-core/pull/36435 to query if a given
CPU option is supported by a version of macOS. | Library/Homebrew/extend/os/mac/hardware.rb | @@ -1,6 +1,6 @@
module Hardware
- def self.oldest_cpu
- if MacOS.version >= :mojave
+ def self.oldest_cpu(version = MacOS.version)
+ if version >= :mojave
:nehalem
else
generic_oldest_cpu | true |
Other | Homebrew | brew | 28fa8a7c97da99ec8e8726c2d7fb35347765db00.json | version: add CPU tests.
Add a new API inspired by discussion in
https://github.com/Homebrew/homebrew-core/pull/36435 to query if a given
CPU option is supported by a version of macOS. | Library/Homebrew/hardware.rb | @@ -134,7 +134,7 @@ def cores_as_words
end
end
- def oldest_cpu
+ def oldest_cpu(_version = nil)
if Hardware::CPU.intel?
if Hardware::CPU.is_64_bit?
:core2 | true |
Other | Homebrew | brew | 28fa8a7c97da99ec8e8726c2d7fb35347765db00.json | version: add CPU tests.
Add a new API inspired by discussion in
https://github.com/Homebrew/homebrew-core/pull/36435 to query if a given
CPU option is supported by a version of macOS. | Library/Homebrew/os/mac/version.rb | @@ -38,6 +38,17 @@ def to_sym
def pretty_name
to_sym.to_s.split("_").map(&:capitalize).join(" ")
end
+
+ # For OS::Mac::Version compatability
+ def requires_nehalem_cpu?
+ Hardware.oldest_cpu(self) == :nehalem
+ end
+ # https://en.wikipedia.org/wiki/Nehalem_(microarchitecture)
+ # Ensure any extra methods are also added to version/null.rb
+ alias requires_sse4? requires_nehalem_cpu?
+ alias requires_sse41? requires_nehalem_cpu?
+ alias requires_sse42? requires_nehalem_cpu?
+ alias requires_popcnt? requires_nehalem_cpu?
end
end
end | true |
Other | Homebrew | brew | 28fa8a7c97da99ec8e8726c2d7fb35347765db00.json | version: add CPU tests.
Add a new API inspired by discussion in
https://github.com/Homebrew/homebrew-core/pull/36435 to query if a given
CPU option is supported by a version of macOS. | Library/Homebrew/test/os/mac/version_spec.rb | @@ -46,4 +46,9 @@
expect(described_class.new("10.14").pretty_name).to eq("Mojave")
expect(described_class.new("10.10").pretty_name).to eq("Yosemite")
end
+
+ specify "#requires_nehalem_cpu?" do
+ expect(described_class.new("10.14").requires_nehalem_cpu?).to be true
+ expect(described_class.new("10.12").requires_nehalem_cpu?).to be false
+ end
end | true |
Other | Homebrew | brew | 28fa8a7c97da99ec8e8726c2d7fb35347765db00.json | version: add CPU tests.
Add a new API inspired by discussion in
https://github.com/Homebrew/homebrew-core/pull/36435 to query if a given
CPU option is supported by a version of macOS. | Library/Homebrew/version/null.rb | @@ -26,6 +26,15 @@ def null?
true
end
+ # For OS::Mac::Version compatability
+ def requires_nehalem_cpu?
+ false
+ end
+ alias_method :requires_sse4?, :requires_nehalem_cpu?
+ alias_method :requires_sse41?, :requires_nehalem_cpu?
+ alias_method :requires_sse42?, :requires_nehalem_cpu?
+ alias_method :requires_popcnt?, :requires_nehalem_cpu?
+
def to_f
Float::NAN
end | true |
Other | Homebrew | brew | f8c574bbc08d4361bbb85a66194941f7f96a17cc.json | docs/Shell-Completion: read both types of bash completions.
And guard against either of them being missing.
Fixes #5610 | docs/Shell-Completion.md | @@ -12,13 +12,19 @@ To make Homebrew's completions available in `bash`, you must source the definiti
```sh
if type brew 2&>/dev/null; then
- source "$(brew --prefix)/etc/bash_completion.d/*"
-else
- echo "run: brew install git bash-completion"
+ for COMPLETION in $(brew --prefix)/etc/bash_completion.d/*
+ do
+ [[ -f $COMPLETION ]] && source "$COMPLETION"
+ done
+ if [[ -f $(brew --prefix)/etc/profile.d/bash_completion.sh ]];
+ then
+ source "$(brew --prefix)/etc/profile.d/bash_completion.sh"
+ fi
fi
```
## Configuring Completions in `zsh`
+
To make Homebrew's completions available in `zsh`, you must get the Homebrew-managed zsh site-functions on your `FPATH` before initialising `zsh`'s completion facility. Add the following to your `~/.zshrc` file:
```sh
@@ -42,4 +48,5 @@ Additionally, if you receive "zsh compinit: insecure directories" warnings when
```
## Configuring Completions in `fish`
+
No configuration is needed in `fish`. Friendly! | false |
Other | Homebrew | brew | c2bbd9df7e6d0860dc144cc12d44ed5d75efcb21.json | Remove unneeded `curl_openssl_or_deps` invocation
This fixes a regression introduced in #5626 [1], which removed `curl_openssl_or_deps` and left a single call in the code.
[1]: https://github.com/Homebrew/brew/pull/5626 | Library/Homebrew/dev-cmd/audit.rb | @@ -1134,7 +1134,7 @@ def audit_urls
# pull request.
next if url =~ %r{^https://dl.bintray.com/homebrew/mirror/}
- if http_content_problem = curl_check_http_content(url, require_http: curl_openssl_or_deps)
+ if http_content_problem = curl_check_http_content(url)
problem http_content_problem
end
elsif strategy <= GitDownloadStrategy | true |
Other | Homebrew | brew | c2bbd9df7e6d0860dc144cc12d44ed5d75efcb21.json | Remove unneeded `curl_openssl_or_deps` invocation
This fixes a regression introduced in #5626 [1], which removed `curl_openssl_or_deps` and left a single call in the code.
[1]: https://github.com/Homebrew/brew/pull/5626 | Library/Homebrew/utils/curl.rb | @@ -69,12 +69,12 @@ def curl_output(*args, **options)
print_stderr: false)
end
-def curl_check_http_content(url, user_agents: [:default], check_content: false, strict: false, require_http: false)
+def curl_check_http_content(url, user_agents: [:default], check_content: false, strict: false)
return unless url.start_with? "http"
details = nil
user_agent = nil
- hash_needed = url.start_with?("http:") && !require_http
+ hash_needed = url.start_with?("http:")
user_agents.each do |ua|
details = curl_http_content_headers_and_checksum(url, hash_needed: hash_needed, user_agent: ua)
user_agent = ua | true |
Other | Homebrew | brew | 5084831a2b33a4a04604e9d16f49187f9ddfd2a8.json | vendor-install: use Mavericks portable Ruby.
This is not universal so is smaller (8MB vs 12MB). It also performs
5-10% faster at:
https://rubybench.org/ruby/ruby/releases?result_type=array_sample_100k___50k | Library/Homebrew/cmd/vendor-install.sh | @@ -16,9 +16,9 @@ if [[ -n "$HOMEBREW_MACOS" ]]
then
if [[ "$HOMEBREW_PROCESSOR" = "Intel" ]]
then
- ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.3.7.leopard_64.bottle.tar.gz"
- ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.7/portable-ruby-2.3.7.leopard_64.bottle.tar.gz"
- ruby_SHA="033ac518bb14abdb1bb47d968dc9e967c3ae2035499383a21a79b49d523065d1"
+ ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.3.7.mavericks.bottle.tar.gz"
+ ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.7/portable-ruby-2.3.7.mavericks.bottle.tar.gz"
+ ruby_SHA="539ae571968fc74d4ec3a839cb33edc5786c219a5e6ae7fb6a09ec5fc1b04e4e"
fi
elif [[ -n "$HOMEBREW_LINUX" ]]
then | false |
Other | Homebrew | brew | b24e96e28da945cf063f5868f32afeed7e002dd1.json | diagnostic: ignore case in origin comparison
On circle-ci we do:
git remote set-url origin $CIRCLE_REPOSITORY_URL
which is defined as: https://github.com/linuxbrew/homebrew-core
This is being compared to:
https://github.com/Linuxbrew/homebrew-core | Library/Homebrew/diagnostic.rb | @@ -583,7 +583,7 @@ def check_coretap_git_origin
properly. You can solve this by adding the Homebrew remote:
git -C "#{coretap_path}" remote add origin #{Formatter.url(CoreTap.instance.default_remote)}
EOS
- elsif origin !~ %r{#{CoreTap.instance.full_name}(\.git|/)?$}
+ elsif origin !~ %r{#{CoreTap.instance.full_name}(\.git|/)?$}i
<<~EOS
Suspicious #{CoreTap.instance} git origin remote found.
| false |
Other | Homebrew | brew | 80d8d441a288f1a77633d981380e6657f0ff8231.json | python_virtualenv_constants: upgrade virtualenv to 16.3.0 | Library/Homebrew/language/python_virtualenv_constants.rb | @@ -1,4 +1,6 @@
PYTHON_VIRTUALENV_URL =
- "https://github.com/pypa/virtualenv/archive/16.2.0.tar.gz".freeze
+ "https://files.pythonhosted.org/packages/8b/f4" \
+ "/360aa656ddb0f4168aeaa1057d8784b95d1ce12f34332c1cf52420b6db4e" \
+ "/virtualenv-16.3.0.tar.gz".freeze
PYTHON_VIRTUALENV_SHA256 =
- "448def1220df9960e6d18fb5424107ffb1249eb566a5a311257860ab6b52b3fd".freeze
+ "729f0bcab430e4ef137646805b5b1d8efbb43fe53d4a0f33328624a84a5121f7".freeze | false |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/.rubocop.yml | @@ -64,10 +64,10 @@ Metrics/LineLength:
IgnoredPatterns: ['#: ']
# we won't change backward compatible predicate names
-# TODO: deprecate whitelisted names and move to compat
Naming/PredicateName:
Exclude:
- 'compat/**/*'
+ # can't rename these
NameWhitelist: is_32_bit?, is_64_bit?
# whitelist those that are standard | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/brew.rb | @@ -95,7 +95,7 @@
end
if ENV["HOMEBREW_BUILD_FROM_SOURCE"]
- odeprecated("HOMEBREW_BUILD_FROM_SOURCE", "--build-from-source")
+ odisabled("HOMEBREW_BUILD_FROM_SOURCE", "--build-from-source")
end
if internal_cmd | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/build_environment.rb | @@ -41,7 +41,7 @@ def build_env_keys(env)
MACOSX_DEPLOYMENT_TARGET PKG_CONFIG_PATH PKG_CONFIG_LIBDIR
HOMEBREW_DEBUG HOMEBREW_MAKE_JOBS HOMEBREW_VERBOSE
HOMEBREW_SVN HOMEBREW_GIT
- HOMEBREW_SDKROOT HOMEBREW_BUILD_FROM_SOURCE
+ HOMEBREW_SDKROOT
MAKE GIT CPP
ACLOCAL_PATH PATH CPATH
LD_LIBRARY_PATH LD_RUN_PATH LD_PRELOAD LIBRARY_PATH | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/cleanup.rb | @@ -158,7 +158,6 @@ def initialize(*args, dry_run: false, scrub: false, days: nil, cache: HOMEBREW_C
def self.install_formula_clean!(f)
return if ENV["HOMEBREW_NO_INSTALL_CLEANUP"]
- return unless ENV["HOMEBREW_INSTALL_CLEANUP"]
cleanup = Cleanup.new
if cleanup.periodic_clean_due?
@@ -170,7 +169,6 @@ def self.install_formula_clean!(f)
def periodic_clean_due?
return false if ENV["HOMEBREW_NO_INSTALL_CLEANUP"]
- return unless ENV["HOMEBREW_INSTALL_CLEANUP"]
return true unless PERIODIC_CLEAN_FILE.exist?
PERIODIC_CLEAN_FILE.mtime < CLEANUP_DEFAULT_DAYS.days.ago | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/cmd/install.rb | @@ -31,10 +31,6 @@
#: source even if a bottle is provided. Dependencies will still be installed
#: from bottles if they are available.
#:
-#: If `HOMEBREW_BUILD_FROM_SOURCE` is set, regardless of whether `--build-from-source` was
-#: passed, then both <formula> and the dependencies installed as part of this process
-#: are built from source even if bottles are available.
-#:
#: If `--force-bottle` is passed, install from a bottle if it exists for the
#: current or newest version of macOS, even if it would not normally be used
#: for installation. | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/cmd/prune.rb | @@ -25,7 +25,6 @@ def prune_args
def prune
prune_args.parse
- odeprecated("'brew prune'", "'brew cleanup'")
- Cleanup.new(dry_run: args.dry_run?).prune_prefix_symlinks_and_directories
+ odisabled("'brew prune'", "'brew cleanup'")
end
end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/cmd/reinstall.rb | @@ -3,9 +3,6 @@
#:
#: If `--display-times` is passed, install times for each formula are printed
#: at the end of the run.
-#:
-#: If `HOMEBREW_INSTALL_CLEANUP` is set then remove previously installed versions
-#: of upgraded <formulae> as well as the HOMEBREW_CACHE for that formula.
require "formula_installer"
require "development_tools"
@@ -23,9 +20,6 @@ def reinstall_args
`reinstall` [<option(s)>] <formula>:
Uninstall and then install <formula> (with existing install options).
-
- If `HOMEBREW_INSTALL_CLEANUP` is set then remove previously installed versions
- of upgraded <formulae> as well as the HOMEBREW_CACHE for that formula.
EOS
switch "-s", "--build-from-source",
description: "Compile the formula> from source even if a bottle is available." | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/cmd/upgrade.rb | @@ -28,13 +28,10 @@ module Homebrew
module_function
def upgrade
- # TODO: deprecate for next minor release.
if ARGV.include?("--cleanup")
- ENV["HOMEBREW_INSTALL_CLEANUP"] = "1"
- odeprecated("'brew upgrade --cleanup'", "'HOMEBREW_INSTALL_CLEANUP'")
+ odisabled("'brew upgrade --cleanup'")
elsif ENV["HOMEBREW_UPGRADE_CLEANUP"]
- ENV["HOMEBREW_INSTALL_CLEANUP"] = "1"
- odeprecated("'HOMEBREW_UPGRADE_CLEANUP'", "'HOMEBREW_INSTALL_CLEANUP'")
+ odisabled("'HOMEBREW_UPGRADE_CLEANUP'")
end
FormulaInstaller.prevent_build_flags unless DevelopmentTools.installed? | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat.rb | @@ -1,8 +1,2 @@
-require "compat/extend/os/mac/utils/bottles"
require "compat/os/mac"
-require "compat/requirements/x11_requirement"
-require "compat/requirements/xcode_requirement"
-require "compat/cask"
-require "compat/download_strategy"
require "compat/formula"
-require "compat/tap" | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat/cask.rb | @@ -1,21 +0,0 @@
-require "compat/cask/cache"
-require "compat/cask/cask_loader"
-require "compat/cask/caskroom"
-require "compat/cask/dsl"
-
-module Cask
- class << self
- module Compat
- def init
- Cache.delete_legacy_cache
-
- Caskroom.migrate_caskroom_from_repo_to_prefix
- Caskroom.migrate_legacy_caskroom
-
- super
- end
- end
-
- prepend Compat
- end
-end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat/cask/cache.rb | @@ -1,17 +0,0 @@
-module Cask
- module Cache
- class << self
- module Compat
- def delete_legacy_cache
- legacy_cache = HOMEBREW_CACHE.join("Casks")
- return unless legacy_cache.exist?
-
- ohai "Deleting legacy cache at #{legacy_cache}"
- FileUtils.remove_entry_secure(legacy_cache)
- end
- end
-
- prepend Compat
- end
- end
-end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat/cask/cask_loader.rb | @@ -1,24 +0,0 @@
-module Cask
- module CaskLoader
- class FromContentLoader; end
-
- class FromPathLoader < FromContentLoader
- module Compat
- private
-
- # TODO: can't delete this code until the merge of
- # https://github.com/Homebrew/brew/pull/4730 or an equivalent.
- def cask(header_token, **options, &block)
- if header_token.is_a?(Hash) && header_token.key?(:v1)
- odisabled %q("cask :v1 => 'token'"), %q("cask 'token'")
- header_token = header_token[:v1]
- end
-
- super(header_token, **options, &block)
- end
- end
-
- prepend Compat
- end
- end
-end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat/cask/caskroom.rb | @@ -1,49 +0,0 @@
-module Cask
- module Caskroom
- class << self
- module Compat
- def migrate_legacy_caskroom
- return if path.exist?
-
- legacy_caskroom_path = Pathname.new("/opt/homebrew-cask/Caskroom")
- return if path == legacy_caskroom_path
- return unless legacy_caskroom_path.exist?
- return if legacy_caskroom_path.symlink?
-
- ohai "Migrating Caskroom from #{legacy_caskroom_path} to #{path}."
- if path.parent.writable?
- FileUtils.mv legacy_caskroom_path, path
- else
- opoo "#{path.parent} is not writable, sudo is needed to move the Caskroom."
- SystemCommand.run("/bin/mv", args: [legacy_caskroom_path, path.parent], sudo: true)
- end
-
- ohai "Creating symlink from #{path} to #{legacy_caskroom_path}."
- if legacy_caskroom_path.parent.writable?
- FileUtils.ln_s path, legacy_caskroom_path
- else
- opoo "#{legacy_caskroom_path.parent} is not writable, sudo is needed to link the Caskroom."
- SystemCommand.run("/bin/ln", args: ["-s", path, legacy_caskroom_path], sudo: true)
- end
- end
-
- def migrate_caskroom_from_repo_to_prefix
- repo_caskroom_path = HOMEBREW_REPOSITORY.join("Caskroom")
- return if path.exist?
- return unless repo_caskroom_path.directory?
-
- ohai "Moving Caskroom from HOMEBREW_REPOSITORY to HOMEBREW_PREFIX"
-
- if path.parent.writable?
- FileUtils.mv repo_caskroom_path, path
- else
- opoo "#{path.parent} is not writable, sudo is needed to move the Caskroom."
- SystemCommand.run("/bin/mv", args: [repo_caskroom_path, path.parent], sudo: true)
- end
- end
- end
-
- prepend Compat
- end
- end
-end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat/cask/dsl.rb | @@ -1,22 +0,0 @@
-module Cask
- class DSL
- module Compat
- # TODO: can't delete this code until the merge of
- # https://github.com/Homebrew/brew/pull/4730 or an equivalent.
-
- def gpg(*)
- odisabled "the `gpg` stanza"
- end
-
- def license(*)
- odisabled "the `license` stanza"
- end
-
- def accessibility_access(*)
- odisabled "the `accessibility_access` stanza"
- end
- end
-
- prepend Compat
- end
-end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat/download_strategy.rb | @@ -1,256 +0,0 @@
-require "download_strategy"
-
-# S3DownloadStrategy downloads tarballs from AWS S3.
-# To use it, add `:using => :s3` to the URL section of your
-# formula. This download strategy uses AWS access tokens (in the
-# environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`)
-# to sign the request. This strategy is good in a corporate setting,
-# because it lets you use a private S3 bucket as a repo for internal
-# distribution. (It will work for public buckets as well.)
-class S3DownloadStrategy < CurlDownloadStrategy
- def initialize(url, name, version, **meta)
- odisabled("S3DownloadStrategy",
- "a vendored S3DownloadStrategy in your own formula or tap (using require_relative)")
- super
- end
-
- def _fetch(url:, resolved_url:)
- if url !~ %r{^https?://([^.].*)\.s3\.amazonaws\.com/(.+)$} &&
- url !~ %r{^s3://([^.].*?)/(.+)$}
- raise "Bad S3 URL: " + url
- end
-
- bucket = Regexp.last_match(1)
- key = Regexp.last_match(2)
-
- ENV["AWS_ACCESS_KEY_ID"] = ENV["HOMEBREW_AWS_ACCESS_KEY_ID"]
- ENV["AWS_SECRET_ACCESS_KEY"] = ENV["HOMEBREW_AWS_SECRET_ACCESS_KEY"]
-
- begin
- require "aws-sdk-s3"
- rescue LoadError
- Homebrew.install_gem! "aws-sdk-s3", "~> 1.8"
- require "aws-sdk-s3"
- end
-
- begin
- signer = Aws::S3::Presigner.new
- s3url = signer.presigned_url :get_object, bucket: bucket, key: key
- rescue Aws::Sigv4::Errors::MissingCredentialsError
- ohai "AWS credentials missing, trying public URL instead."
- s3url = url
- end
-
- curl_download s3url, to: temporary_path
- end
-end
-
-# GitHubPrivateRepositoryDownloadStrategy downloads contents from GitHub
-# Private Repository. To use it, add
-# `:using => :github_private_repo` to the URL section of
-# your formula. This download strategy uses GitHub access tokens (in the
-# environment variables `HOMEBREW_GITHUB_API_TOKEN`) to sign the request. This
-# strategy is suitable for corporate use just like S3DownloadStrategy, because
-# it lets you use a private GitHub repository for internal distribution. It
-# works with public one, but in that case simply use CurlDownloadStrategy.
-class GitHubPrivateRepositoryDownloadStrategy < CurlDownloadStrategy
- require "utils/formatter"
- require "utils/github"
-
- def initialize(url, name, version, **meta)
- odisabled("GitHubPrivateRepositoryDownloadStrategy",
- "a vendored GitHubPrivateRepositoryDownloadStrategy in your own formula or tap (using require_relative)")
- super
- parse_url_pattern
- set_github_token
- end
-
- def parse_url_pattern
- unless match = url.match(%r{https://github.com/([^/]+)/([^/]+)/(\S+)})
- raise CurlDownloadStrategyError, "Invalid url pattern for GitHub Repository."
- end
-
- _, @owner, @repo, @filepath = *match
- end
-
- def download_url
- "https://#{@github_token}@github.com/#{@owner}/#{@repo}/#{@filepath}"
- end
-
- private
-
- def _fetch(url:, resolved_url:)
- curl_download download_url, to: temporary_path
- end
-
- def set_github_token
- @github_token = ENV["HOMEBREW_GITHUB_API_TOKEN"]
- unless @github_token
- raise CurlDownloadStrategyError, "Environmental variable HOMEBREW_GITHUB_API_TOKEN is required."
- end
-
- validate_github_repository_access!
- end
-
- def validate_github_repository_access!
- # Test access to the repository
- GitHub.repository(@owner, @repo)
- rescue GitHub::HTTPNotFoundError
- # We only handle HTTPNotFoundError here,
- # becase AuthenticationFailedError is handled within util/github.
- message = <<~EOS
- HOMEBREW_GITHUB_API_TOKEN can not access the repository: #{@owner}/#{@repo}
- This token may not have permission to access the repository or the url of formula may be incorrect.
- EOS
- raise CurlDownloadStrategyError, message
- end
-end
-
-# GitHubPrivateRepositoryReleaseDownloadStrategy downloads tarballs from GitHub
-# Release assets. To use it, add `:using => :github_private_release` to the URL section
-# of your formula. This download strategy uses GitHub access tokens (in the
-# environment variables HOMEBREW_GITHUB_API_TOKEN) to sign the request.
-class GitHubPrivateRepositoryReleaseDownloadStrategy < GitHubPrivateRepositoryDownloadStrategy
- def initialize(url, name, version, **meta)
- odisabled("GitHubPrivateRepositoryReleaseDownloadStrategy",
- "a vendored GitHubPrivateRepositoryReleaseDownloadStrategy in your own formula or tap (using require_relative)")
- super
- end
-
- def parse_url_pattern
- url_pattern = %r{https://github.com/([^/]+)/([^/]+)/releases/download/([^/]+)/(\S+)}
- unless @url =~ url_pattern
- raise CurlDownloadStrategyError, "Invalid url pattern for GitHub Release."
- end
-
- _, @owner, @repo, @tag, @filename = *@url.match(url_pattern)
- end
-
- def download_url
- "https://#{@github_token}@api.github.com/repos/#{@owner}/#{@repo}/releases/assets/#{asset_id}"
- end
-
- private
-
- def _fetch(url:, resolved_url:)
- # HTTP request header `Accept: application/octet-stream` is required.
- # Without this, the GitHub API will respond with metadata, not binary.
- curl_download download_url, "--header", "Accept: application/octet-stream", to: temporary_path
- end
-
- def asset_id
- @asset_id ||= resolve_asset_id
- end
-
- def resolve_asset_id
- release_metadata = fetch_release_metadata
- assets = release_metadata["assets"].select { |a| a["name"] == @filename }
- raise CurlDownloadStrategyError, "Asset file not found." if assets.empty?
-
- assets.first["id"]
- end
-
- def fetch_release_metadata
- release_url = "https://api.github.com/repos/#{@owner}/#{@repo}/releases/tags/#{@tag}"
- GitHub.open_api(release_url)
- end
-end
-
-# ScpDownloadStrategy downloads files using ssh via scp. To use it, add
-# `:using => :scp` to the URL section of your formula or
-# provide a URL starting with scp://. This strategy uses ssh credentials for
-# authentication. If a public/private keypair is configured, it will not
-# prompt for a password.
-#
-# @example
-# class Abc < Formula
-# url "scp://example.com/src/abc.1.0.tar.gz"
-# ...
-class ScpDownloadStrategy < AbstractFileDownloadStrategy
- def initialize(url, name, version, **meta)
- odisabled("ScpDownloadStrategy",
- "a vendored ScpDownloadStrategy in your own formula or tap (using require_relative)")
- super
- parse_url_pattern
- end
-
- def parse_url_pattern
- url_pattern = %r{scp://([^@]+@)?([^@:/]+)(:\d+)?/(\S+)}
- if @url !~ url_pattern
- raise ScpDownloadStrategyError, "Invalid URL for scp: #{@url}"
- end
-
- _, @user, @host, @port, @path = *@url.match(url_pattern)
- end
-
- def fetch
- ohai "Downloading #{@url}"
-
- if cached_location.exist?
- puts "Already downloaded: #{cached_location}"
- else
- system_command! "scp", args: [scp_source, temporary_path.to_s]
- ignore_interrupts { temporary_path.rename(cached_location) }
- end
- end
-
- def clear_cache
- super
- rm_rf(temporary_path)
- end
-
- private
-
- def scp_source
- path_prefix = "/" unless @path.start_with?("~")
- port_arg = "-P #{@port[1..-1]} " if @port
- "#{port_arg}#{@user}#{@host}:#{path_prefix}#{@path}"
- end
-end
-
-class DownloadStrategyDetector
- class << self
- module Compat
- def detect_from_url(url)
- case url
- when %r{^s3://}
- odisabled("s3://",
- "a vendored S3DownloadStrategy in your own formula or tap (using require_relative)")
- S3DownloadStrategy
- when %r{^scp://}
- odisabled("scp://",
- "a vendored ScpDownloadStrategy in your own formula or tap (using require_relative)")
- ScpDownloadStrategy
- else
- super(url)
- end
- end
-
- def detect_from_symbol(symbol)
- case symbol
- when :github_private_repo
- odisabled(":github_private_repo",
- "a vendored GitHubPrivateRepositoryDownloadStrategy in your own formula or tap (using require_relative)")
- GitHubPrivateRepositoryDownloadStrategy
- when :github_private_release
- odisabled(":github_private_repo",
- "a vendored GitHubPrivateRepositoryReleaseDownloadStrategy in your own formula or tap "\
- "(using require_relative)")
- GitHubPrivateRepositoryReleaseDownloadStrategy
- when :s3
- odisabled(":s3",
- "a vendored S3DownloadStrategy in your own formula or tap (using require_relative)")
- S3DownloadStrategy
- when :scp
- odisabled(":scp",
- "a vendored ScpDownloadStrategy in your own formula or tap (using require_relative)")
- ScpDownloadStrategy
- else
- super(symbol)
- end
- end
- end
-
- prepend Compat
- end
-end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat/extend/os/mac/utils/bottles.rb | @@ -1,19 +0,0 @@
-module Utils
- class Bottles
- class Collector
- module Compat
- private
-
- def tag_without_or_later(tag)
- return super unless tag.to_s.end_with?("_or_later")
-
- odisabled "`or_later` bottles",
- "bottles without `or_later` (or_later is implied now)"
- tag.to_s[/(\w+)_or_later$/, 1].to_sym
- end
- end
-
- prepend Compat
- end
- end
-end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat/formula.rb | @@ -2,40 +2,15 @@ class Formula
module Compat
# Run `scons` using a Homebrew-installed version rather than whatever is
# in the `PATH`.
- # TODO: deprecate
- def scons(*args)
- odeprecated("scons", 'system "scons"')
-
- system Formulary.factory("scons").opt_bin/"scons", *args
+ def scons(*)
+ odisabled("scons", 'system "scons"')
end
# Run `make` 3.81 or newer.
# Uses the system make on Leopard and newer, and the
# path to the actually-installed make on Tiger or older.
- # TODO: deprecate
- def make(*args)
- odeprecated("make", 'system "make"')
-
- if Utils.popen_read("/usr/bin/make", "--version")
- .match(/Make (\d\.\d+)/)[1] > "3.80"
- make_path = "/usr/bin/make"
- else
- make = Formula["make"].opt_bin/"make"
- make_path = if make.exist?
- make.to_s
- else
- (Formula["make"].opt_bin/"gmake").to_s
- end
- end
-
- if superenv?
- make_name = File.basename(make_path)
- with_env(HOMEBREW_MAKE: make_name) do
- system "make", *args
- end
- else
- system make_path, *args
- end
+ def make(*)
+ odisabled("make", 'system "make"')
end
end
| true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat/os/mac.rb | @@ -3,7 +3,7 @@ module Mac
class << self
module Compat
def prefer_64_bit?
- odeprecated("MacOS.prefer_64_bit?")
+ odisabled("MacOS.prefer_64_bit?")
Hardware::CPU.is_64_bit?
end
end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat/requirements/x11_requirement.rb | @@ -1,15 +0,0 @@
-require "requirement"
-
-class X11Requirement < Requirement
- module Compat
- def initialize(tags = [])
- if tags.first.to_s.match?(/(\d\.)+\d/)
- odisabled('depends_on :x11 => "X.Y.Z"')
- end
-
- super(tags)
- end
- end
-
- prepend Compat
-end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat/requirements/xcode_requirement.rb | @@ -1,21 +0,0 @@
-require "requirement"
-
-class XcodeRequirement < Requirement
- module Compat
- def initialize(tags = [])
- @version = if tags.first.to_s.match?(/(\d\.)+\d/)
- tags.shift
- else
- tags.find do |tag|
- next unless tag.to_s.match?(/(\d\.)+\d/)
- odisabled('depends_on :xcode => [..., "X.Y.Z"]')
- tags.delete(tag)
- end
- end
-
- super(tags)
- end
- end
-
- prepend Compat
-end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/compat/tap.rb | @@ -1,47 +0,0 @@
-class Tap
- module Compat
- def initialize(user, repo)
- super
-
- return unless user == "caskroom"
-
- old_initial_revision_var = "HOMEBREW_UPDATE_BEFORE#{repo_var}"
- old_current_revision_var = "HOMEBREW_UPDATE_AFTER#{repo_var}"
-
- new_user = "Homebrew"
- new_repo = (repo == "cask") ? repo : "cask-#{repo}"
-
- old_name = name
- old_path = path
- old_remote = path.git_origin
-
- clear_cache
- super(new_user, new_repo)
-
- return unless old_path.directory?
-
- new_initial_revision_var = "HOMEBREW_UPDATE_BEFORE#{repo_var}"
- new_current_revision_var = "HOMEBREW_UPDATE_AFTER#{repo_var}"
-
- ENV[new_initial_revision_var] ||= ENV[old_initial_revision_var]
- ENV[new_current_revision_var] ||= ENV[old_current_revision_var]
-
- new_name = name
- new_path = path
- new_remote = default_remote
-
- ohai "Migrating tap #{old_name} to #{new_name}..." if $stdout.tty?
-
- if old_path.git?
- puts "Changing remote from #{old_remote} to #{new_remote}..." if $stdout.tty?
- old_path.git_origin = new_remote
- end
-
- puts "Moving #{old_path} to #{new_path}..." if $stdout.tty?
- path.dirname.mkpath
- FileUtils.mv old_path, new_path
- end
- end
-
- prepend Compat
-end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/dev-cmd/tests.rb | @@ -61,7 +61,6 @@ def tests
ENV.delete("HOMEBREW_NO_GITHUB_API")
ENV.delete("HOMEBREW_NO_EMOJI")
ENV.delete("HOMEBREW_DEVELOPER")
- ENV.delete("HOMEBREW_INSTALL_CLEANUP")
ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
ENV["HOMEBREW_NO_COMPAT"] = "1" if args.no_compat?
ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if args.generic? | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/diagnostic.rb | @@ -115,15 +115,6 @@ def check_for_installed_developer_tools
EOS
end
- def check_build_from_source
- return unless ENV["HOMEBREW_BUILD_FROM_SOURCE"]
-
- <<~EOS
- You have HOMEBREW_BUILD_FROM_SOURCE set.
- #{please_create_pull_requests}
- EOS
- end
-
# Anaconda installs multiple system & brew dupes, including OpenSSL, Python,
# sqlite, libpng, Qt, etc. Regularly breaks compile on Vim, MacVim and others.
# Is flagged as part of the *-config script checks below, but people seem | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/extend/ARGV.rb | @@ -219,15 +219,10 @@ def build_from_source?
switch?("s") || include?("--build-from-source")
end
- def build_all_from_source?
- !ENV["HOMEBREW_BUILD_FROM_SOURCE"].nil?
- end
-
# Whether a given formula should be built from source during the current
# installation run.
def build_formula_from_source?(f)
- return true if build_all_from_source?
- return false unless build_from_source? || build_bottle?
+ return false if !build_from_source? && !build_bottle?
formulae.any? { |argv_f| argv_f.full_name == f.full_name }
end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -15,7 +15,6 @@ def fatal_build_from_source_checks
def supported_configuration_checks
%w[
- check_build_from_source
check_for_unsupported_macos
].freeze
end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/formula.rb | @@ -2510,7 +2510,7 @@ def cxxstdlib_check(check_type)
# version '7.1'
# end</pre>
def fails_with(compiler, &block)
- odeprecated "fails_with :gcc_4_0" if compiler == :gcc_4_0
+ odisabled "fails_with :gcc_4_0" if compiler == :gcc_4_0
specs.each { |spec| spec.fails_with(compiler, &block) }
end
| true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/formula_installer.rb | @@ -46,7 +46,7 @@ def initialize(formula)
@show_header = false
@ignore_deps = false
@only_deps = false
- @build_from_source = ARGV.build_from_source? || ARGV.build_all_from_source?
+ @build_from_source = ARGV.build_from_source?
@build_bottle = false
@force_bottle = ARGV.force_bottle?
@include_test = ARGV.include?("--include-test") | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/manpages/brew.1.md.erb | @@ -192,16 +192,6 @@ Note that environment variables must have a value set to be detected. For exampl
*Default:* the beer emoji.
- * `HOMEBREW_INSTALL_CLEANUP`:
- If set, `brew install`, `brew upgrade` and `brew reinstall` will remove
- previously installed version(s) of the installed/upgraded formulae.
-
- If `brew cleanup` has not been run in 30 days then it will be run at this
- time.
-
- This will become the default in a later version of Homebrew. To opt-out see
- `HOMEBREW_NO_INSTALL_CLEANUP`.
-
* `HOMEBREW_LOGS`:
If set, Homebrew will use the specified directory to store log files.
| true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/os.rb | @@ -18,7 +18,6 @@ def self.linux?
# Don't tell people to report issues on unsupported configurations.
if !OS::Mac.prerelease? &&
!OS::Mac.outdated_release? &&
- !ENV["HOMEBREW_BUILD_FROM_SOURCE"] &&
ARGV.none? { |v| v.start_with?("--cc=") } &&
ENV["HOMEBREW_PREFIX"] == "/usr/local"
ISSUES_URL = "https://docs.brew.sh/Troubleshooting".freeze | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/software_spec.rb | @@ -208,7 +208,7 @@ def patch(strip = :p1, src = nil, &block)
end
def fails_with(compiler, &block)
- odeprecated "fails_with :gcc_4_0" if compiler == :gcc_4_0
+ odisabled "fails_with :gcc_4_0" if compiler == :gcc_4_0
compiler_failures << CompilerFailure.create(compiler, &block)
end
| true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/test/cmd/upgrade_spec.rb | @@ -1,19 +1,10 @@
describe "brew upgrade", :integration_test do
- it "upgrades a Formula to the latest version" do
+ it "upgrades a Formula and cleans up old versions" do
setup_test_formula "testball"
(HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
expect { brew "upgrade" }.to be_a_success
- expect(HOMEBREW_CELLAR/"testball/0.1").to be_a_directory
- end
-
- it "upgrades a Formula and cleans up old versions when `--cleanup` is passed" do
- setup_test_formula "testball"
- (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
-
- expect { brew "upgrade", "--cleanup" }.to be_a_success
-
expect(HOMEBREW_CELLAR/"testball/0.1").to be_a_directory
expect(HOMEBREW_CELLAR/"testball/0.0.1").not_to exist
end | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | Library/Homebrew/test/diagnostic_checks_spec.rb | @@ -6,12 +6,6 @@
expect(subject.inject_file_list(%w[/a /b], "foo:\n")).to eq("foo:\n /a\n /b\n")
end
- specify "#check_build_from_source" do
- ENV["HOMEBREW_BUILD_FROM_SOURCE"] = "1"
- expect(subject.check_build_from_source)
- .to match("You have HOMEBREW_BUILD_FROM_SOURCE set.")
- end
-
specify "#check_for_anaconda" do
mktmpdir do |path|
anaconda = "#{path}/anaconda" | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | docs/FAQ.md | @@ -90,8 +90,6 @@ following conditions:
will use a bottled version of the formula, but
`brew install --enable-bar <formula>` will trigger a source build.
* The `--build-from-source` option is invoked.
-* The environment variable `HOMEBREW_BUILD_FROM_SOURCE` is set
-(intended for developers only).
* The machine is not running a supported version of macOS as all
bottled builds are generated only for supported macOS versions.
* Homebrew is installed to a prefix other than the standard | true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | docs/Manpage.md | @@ -269,10 +269,6 @@ these flags should only appear after a command.
source even if a bottle is provided. Dependencies will still be installed
from bottles if they are available.
- If `HOMEBREW_BUILD_FROM_SOURCE` is set, regardless of whether `--build-from-source` was
- passed, then both *`formula`* and the dependencies installed as part of this process
- are built from source even if bottles are available.
-
If `--force-bottle` is passed, install from a bottle if it exists for the
current or newest version of macOS, even if it would not normally be used
for installation.
@@ -424,9 +420,6 @@ these flags should only appear after a command.
If `--display-times` is passed, install times for each formula are printed
at the end of the run.
- If `HOMEBREW_INSTALL_CLEANUP` is set then remove previously installed versions
- of upgraded *`formulae`* as well as the HOMEBREW_CACHE for that formula.
-
* `search`, `-S`:
Display all locally available formulae (including tapped ones).
No online search is performed.
@@ -1185,16 +1178,6 @@ Note that environment variables must have a value set to be detected. For exampl
*Default:* the beer emoji.
- * `HOMEBREW_INSTALL_CLEANUP`:
- If set, `brew install`, `brew upgrade` and `brew reinstall` will remove
- previously installed version(s) of the installed/upgraded formulae.
-
- If `brew cleanup` has not been run in 30 days then it will be run at this
- time.
-
- This will become the default in a later version of Homebrew. To opt-out see
- `HOMEBREW_NO_INSTALL_CLEANUP`.
-
* `HOMEBREW_LOGS`:
If set, Homebrew will use the specified directory to store log files.
| true |
Other | Homebrew | brew | eed1444d61ee6e61c3b683e45effcd3cbaafed94.json | Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade. | manpages/brew.1 | @@ -276,9 +276,6 @@ If \fB\-\-cc=\fR\fIcompiler\fR is passed, attempt to compile using \fIcompiler\f
If \fB\-\-build\-from\-source\fR (or \fB\-s\fR) is passed, compile the specified \fIformula\fR from source even if a bottle is provided\. Dependencies will still be installed from bottles if they are available\.
.
.IP
-If \fBHOMEBREW_BUILD_FROM_SOURCE\fR is set, regardless of whether \fB\-\-build\-from\-source\fR was passed, then both \fIformula\fR and the dependencies installed as part of this process are built from source even if bottles are available\.
-.
-.IP
If \fB\-\-force\-bottle\fR is passed, install from a bottle if it exists for the current or newest version of macOS, even if it would not normally be used for installation\.
.
.IP
@@ -435,9 +432,6 @@ Uninstall and then install \fIformula\fR (with existing install options)\.
.IP
If \fB\-\-display\-times\fR is passed, install times for each formula are printed at the end of the run\.
.
-.IP
-If \fBHOMEBREW_INSTALL_CLEANUP\fR is set then remove previously installed versions of upgraded \fIformulae\fR as well as the HOMEBREW_CACHE for that formula\.
-.
.TP
\fBsearch\fR, \fB\-S\fR
Display all locally available formulae (including tapped ones)\. No online search is performed\.
@@ -1312,16 +1306,6 @@ Text printed before the installation summary of each successful build\.
\fIDefault:\fR the beer emoji\.
.
.TP
-\fBHOMEBREW_INSTALL_CLEANUP\fR
-If set, \fBbrew install\fR, \fBbrew upgrade\fR and \fBbrew reinstall\fR will remove previously installed version(s) of the installed/upgraded formulae\.
-.
-.IP
-If \fBbrew cleanup\fR has not been run in 30 days then it will be run at this time\.
-.
-.IP
-This will become the default in a later version of Homebrew\. To opt\-out see \fBHOMEBREW_NO_INSTALL_CLEANUP\fR\.
-.
-.TP
\fBHOMEBREW_LOGS\fR
If set, Homebrew will use the specified directory to store log files\.
. | true |
Other | Homebrew | brew | 0015803ddd9a946d2e0c46482abeaf593007d831.json | Update Azure Pipelines
Use latest macOS/Xcode settings. | azure-pipelines.yml | @@ -1,10 +1,10 @@
jobs:
- job: macOS
pool:
- vmImage: xcode9-macos10.13
+ vmImage: macOS-10.13
steps:
- bash: |
- sudo xcode-select --switch /Applications/Xcode_10.app/Contents/Developer
+ sudo xcode-select --switch /Applications/Xcode_10.1.app/Contents/Developer
HOMEBREW_REPOSITORY="$(brew --repo)"
mv "$HOMEBREW_REPOSITORY/Library/Taps" "$PWD/Library"
sudo rm -rf "$HOMEBREW_REPOSITORY" | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.