62 Commits

Author SHA1 Message Date
Dustin Rodrigues
b776fb32de
change includecount to include_count for readability 2023-03-20 07:23:17 -04:00
Dustin Rodrigues
e5fba88035
use includecount argument in pluralize 2023-03-19 23:35:47 -04:00
Issy Long
60d93310af
rubocop: Drop "a" and "b" from Naming/MethodParameterName allowlist 2023-03-11 00:17:28 +00:00
Douglas Eichelberger
0eccc0e987 git grep -l Utils::Inflection | xargs gsed -i 's|Utils::Inflection|Utils|g' 2023-02-27 20:18:27 -08:00
Douglas Eichelberger
3da68651e5 Port more call sites 2023-02-27 20:18:08 -08:00
Douglas Eichelberger
7fb87abefd
Enable typing in Homebrew::Upgrade 2023-02-15 14:24:58 +00:00
hyuraku
5491f7b1bd share Install.print_dry_run_dependencies 2022-09-03 16:01:55 +09:00
hyuraku
66817c0c32 repair how to show formula to be installed 2022-08-17 22:14:20 +09:00
hyuraku
634fcad1b2 add dry-run option to formula#install 2022-08-16 21:01:07 +09: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
rogerdpack
e360b9c6fd
cmd/upgrade: clarify why it is upgrading dependents.
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-02-25 15:59:48 +00:00
Bo Anderson
6e116ffbf3
Merge pull request #12484 from Bo98/core-versioned-dependent-check
upgrade: skip dependent check on core versioned formulae
2021-12-02 02:09:18 +00:00
Carlo Cabrera
ea72daf7bb
upgrade: fix undefined method error
Fixes Homebrew/discussions#2567.
2021-12-01 00:42:06 +08:00
Carlo Cabrera
b30d821a9c
Tweak warning message wording
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-11-29 20:42:41 +08:00
Carlo Cabrera
4b36a0eee5
upgrade: don't upgrade unbottled dependents of upgraded formulae
We upgrade dependents of upgraded formulae to make sure that an upgrade
doesn't break anything. However, this reasoning applies only when a
dependent is bottled, since attempting a source build is just as likely
to break things, if not more.

I've opted not to restrict this to, say, users only on outdated versions
of macOS in order to cleanly handle other cases where this change should
also apply: Linux, or current versions of macOS in a non-default prefix.
2021-11-27 15:51:57 +08:00
Mike McQuaid
6913c7c84e
Output environment variable hints.
Output hints for disabling automatic `brew update`, `brew cleanup` and
`brew upgrade`/`brew reinstall` of dependents. Also provide a
`HOMEBREW_NO_ENV_HINTS` to disable this messaging.
2021-11-26 13:14:10 +00:00
Bo Anderson
d47344b1e8
upgrade: skip dependent check on core versioned formulae 2021-11-26 13:05:50 +00:00
Mike McQuaid
11c5f8f05a
Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:

- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependents
- automatically reinstalling broken dependents

