757 Commits

Author SHA1 Message Date
Rylan Polster
a8bcd92628 deprecate_disable: refactor and add to info 2020-09-07 13:00:02 -04:00
Mike McQuaid
2e5272d04c Deprecate/disable code for Homebrew 2.5.0.
Do the usual "disable deprecations" and "uncomment pending deprecations"
dance and delete/deprecate/disable relevant/related code.
2020-09-03 10:34:22 +01:00
Rylan Polster
e7cf1f4497 fix deprecate! and disable! message 2020-08-31 12:45:55 -04:00
Rylan Polster
4d0a1ff775 deprecate!, disable!: allow symbols for reason 2020-08-31 10:11:08 -04:00
Rylan Polster
689d7eb8f0 disable!, deprecate!: add reason 2020-08-27 10:42:57 -04:00
Markus Reiter
528122638c Document FormulaInstaller. 2020-08-26 03:13:58 +02:00
Mike McQuaid
dbe427073d
Merge pull request #8399 from MLH-Fellowship/migrate-to-args-named
args: Migrate usage of args loading methods to args.named
2020-08-25 10:07:27 +01:00
William Ma
fa7bd3bff6 args: Migrate usage of args loading methods to args.named 2020-08-23 09:02:20 -04:00
Markus Reiter
3118fedab9 Refactor and document Git. 2020-08-23 06:40:07 +02:00
Dawid Dziurla
c8c2e38bcb
Consistently use HOMEBREW_RUBY_WARNINGS when calling ruby
Adding this in `dev-cmd/ruby.rb` allows us to suppress warnings like:
```
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/language/python.rb:8: warning: Insecure world writable dir /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/scm in PATH, mode 040777
```
2020-08-20 14:59:58 +02:00
Rylan Polster
60ec30d41e formula: update license specification 2020-08-19 12:48:50 -04:00
Markus Reiter
7fce76d176 Refactor and document Install. 2020-08-17 19:17:18 +02:00
Markus Reiter
490e503b1b Replace Homebrew.args with Context. 2020-08-06 16:13:14 +02:00
Markus Reiter
bace9ecc34 Pass verbose? to Formula#verify_download_integrity. 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
75a692d08b Make ohai, oh1 and odebug use #debug? and verbose? of the current object when possible. 2020-08-06 16:12:52 +02:00
Markus Reiter
add10377b8 Pass debug? and verbose? to Cleaner. 2020-08-06 16:12:52 +02:00
Mike McQuaid
fb0268da7e
license: handle "Public Domain".
Allow `:public_domain` to be used as a `license` value and ensure that
it's handled correctly by `brew info`, `brew audit` and `brew install`.
2020-08-04 10:47:41 +01: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
05365b5542 Pass args more explicitly in FormulaInstaller. 2020-07-30 03:21:12 +02:00
Markus Reiter
c470a6ff43 Pass args directly to prevent_build_flags. 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
Lionell Loh Jian An
67a974455b Apply suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-07-28 21:01:36 +08:00
Lionell Loh Jian An
52321b4fcd Apply suggestions from code review
Code review changes

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-07-28 21:01:36 +08:00
lionellloh
3982810eab brew style --fix 2020-07-28 21:01:36 +08:00
lionellloh
14d18a9731 Forbidden license logic adapt to Array 2020-07-28 21:01:36 +08:00
Markus Reiter
8a1f8ab858 Pass args to FormulaInstaller instead of using global args. 2020-07-25 04:21:21 +02:00
Markus Reiter
25b3632c4c Pass args to ENV instead of using global args. 2020-07-25 03:57:43 +02:00
Mike McQuaid
a2ae8741a9
Merge pull request #7871 from MLH-Fellowship/license-forbidden
License forbidden
2020-07-10 15:38:51 +01:00
Bo Anderson
16049840dc formula_installer: mv rather than rename on link_overwrite
Fixes a cross-device link error if the two locations are on separate partitions.
2020-07-09 15:06:44 +01:00
lionellloh
c1bdbc53ea include logic for ignore-deps and only-deps 2020-07-09 17:45:04 +08:00
Lionell Loh Jian An
bdb64aa178
Apply suggestions from code review
Code review changes

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-07-09 16:28:00 +08:00
lionellloh
22ef3d5294 brew style --fix 2020-07-09 11:48:09 +08:00
lionellloh
4de020ec6c adapt to forbidden_license_check method signature 2020-07-09 11:38:23 +08:00
Lionell Loh Jian An
5e99ecfbdb
Apply suggestions from code review
Code review changes

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-07-08 23:55:48 +08:00
lionellloh
f0222c3eb7 Moved code from install -> formula_installer 2020-07-07 21:51:15 +08:00
lionellloh
5449904dde small refactor to check env variable within function 2020-07-07 21:42:22 +08:00
lionellloh
fdc9dc4333 require cmd/install to include methods methods in scope 2020-07-07 21:34:48 +08:00
lionellloh
a161829927 forbidden-license: include method in module scope for module-wide access 2020-07-07 21:34:48 +08:00
Mike McQuaid
f951ea83d4
Fix brew style. 2020-07-07 12:23:29 +01:00
Mike McQuaid
9fc0799d5e
Merge pull request #7880 from MikeMcQuaid/check_dependents_install_reinstall
Check installed dependents on install and reinstall
2020-07-02 13:30:29 +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
Mike McQuaid
7596108bd2
Bottle extract and fetch fixes
- Make `brew extract` strip out bottle blocks
- Make `brew extract` output the path in a readable fashion
- Warn about building from source before fetching (not installing)
- If fetching a bottle fails, refetch and build from source.
2020-07-02 11:57:11 +01:00
Issy Long
ad3acf800b
formula_installer: Fix .installed? method deprecation
- Trying to test out a user-submitted `brew bump-formula-pr` for
  `app-engine-java` gave an error locally that [hasn't shown up on
  CI](https://github.com/Homebrew/homebrew-core/pull/55798/checks?check_run_id=740165542),
  oddly.

```
➜ brew install app-engine-java -s && brew test app-engine-java
Error: Calling Formula#installed? is deprecated! Use Formula#latest_version_installed? (or Formula#any_version_installed? ) instead.
/usr/local/Homebrew/Library/Homebrew/compat/formula.rb:6:in `installed?'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:421:in `block (2 levels) in check_requirements'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:420:in `each'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:420:in `block in check_requirements'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:419:in `each_pair'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:419:in `check_requirements'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:392:in `compute_dependencies'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:149:in `verify_deps_exist'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:143:in `prelude'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:328:in `install_formula'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:261:in `block in install'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:259:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:259:in `install'
/usr/local/Homebrew/Library/Homebrew/brew.rb:110:in `<main>'
```
2020-06-04 22:54:07 +01:00
Mike McQuaid
ef95b59ed4
Remove HomebrewArgvExtension
Fixes #5730
2020-05-23 19:39:11 +01:00
Mike McQuaid
bc27e38f18
Remove ARGV.debug?
Replace with `Homebrew.args.debug?`.

Part of #5730.
2020-05-23 14:38:58 +01:00
Mike McQuaid
e1f3c8d2b3
Merge pull request #7579 from MikeMcQuaid/deprecations
Update deprecations
2020-05-23 14:38:10 +01:00