1863 Commits

Author SHA1 Message Date
Rylan Polster
77b4275f81
Merge pull request #9326 from Rylan12/migrate-style-exceptions
Migrate style exceptions to homebrew/core
2020-12-01 12:19:45 -05:00
Markus Reiter
6f09768549 Add missing require in dev-cmd/irb. 2020-12-01 12:05:21 +01:00
Rylan Polster
c181c9995e style: add --reset-cache option 2020-11-30 18:18:50 -05:00
Markus Reiter
f438fa98be Avoid reinstalling bundler in integration tests. 2020-11-30 20:52:27 +01:00
Markus Reiter
323cfbca41 Fix type error in dev-cmd/dispatch-build-bottle. 2020-11-29 22:59:10 +01:00
Markus Reiter
6fb5315deb Fix unconditionally true condition. 2020-11-29 22:37:24 +01:00
Markus Reiter
749199632b Add signatures for dev-cmd/unbottled. 2020-11-29 22:37:24 +01:00
Markus Reiter
6750448d95 Fix some auto-correctable type errors. 2020-11-29 21:23:54 +01:00
Issy Long
f142714448
Merge pull request #9312 from issyl0/unbottled-fail-nicely-if-HOMEBREW_NO_ANALYTICS
dev-cmd/unbottled: Fail nicely if `HOMEBREW_NO_ANALYTICS` is set
2020-11-27 18:03:34 +00:00
Markus Reiter
79d6c059fc
Merge pull request #9297 from reitermarkus/brew-typecheck
Refactor `brew typecheck` and upgrade `typed` sigils.
2020-11-27 00:01:47 +01:00
Michka Popoff
d42e8c7842
Merge pull request #9310 from iMichka/cellar
bottle merge: add support for linux cellar
2020-11-26 23:31:28 +01:00
Issy Long
ca999a81f7
dev-cmd/unbottled: Fail nicely if analytics data can't be retrieved
- When testing `brew unbottled <formula>` this crashed because I, as a
  maintainer, have `HOMEBREW_NO_ANALYTICS` set on all my machines to
  avoid polluting the analytics with test installs.