For each of these: let's improve the documentation of the commands
whose behaviour is changed and the environment variables themselves.
2021-11-25 09:10:59 +00:00
Bo Anderson
9d5f4e8ed5
Fix undefined method error following CannotInstallFormulaError 2021-09-14 10:43:38 +01:00
fn ⌃ ⌥
5a94c43b3f install, upgrade: fix installation attempt check 2021-09-13 10:28:13 -07:00
Mike McQuaid
1a904af264
Merge pull request #12018 from FnControlOption/upgrade-tsort
upgrade: use topological sort to upgrade formulae
2021-09-12 19:26:22 +01:00
fn ⌃ ⌥
c0795b5029 upgrade: raise error if developer and there are cyclic dependencies 2021-09-12 07:56:37 -07:00
fn ⌃ ⌥
15e8852128 upgrade: add install_formula helper method 2021-09-10 08:39:36 -07:00
fn ⌃ ⌥
0c3afa5837 install, upgrade: run formula installer prelude before fetching 2021-09-10 06:15:55 -07:00
fn ⌃ ⌥
0c3e49092c upgrade: use topological sort to upgrade formulae 2021-09-09 13:41:50 -07:00
fn ⌃ ⌥
eec60c4086 install, upgrade: don't print message if formula already installed 2021-09-09 10:54:18 -07:00
FnControlOption
03177b5906 upgrade: revert renaming of create_formula_installer 2021-09-01 05:48:12 -07:00
EricFromCanada
c234d1ea03
upgrade: list upgradeable dependencies/migrations/cleanups on dry run 2021-08-31 12:27:14 -04:00
Mike McQuaid
3e1c8ea877
Apply suggestions from code review 2021-08-31 16:35:09 +01:00
FnControlOption
16594c5521 upgrade: fetch_formula_installer -> create_formula_installer 2021-08-31 07:08:24 -07:00
FnControlOption
f45c1146fc upgrade: fetch all formulae before installing 2021-08-30 08:17:28 -07:00
Connor Mann
13e1457249
Consolidate shared install and upgrade logic 2021-06-15 10:11:40 -04:00
Bo Anderson
0deddcfd9f
upgrade: fix broken dependents never being built from source 2021-04-27 17:16:15 +01:00
Bo Anderson
8e98ce69f3
Stricter handling of CLI args 2021-03-18 16:41:57 +00:00
EricFromCanada
f5e1557154 use ofail to set Homebrew.failed 2021-01-26 15:36:43 -05:00
Markus Reiter
6d850a97a1
Merge pull request #9182 from reitermarkus/formula-installer
Refactor `FormulaInstaller`.
2020-11-19 20:18:57 +01:00
Markus Reiter
7c5d8a5288 Refactor FormulaInstaller. 2020-11-18 09:30:11 +01:00
EricFromCanada
bcdb0c7698 upgrade: show upgradeable dependents during dry run 2020-11-17 18:26:35 -05:00
Rylan Polster
50890ebd51 fix Lint/DuplicateBranch style 2020-11-16 02:02:52 +01:00
Mike McQuaid
ffe827ad0e
Fix upgrading dependents on missing keg
Ensure that we don't try to check for broken linkage in a keg that
doesn't exist. Furthermore, fix the reason we checked for the keg that
doesn't exist by `Formula.clear_cache`.

While here, I noticed that there was other methods of caching at use in
`Formula` so consolidate them to be consistent.

Fixes #8997
2020-10-29 08:31:04 +00:00
Muneeb Ahmed
4322b44d4c Refresh installed list before dependency check 2020-10-26 19:29:55 -07:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
95cd1de2a5
HOMEBREW_NO_CHECK_INSTALLED_DEPENDENTS: add variable.
Add an opt-out of this behaviour.
2020-10-06 10:50:51 +01:00
Steve Peters
c04631320c upgrade: deduplicate list of outdated dependents
Use `uniq` on the list of outdated dependents to remove
duplicates, similar to a change made in #8500.
2020-09-18 00:58:53 -07:00
Seeker
5def0701ba formula: rename opt_or_installed_prefix_keg to any_installed_keg 2020-09-01 09:39:20 -07:00
Steve Peters
24e7f55a4c Create check_broken_dependents method 2020-08-30 01:24:42 -07:00
Steve Peters
bdfaaf7940 upgrade: check for already broken dependents
After upgrading a formula, it currently checks for
broken dependents after upgrading any outdated dependents.
If there are no outdated dependents, it exits early
and doesn't check for broken dependents.
This adds an earlier check for already broken dependents
so they can be fixed even if there are no outdated dependents.
2020-08-26 11:29:08 -07:00
Steve Peters
12070b4c0f upgrade: fix undefined method
Add the `Homebrew.` module prefix to fix an undefined method.
Also, use `uniq` to deduplicate the list of broken dependents.
2020-08-26 09:42:18 -07:00
Markus Reiter
4937e4bbc3 Refactor and document Upgrade. 2020-08-24 19:42:24 +02:00
Markus Reiter
3d78bc2111 Fix upgrade --build-from-source. 2020-08-10 06:13:27 +02:00