887 Commits

Author SHA1 Message Date
Dominyk Tiller
db1054be7b
formula: manipulate Java's home usage by default 2017-08-31 21:03:42 +01:00
Bob W. Hogg
06ecad2950 formula: Remove reference to homebrew/x11
That tap is now defunct.

Signed-off-by: Bob W. Hogg <rwhogg@linux.com>
2017-08-05 12:54:39 -07:00
Markus Reiter
c26c9204fa Merge pull request #2965 from reitermarkus/cask-tap
Detect `Tap` in `CaskLoader`.
2017-08-05 16:54:26 +02:00
Bob W. Hogg
732e0aa689 formula: Remove reference to Homebrew/Homebrew
That repo is now defunct. Reference homebrew-core instead.

Signed-off-by: Bob W. Hogg <rwhogg@linux.com>
2017-07-31 19:24:33 -07:00
Mike McQuaid
896f41f7ed Merge pull request #2899 from MikeMcQuaid/enable-deprecations
Enable more deprecations.
2017-07-30 16:32:34 +01:00
Mike McQuaid
e8c4989efb Merge pull request #2923 from MikeMcQuaid/alias-fixes
keg: correctly cleanup old aliases.
2017-07-30 16:02:49 +01:00
Markus Reiter
6d6ce7cf0a Detect Tap in CaskLoader. 2017-07-30 14:22:05 +02:00
Mike McQuaid
baa61f5a6e Use https for all docs.brew.sh links.
May as well use the more secure link when possible.
2017-07-27 15:59:37 +01:00
Mike McQuaid
43c8223dcc formula: ensure aliases don’t include full names.
Aliases that include `/`s end up creating directories and this is bad.
2017-07-21 17:20:12 +01:00
Mike McQuaid
2d18ba586b Enable more deprecations.
It's been long enough that these have been commented out so let's
enable them globally.
2017-07-21 10:50:07 +01:00
Misty De Meo
32b7e32856
formula: use env helper 2017-07-15 17:41:17 -07:00
Mike McQuaid
fa031f5045 formula: tweak keg_only? formatting. 2017-07-07 09:23:31 +01:00
Misty De Meo
a79dc3e65b Formula#keg_only should be a boolean 2017-07-05 16:34:59 -07:00
Markus Reiter
3b4ee58c49 Refactor using Forwardable and DelegateClass. 2017-06-28 09:25:31 +02:00
Markus Reiter
19cf6dcb3f 🔨 Fix sorting on APFS. 2017-06-20 15:44:54 +02:00
Mike McQuaid
ed9942fbd1 Merge pull request #2769 from MikeMcQuaid/rubocop-no-perl-backrefs
rubocop: don’t allow Perl regex backrefs.
2017-06-12 16:47:28 +01:00
Mike McQuaid
021cef4b2b Autocorrect Rubocop Style/SpecialGlobalVars. 2017-06-12 09:11:42 +01:00
Mike McQuaid
7a0aff1080 Autocorrect Rubocop Style/PerlBackrefs. 2017-06-10 20:23:20 +03:00
Markus Reiter
2d6ae61314 Re-revert "Fix operator spacing." 2017-06-02 19:22:05 +02:00
ilovezfs
197392b56d Revert "Fix operator spacing." 2017-06-01 04:06:40 -07:00
Markus Reiter
d34ba7395b Fix operator spacing. 2017-05-31 19:53:41 +02:00
Markus Reiter
3165fd2519 Merge pull request #2663 from reitermarkus/lockfile
Convert `FormulaLock` to more generic `LockFile`.
2017-05-29 19:27:58 +02:00
Mike McQuaid
ef59a751f4 Improve some brew install messaging.
Improve the messaging around `brew install` when there's a possible user
action such as an `upgrade` or `link` and don't tell people to
`install --force` when it's unnecessary.

While I did this, tweak the output and function usage in a couple of
related places.

Some example output before this change:
```
Warning: openssl is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: mysql@5.6 is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: analog-6.0_1 already installed
Warning: bash-completion@2-2.5 already installed, it's just not linked.
```

Some example output after this change:
```
Error: openssl 1.0.2k is already installed
To upgrade to 1.0.2l, run `brew upgrade openssl`
Warning: mysql@5.6 5.6.36_1 is already installed
Warning: analog 6.0_1 is already installed
Warning: bash-completion@2 2.5 is already installed, it's just not linked.
You can use `brew link bash-completion@2` to link this version.
```
2017-05-27 10:15:37 +01:00
Markus Reiter
060af0a26a Rename FormulaLock to LockFile. 2017-05-25 06:18:52 +02:00
Mike McQuaid
6d8c170e50 Merge pull request #2660 from MikeMcQuaid/env-filtering-test
formula: ensure HOMEBREW_PREFIX/bin in test PATH.
2017-05-21 16:35:03 +01:00
Mike McQuaid
d89c870621 formula: ensure HOMEBREW_PREFIX/bin in test PATH.
Only likely to kick in when environment filtering is enabled.

Otherwise we need to tediously add a dramatic number of PATHs to tests
or recurse through the runtime formulae dependencies and add all them.

