4907 Commits

Author SHA1 Message Date
Bo Anderson
9b99594753
Preliminary compatibility fixes for Ruby 3 2022-10-11 02:53:27 +01:00
Adrian Ho
5155c9073b update*: enforce sane symlinks setting
Otherwise, a global `core.symlinks = false` setting, likely in a WSL context, breaks Aliases and any other places that use symlinks.

Also enforce consistency in `git config` settings across instances.

Ref: https://github.com/Homebrew/homebrew-core/issues/112539
2022-10-08 22:03:37 +08:00
Mike McQuaid
9c0708f2b5
Merge branch 'master' into add-dry-run-option-to-brew-install 2022-10-03 10:10:58 +01:00
Adrian Ho
75c5769e75 shellenv: add explanatory MANPATH comment
Resolves #13867 and (hopefully) future attempts to correct the intended functionality.
2022-09-15 23:00:34 +08:00
Mike McQuaid
1b3f5980be
Merge pull request #13839 from apainintheneck/no-autoremove-build-deps-when-built-from-src
autoremove: ignore build deps when built from src
2022-09-14 13:10:14 +01:00
Mike McQuaid
c7bd51b995
Merge pull request #13844 from troymccabe/feature/13834-brew-docs-cmd
Adds `brew docs` to close #13834
2022-09-12 14:54:29 +01:00
Mike McQuaid
dbb9af49e7
Update Library/Homebrew/cmd/docs.rb
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2022-09-12 14:25:34 +01:00
Mike McQuaid
572a42ccd0
cmd/docs: tweak description. 2022-09-12 14:12:50 +01:00
Troy McCabe
ac9a96874e Adds brew docs to close #13834 2022-09-11 22:10:37 -05:00
apainintheneck
ae17d3cffd autoremove: ignore build deps when built from src
Now the build dependencies of formula that were installed from
source will not be removed by `brew autoremove`. This is especially
helpful for those who've installed brew in an alternative prefix.
2022-09-09 21:54:32 -07:00
Carlo Cabrera
708935d2c8
cmd/fetch: rename fetch_failed to fetch_tries.
This makes the code substantially easier to understand. Follow-up to #13807.
2022-09-06 18:35:34 +08:00
Carlo Cabrera
360052af57
cmd/fetch: --retry with exponential backoff.
See discussion at Homebrew/homebrew-test-bot#826.
2022-09-06 01:25:34 +08:00
Mike McQuaid
e2759fbdff
Deprecate reading all formulae through commands
We added the `--all` flag (now renamed to `--eval-all`) for various
commands for this behaviour so let's start deprecating this.

Also, introduce a `HOMEBREW_EVAL_ALL` environment variable to use the
existing, less secure, behaviour by default and avoid passing
`--eval-all` everywhere.
2022-09-05 13:57:22 +01:00
Rylan Polster
bfbb7a79bd
Improve brew update with HOMEBREW_INSTALL_FROM_API 2022-09-02 02:10:12 -04:00
EricFromCanada
197f915323
cmd/deps: drop --installed requirement for --formula/--cask
Fixes #13592.
2022-08-31 14:20:11 -04:00
Mike McQuaid
fd432aa1db
cmd/deps: improve switch names.
The previous `-n` and `--1` made both the code and the help harder to
read and follow.

Co-authored-by: Eric Knibbe <enk3@outlook.com>
Co-Authored-By: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2022-08-31 17:21:44 +01:00
Mike McQuaid
a5f7fc814e
cmd/deps: return failing exit code on circular dependencies.
This makes more sense but will also be useful in `brew test-bot`.
2022-08-30 12:21:02 +00:00
Kevin
6f196ad9ba
Merge pull request #13695 from apainintheneck/ls--without-cellar
Update `brew ls` to work when the cellar doesn't exist
2022-08-16 17:55:13 -07:00
hyuraku
634fcad1b2 add dry-run option to formula#install 2022-08-16 21:01:07 +09:00
hyuraku
93ebe42a72 add dry-run option to cask#install 2022-08-16 21:00:45 +09:00
Sean Molenaar
17d0572984
Merge pull request #13683 from SMillerDev/fix/build_env/dump_typing
build_environment: add proper types to dump() and fix inreplace error
2022-08-15 19:34:41 +02:00
Sean Molenaar
2de6958a36
build_environment: add proper types to dump() and fix inreplace error 2022-08-15 19:03:55 +02:00
fn ⌃ ⌥
a208ea9c92 info: highlight package name 2022-08-15 07:47:52 -07:00
apainintheneck
353fe2d322 Update brew ls to work when the cellar doesn't exist 2022-08-13 12:21:14 -07:00
Mike McQuaid
04ff6a18f4
Tweak --debug-symbols description. 2022-08-12 09:34:51 +01:00
Lukas Oberhuber
3d60d610dd Merge branch 'master' into debug-symbols 2022-08-10 18:44:09 -10:00
Anatoli Babenia
fded404e13
Suggestion with better wording
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-08-09 11:59:13 +03:00
Anatoli Babenia
be2ae9a6be brew search --vebose to tell about brew desc 2022-08-09 09:50:44 +03:00
Mike McQuaid
713ff600ef
Merge pull request #13569 from FnControlHomebrew/cleanup
Run periodic cleanup after installing all packages
2022-08-08 13:51:11 +01:00
Carlo Cabrera
ddc23eb268
update-report: reset version_scheme only for runtime dependents
`recursive_dependencies` includes build and test dependencies as well,
which means that we're doing this for too many formulae.
2022-08-06 20:56:53 +08:00
fn ⌃ ⌥
71ab2f6e7a Run periodic cleanup after installing all packages 2022-08-04 07:46:31 -07:00
Kevin
93bf9e5ba2
Merge pull request #13532 from apainintheneck/add-uninstall-autoremove
cmd/uninstall: Add env variable that runs autoremove after uninstalls
2022-08-03 18:10:32 -07:00
Carlo Cabrera
e1f8fa2c9b
Improve settings name
This leads to a slightly more readable entry in `.git/config`.
2022-08-03 20:15:45 +08:00
Carlo Cabrera
f0d2de1869
Skip GCC version check
This is not necessary.

