905 Commits

Author SHA1 Message Date
Mike McQuaid
f2ce6489b2 Use more docs.brew.sh short links
These are nicer on the eyes.
2018-02-22 19:46:58 +00:00
ilovezfs
f818f0e681 formula: reject dot dirs as racks
Dot directories are not racks because formulae names do not start with
"." so avoid attempting to descend into dot directories, which may not
always be possible (e.g. .Trashes).
2018-01-19 15:07:04 -08:00
Mike McQuaid
8a45467ad9
Merge pull request #3661 from MikeMcQuaid/deprecate-default-formula
Deprecate default_formula Requirement DSL
2018-01-18 15:30:56 +00:00
Mike McQuaid
e5c82dd3d9 Deprecate requirements harder
Remove more Requirement logic to enable future removal of default
formula logic. Also, output deprecations, convert symbol requirement
usage to deps and simplify the compatibility code for the direct
Requirement usage.
2018-01-18 08:31:20 +00:00
Mike McQuaid
b70b5429d0 Deprecate default_formula Requirement DSL
This has been a nightmare in terms of the complexity to our dependency
system and the whack-a-mole required on bugs. If a Requirement resolves
to a Formula it should just use `depends_on "formula"` instead. This
matches the effective behaviour all users of bottles (the vast majority
of users and installs) and what we're doing in Homebrew/homebrew-core.
2018-01-14 13:27:43 +00:00
Mike McQuaid
e903a5f655
formula: tweak more depends_on examples. 2018-01-11 13:33:54 +00:00
Michihito Shigemura
f5e8b2680e docs: Fix depends_on examples in Formula page
example:

Error: depends_on :mysql
Correct: depends_on "mysql"
2018-01-11 21:05:14 +09:00
Mike McQuaid
faf2182495 gpg: move to compat. 2017-12-30 20:56:54 +00:00
Mike McQuaid
51114139e1 formula: require gpg and make it a module. 2017-12-29 16:19:09 +00:00
Mike McQuaid
65e719db25 post_install: use HOMEBREW_PATH.
Do this instead of appending the `HOMEBREW_PREFIX` as it's more
reliable at finding e.g. keg-only and requirement PATH additions. It's
not ideal as it overrides some environment filtering but the only real
alternative is recreate the entire build environment by shelling out to
`build.rb` in `formula_installer`.
2017-12-15 10:05:43 +00:00
Mike McQuaid
b085da91c3 postinstall: add HOMEBREW_PREFIX/{,s}bin to PATH.
This avoids the need for workarounds such as:
https://github.com/Homebrew/homebrew-core/pull/21688
2017-12-14 09:20:07 +00:00
Markus Reiter
36c0dbfe13 Simplify PATH usage in Formula. 2017-12-02 00:12:21 +01:00
ilovezfs
3769bcc523 formula: fix safe navigation bug
Safe navigation needs to be chained to preserve equivalence.

Fixes a bug introduced by 01e9ec9a in #3183.
2017-11-02 07:26:00 -07:00
Mike McQuaid
ca189437e4 Tweak use of with_env
- Use it in more places where it saves code
- Allow using symbolic keys for a cleaner interface
- Use `HOMEBREW_GEM_*` instead of `GEM_OLD_*`
2017-10-29 14:44:43 +00:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Markus Reiter
175ca909ee Clean up code style and remove .rubocop_todo.yml. 2017-10-08 16:10:37 +02:00
Mike McQuaid
cf5fdeef1d Rubocop: manual rule fixes. 2017-09-24 21:23:59 +01:00
Mike McQuaid
01e9ec9a9f Rubocop: automatic rule fixes. 2017-09-24 21:23:59 +01:00
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