```
❯ brew unbottled
==> Getting formulae...
==> Getting analytics data...
Error: undefined method `[]' for nil:NilClass
/usr/local/Homebrew/Library/Homebrew/dev-cmd/unbottled.rb:89:in `formulae_all_sort_installs_from_args'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/unbottled.rb:49:in `unbottled'
/usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'
```
2020-11-26 21:21:48 +00:00
Michka Popoff
95bf529ad2 bottle merge: add support for linux cellar
The first attempt to build and pull a formula (hello) for linux in homebrew-core
resulted in a wrong cellar line being added to the formula's bottle block.

How to test/debug this, using the 4 bottles that where built for hello:
brew bottle --merge --debug hello--2.10_1.mojave.bottle.json hello--2.10_1.x86_64_linux.bottle.json hello--2.10_1.big_sur.bottle.json hello--2.10_1.catalina.bottle.json

This command would add create the following bottle block:

  bottle do
    cellar "/home/linuxbrew/.linuxbrew/Cellar"
    sha256 "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f" => :big_sur
    sha256 "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac" => :catalina
    sha256 "22948764d8f8d7be4870ff92dae64d986eb63a9150b219c20fff87d1a6aa93d6" => :mojave
    sha256 "702dc7f78444d2f4f1c19324be654bcbb8b99dd0e9ce26c3e2fbc3b6464a189f" => :x86_64_linux
  end

After the change in this PR, the result is the following:

  bottle do
    sha256 "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f" => :big_sur
    sha256 "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac" => :catalina
    sha256 "22948764d8f8d7be4870ff92dae64d986eb63a9150b219c20fff87d1a6aa93d6" => :mojave
    sha256 "702dc7f78444d2f4f1c19324be654bcbb8b99dd0e9ce26c3e2fbc3b6464a189f" => :x86_64_linux
  end

The brew bottle --merge code will pick the most common cellar line between the 4 bottles, by order of priority:
- non-relocatable (fixed cellar path)
- cellar :any
- cellar :any_skip_relocation

In the case of the hello bottle, the 3 mac bottles are "cellar :any_skip_relocation", and the linux bottle
is non-relocatable. So the linux bottle wins and the code correctly determines that the 4 bottles should
be non-relocatable.

In that case, the /home/linuxbrew/.linuxbrew/Cellar path is defined as cellar, and by convention
we do not write that out to the formula file, hence the cellar path check that needs to be modified
in this PR.

This PR also fixes the same situation for mac ARM cellar paths
2020-11-26 15:11:55 +01:00
Mike McQuaid
135b5a3679
dev-cmd/unbottled: add new command.
Add a new command to list formulae that aren't bottled for a given OS.
2020-11-26 08:22:06 +00:00
Michka Popoff
9c3515ce73
Merge pull request #9284 from iMichka/first
pr-pull: fix empty workflow check
2020-11-25 17:49:21 +01:00
Markus Reiter
5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +01:00
Markus Reiter
0032cfca5b Refactor brew typecheck. 2020-11-25 17:04:19 +01:00
Michka Popoff
76e52ebe62 pr-pull: fix empty workflow check
workflow_run is an array, which first element is the json
returned by the github API. We need to check that first element
if we want to know if the workflow exists.
2020-11-25 16:10:35 +01:00
Mike McQuaid
f364f0c841
Merge remote-tracking branch 'origin/master' into deprecate-cask-commands 2020-11-25 09:39:00 +00:00
Mike McQuaid
b484f70572
Remove cask from man brew. 2020-11-25 09:37:21 +00:00
Mike McQuaid
db33c9a2a0
Merge pull request #9209 from MikeMcQuaid/deprecations
Deprecations for Homebrew 2.6.0
2020-11-25 08:49:52 +00:00
Rylan Polster
20de58b5ae bump-formula-pr: use new update_python_resources! signature 2020-11-24 15:40:15 -05:00
Rylan Polster
51a1b7c9e1 move pypi list to tap formula_lists directory 2020-11-24 15:40:15 -05:00
Rylan Polster
8e670995f8 migrate automatic python resource list to Homebrew/core 2020-11-24 15:40:15 -05:00
Mike McQuaid
d496f5c121
Deprecations for Homebrew 2.6.0
Do the usual deprecate/disable dance for the Homebrew 2.6.0 release.

Not to be merged until the next release will definitely be 2.6.0.
2020-11-24 16:44:02 +00:00
Michka Popoff
1fc3d22ab4 pr-pull: allow to pull from multiple workflows
and allow to skip missing workflows

Can be used like this:
brew pr-pull --workflows=tests.yml,wheezy_tests.yml --ignore-missing-artifacts=wheezy_tests.yml PRNUMBER
2020-11-24 15:46:44 +01:00
Markus Reiter
7085c37098
Merge pull request #9222 from reitermarkus/brew-cask-create
Allow creating casks with `brew create --cask`.
2020-11-24 11:34:38 +01:00
EricFromCanada
16e22bb5e8 sh: skip reading user-level initialization files 2020-11-22 21:38:22 -05:00
Issy Long
c784d9b955
dev-cmd/audit: Fix "undefined method audit_exceptions"
- When running `brew audit` on formulae that aren't in a Homebrew tap
  location (ie, in a directory outside of
  `/usr/local/Homebrew/Library/Taps`), `brew audit` falls over because
  it can't determine which tap a formula is in.
2020-11-21 20:24:34 +00:00
Markus Reiter
3c2ec1c60f Deprecate remaining cask commands. 2020-11-21 19:56:12 +01:00
Markus Reiter
560f8e2b03 Fix checksum replacement in bump-cask-pr. 2020-11-21 19:08:06 +01:00
Markus Reiter
b6492094d0 Allow creating casks with brew create --cask. 2020-11-21 18:52:26 +01:00
Markus Reiter
49b95da14b Update sorbet and sorbet-runtime together. 2020-11-21 04:14:41 +01:00
Markus Reiter
45950bb8ad Support casks in brew edit. 2020-11-20 00:43:15 +01:00
Markus Reiter
bc24128263 Support casks in brew cat. 2020-11-19 16:01:10 +01:00
Markus Reiter
aa6a8e5c13 Add --update option to brew vendor-gems. 2020-11-19 10:11:19 +01:00
Markus Reiter
9bfbeace54 Fix corrected_problem_count and new_formula_problem_lines. 2020-11-18 18:37:53 +01:00
Markus Reiter
873b2a0042 Fix brew audit --tap=<tap>. 2020-11-18 18:29:20 +01:00
Markus Reiter
24cef5c2ce Support casks in brew audit. 2020-11-18 13:21:49 +01:00
Mike McQuaid
97a7b02f8e
Merge pull request #9188 from MikeMcQuaid/install-quiet-tweaks
Improve `brew install --quiet`
2020-11-18 11:31:43 +00:00
Mike McQuaid
4665a756b5
Merge pull request #9189 from MikeMcQuaid/big-sur-cleanup
Big Sur cleanup
2020-11-18 11:05:24 +00:00
Markus Reiter
dc11f02e16 Move auditor classes into separate files. 2020-11-18 11:22:27 +01:00
Mike McQuaid
74264b8582
Big Sur cleanup
Remove `HOMEBREW_BIG_SUR_TESTING` variable as it is no longer needed.
2020-11-18 10:15:53 +00:00
Mike McQuaid
caae165eb2
Improve brew install --quiet
- Suppress (some more) warnings when doing `brew install --quiet`
- Clarify `man brew` output that we don't suppress all warnings
  for all commands with `--quiet`

While I was doing this I noticed references to the (soon to be
deprecated) `brew switch` so:
- remove these references in `install` output
- remove a reference in the documentation
- add a comment to remind me to deprecate `brew diy`, too

Fixes #9179
2020-11-18 10:13:57 +00:00
Markus Reiter
04272f5f68 Move TapAuditor into separate file. 2020-11-18 10:25:32 +01:00
Markus Reiter
7904cfd122
Merge pull request #9183 from reitermarkus/fix-tests
Unset `HOMEBREW_BAT` in tests.
2020-11-18 08:06:58 +01:00
Markus Reiter
dfeb1b4d08 Unset HOMEBREW_BAT in tests. 2020-11-18 07:03:39 +01:00
Markus Reiter
d1cb2dd872
Merge pull request #9181 from reitermarkus/local-tests
Fix tests failing locally.
2020-11-18 07:01:43 +01:00
Markus Reiter
f87c9c5dc4 Fix tests failing locally. 2020-11-18 05:54:42 +01:00
Dustin Rodrigues
d26567a65d audit: allow checksum to be added/removed when changing download scheme 2020-11-17 08:02:55 -05:00