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
Markus Reiter
490e503b1b
Replace Homebrew.args
with Context
.
2020-08-06 16:13:14 +02:00
Markus Reiter
6c964d4a78
Pass verbose?
to Keg#link
, Keg#unlink
and Keg#optlink
.
2020-08-06 16:12:52 +02:00
Markus Reiter
e9d8f09da1
Pass debug?
, quiet?
and verbose?
to FormulaInstaller
.
2020-08-06 16:12:52 +02:00
Markus Reiter
7926f7fc82
Pass args.verbose?
to BuildError#dump
.
2020-08-06 16:12:52 +02:00
Bo Anderson
ab15c97c61
Fix dependents building from source when not requested
2020-08-02 00:46:17 +01:00
Markus Reiter
6b0678e8ed
Remove args
from FormulaInstaller
.
2020-07-30 03:21:12 +02:00
Markus Reiter
620ca4177e
Pass args
to FormulaInstaller
instead of using global args
.
2020-07-30 03:21:12 +02:00
Markus Reiter
f8934c0255
Pass args
in Install
and Messages
instead of using global args
.
2020-07-30 03:21:12 +02:00
Dustin Rodrigues
e02d08f020
re-enable build from source for install, reinstall, upgrade
2020-07-25 22:27:54 -04:00
Markus Reiter
8a1f8ab858
Pass args
to FormulaInstaller
instead of using global args
.
2020-07-25 04:21:21 +02:00
Bo Anderson
6a49d29b08
upgrade: fix error checking dependents
2020-07-04 18:05:31 +01:00
Mike McQuaid
2c133a3d45
Check installed dependents on install and reinstall
...
It's not sufficient to do this merely on `brew upgrade` because
`brew install` and `brew reinstall` can also result in formulae being
upgraded.
This requires moving logic from `cmd/upgrade.rb` to `upgrade.rb`. To
save you searching the diff the changes that resulted from doing that:
- Query the installed formulae from class state in `FormulaInstaller`
rather than the (incomplete) list that we passed into it.
- Don't output the "Checking dependents" message. It was there for
systems and configurations where this is slow but for most users
and most installations this will be a (annoying, noisy) no-op.
Fixes https://github.com/Homebrew/brew/issues/7860
2020-07-02 12:53:52 +01:00