In addition,
1. Avoid an error when `formula.tap` is `nil`.
2. Use the more suggestive `gcc.dep.rpaths.migrated` as the setting
   name.
2022-08-03 15:29:53 +08:00
Lukas Oberhuber
d35f2e76a7 Move Metrics/Blocklength disable to rubocop.yml 2022-08-02 09:06:28 -07:00
Carlo Cabrera
7be6b8e6d1
update-report: migrate GCC recursive dependents
When GCC 12 ships (Homebrew/homebrew-core#106755) ships, most (all?)
Linux bottles that depend on GCC will break.

Let's fix that by using the same trick for handling divergent formula
revisions when migrating formulae from linuxbrew-core (#11982). We set
the recorded `version_scheme` to -1, which spoofs the formula being
outdated. When `brew upgrade` installs GCC 12, the broken formulae will
have their bottles reinstalled too.

This works because the reinstallation will also rewrite the existing
RPATHs to point to the new version of GCC instead (#13631). This should
handle most of the breakage.
2022-08-02 23:57:16 +08:00
Lukas Oberhuber
5b1724ef33 Fix rubocop warning by ignoring for install_args 2022-08-01 15:27:17 -07:00
Carlo Cabrera
72880dea35
Merge pull request #13586 from carlocab/git-fsmonitor 2022-07-29 04:28:15 +08:00
Carlo Cabrera
5e60d54e70
update: disable Git fsmonitor for all Homebrew repositories
Stopping the fsmonitor doesn't seem to work, so let's just prevent the
fsmonitor from watching our repositories.
2022-07-28 22:20:07 +08:00
Carlo Cabrera
c42169249e
cmd/update: stop fsmonitor after all Git operations complete
Also, skip the status check, as that doesn't really help us.
2022-07-28 22:02:31 +08:00
Lukas Oberhuber
215e545660 brew style 2022-07-26 19:28:30 +01:00
Lukas Oberhuber
d195f22522 Connecting up --debug-symbols flag
This connects the calling of dsymutil and the retention of temporary
files. Still need to connect compilation to flag.
2022-07-26 12:15:53 +01:00
Alexander Bayandin
4e8cc524c5 Clean up GitHub headers 2022-07-24 11:44:16 +00:00
Rylan Polster
243ff024e3
Remove debug message 2022-07-21 16:45:41 +02:00
Rylan Polster
f3e34230ad
Add --variations option to brew info 2022-07-21 16:41:15 +02:00
Carlo Cabrera
f9e8531924
cmd/update: stop Git's fsmonitor when needed
Git's fsmonitor daemon will prevent our update lock file from being
released if it is running before a `brew update`.

Let's fix that by stopping it whenever necessary so our update lock is
released upon completion.

Fixes #13521.
2022-07-20 18:18:12 +08:00
apainintheneck
cb91f8b665 Add tests for retrieving formula based on dependents
Also, made sure to clear formula cache before
and after autoremoving packages.
2022-07-17 00:39:23 -07:00
apainintheneck
fe83500617 Moved autoremove logic into cleanup.rb and formula.rb
Cleanup.rb:
- Added #autoremove method
- #autoremove is called in clean when HOMEBREW_AUTOREMOVE is set

Formula.rb:
- Added #unused_formulae_with_no_dependents and helpers

Removed old autoremove.rb module.
2022-07-14 13:16:26 -07:00
apainintheneck
fa43418bfb Moved autoremove logic into autoremove.rb
This allows us to call that logic internally in other brew
commands instead of having to shell out.
2022-07-13 16:31:41 -07:00
apainintheneck
74f1eca14c autoremove.rb: moved logic out into formula.rb, and uninstall.rb
This allows us to autoremove formulae in the autoremove and
uninstall commands without having to shell out to brew.
2022-07-13 16:28:49 -07:00