CC @ilovezfs
2017-05-21 13:55:44 +01:00
Mike McQuaid
49e8c19feb formula: build dependencies are never missing.
If the formula is already installed and they've been removed: that's ok.

Fixes #2625.
2017-05-21 13:51:33 +01:00
Markus Reiter
e1098b0e6d Merge pull request #2638 from reitermarkus/matchers
Use scoped RSpec matchers.
2017-05-19 23:24:35 +02:00
Mike McQuaid
aeaf9af711 Merge pull request #2470 from johnhawkinson/conflicts-info
Display formula conflict reasons
2017-05-16 08:45:45 +01:00
Markus Reiter
3cdf8f938a Use scoped RSpec matchers. 2017-05-15 17:23:40 +02:00
Mike McQuaid
7055abc436 Allow --interactive to access HOME
This may result in a slightly varied build but it’s generally just far
less annoying to be able to access all your e.g. shell configuration.
2017-05-09 20:00:11 +01:00
Mike McQuaid
f951a22bea Install etc/var files on postinstall.
Also, don't delete them after that. This means that `brew postinstall`
becomes a way to easily reinstall configuration files for any formula
without needing any changes to any bottles or requiring a reinstall.
2017-05-03 09:00:17 +01:00
Mike McQuaid
45a7730f61 Fix and remove various TODOs.
Fix those that can be done so without tearing Homebrew to pieces and
remove the comments for those that can never be done.
2017-04-23 15:10:18 +01:00
Mike McQuaid
11acadaa50 Merge pull request #2524 from MikeMcQuaid/more-env-filtering-fixes
Hide sensitive tokens from install/test/post.
2017-04-23 09:45:47 +01:00
Mike McQuaid
d02b4f321d Hide sensitive tokens from install/test/post.
Hide these tokens to avoid malicious subprocesses e.g. sending them
over the network. Also, support using these tokens with environment
filtering and clear `HOMEBREW_PATH` from subprocesses to stop them
sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s
PATH for e.g. `brew doctor` etc.
2017-04-22 16:31:19 +01:00
Mike McQuaid
ba3c46d24f More deprecations.
Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
2017-04-22 16:28:07 +01:00
John Hawkinson
31ce953f69 formula: conflicts_with doc: give realistic :because
The documentation should help a developer understand what the
parameter is for.  "stupid example" doesn't cut it.
2017-04-09 15:07:05 -04:00
Mike McQuaid
1ba401039e Merge pull request #2422 from MikeMcQuaid/formula-missing-dependencies-handle-unavailable-formula
formula: handle missing deps when formula missing.
2017-03-30 20:25:18 +01:00
Mike McQuaid
8472d6a40e formula: check installed_alias_path exists.
Otherwise return `nil`.

Fixes https://github.com/Homebrew/brew/issues/2417
2017-03-30 19:39:26 +01:00
Mike McQuaid
689c1d5aa1 formula: handle missing deps when formula missing.
We could try and get a partial result but given it'll also be wrong it
feels simpler to just return an empty array.

Fixes #1928.
Fixes #2027.
Closes #2058.
Fixes https://github.com/Homebrew/homebrew-core/issues/11827.
2017-03-30 18:54:47 +01:00
Mike McQuaid
7ffb036b52 Merge pull request #2063 from MikeMcQuaid/caveats-clarify
formula: clarify caveats usage.
2017-02-25 14:15:19 +00:00
Mike McQuaid
10970a5c54 formula: clarify caveats usage. 2017-02-20 11:21:25 +00:00
Chris Long
15ae8870a3 Docs for tag-based urls use preferred formatting 2017-02-19 13:21:55 -08:00
Xu Cheng
f3df412e77
cleanup: consider version_scheme
`brew cleanup` should cleanup formulae which have the older
version scheme.
2017-01-30 17:16:56 +08:00
Mike McQuaid
44f1c9752a formula: installed_{as_dependency,on_request} hash
Which, in turn, provides them for `brew info --json=v1` so other tools
such as e.g. `brew bundle` can make use of this information.
2017-01-18 11:23:21 +00:00
Mike McQuaid
dac66c4ada Add keg_only :versioned_formula.
This is used to indicate a formula is a version of another formula.
This will be used to provide a consistent interface for older formulae
versions and replaces the use of `conflicts_with`.
2017-01-17 10:50:04 +00:00
Mike McQuaid
02b7ffd89d formula: runtime_dependencies contains requirement formulae.
When a Requirement is converted to a Formula it should be listed under
the runtime dependencies.
2017-01-15 21:04:59 +00:00
Mike McQuaid
28ad8a06cc formula: return runtime_dependencies in to_hash.
Which, in turn, provides it for `brew info --json=v1` so other tools
such as e.g. `brew bundle` can make use of this information.
2017-01-09 21:03:37 +00:00
ilovezfs
1a394aa7e5 Merge pull request #1782 from ilovezfs/prefix-fixups
Fix abv and prefix_linked?
2017-01-06 02:03:39 -08:00
Mike McQuaid
1a4ff22447 formula: tweak versioned prefix approach. 2017-01-06 08:50:35 +00:00