657 Commits

Author SHA1 Message Date
Bo Anderson
b4f8671849 formula_installer: copy hidden files into bottles. 2019-11-07 14:47:15 +00:00
Mike McQuaid
ddcbdbe0c0
formula: cache runtime_dependencies related stuff. 2019-11-06 10:04:13 +00:00
Mike McQuaid
eeb9ac36a2
keg: cache runtime_dependencies. 2019-11-06 10:04:13 +00:00
Markus Reiter
6c03cc0040 Fix RuboCop namespace. 2019-10-21 20:09:56 +02:00
Mike McQuaid
cbf458ea9c
Lint/ElseAlignment: ignore some bugged autocorrections. 2019-10-14 09:03:02 +01:00
Issy Long
489ba3f462
Auto-fix Layout/ClosingHeredocIndentation offenses 2019-10-13 16:04:32 +01:00
Issy Long
00adbbe98f
Auto-fix Layout/IndentHeredoc offenses 2019-10-13 16:04:31 +01:00
Issy Long
e5e28fbd69
Auto-fix more Layout/IndentationWidth offenses
- These didn't appear in the first pass as the other offense fixes caused them.
2019-10-13 16:04:30 +01:00
Issy Long
245c61017f
Auto-fix Layout/ElseAlignment offenses 2019-10-13 16:04:28 +01:00
Issy Long
341ea60807
Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
Shaun Jackman
495d2e2870 Install bottle deps only when a bottle was poured
Only install the bottle depenencies when a bottle was in fact poured.
In particular, if the dependencies are already satisfied,
then there's no need to install the bottle dependencies.
2019-09-29 23:29:49 -07:00
Mike McQuaid
c9e0ba7d9b
formula_installer: output better tapped formula message.
If we don't have a tab in the receipt then don't print this message and
just continue as-is.
2019-09-25 10:46:06 +01:00
Mike McQuaid
fb12724bdd
Revert "formula_installer: don't always install test deps." 2019-09-20 08:17:50 +01:00
Steven Peters
13647388c1 formula_installer: don't always install test deps.
Fixes #6470.
2019-09-18 15:14:11 -07:00
Mike McQuaid
3cfb028e7f
Resource#fetch: verify downloads by default.
This API is used internally correctly and externally mostly correctly
but #6230 reveals the external usage is fairly confusing and a bit
unsafe by default. Preserve the existing API while verifying the
checksum by default and providing an opt-out. Using the existing, safe
method will result in a double verification of the checksum which is
harmless. A Homebrew/homebrew-core PR will follow shortly to address
those cases.

Fixes #6230
2019-06-15 17:22:45 +01:00
Mike McQuaid
4759ffb88f
reinstall: handle remove/rename permission errors. 2019-05-24 16:46:54 +01:00
Mike McQuaid
c4f72312ce
Fixup brew style failures. 2019-04-30 09:19:18 +01:00
Mike McQuaid
fc6bd2ea1c
Fixup more frozen string handling. 2019-04-20 14:07:29 +09:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
86f43f79ee
Enable/fix optional Ruby frozen string literal usage
Combined with https://github.com/Homebrew/homebrew-test-bot/pull/247
this will test Homebrew's use of frozen strings in CI. After this we
will then enable it for Homebrew developers and eventually all Homebrew
users.
2019-04-19 10:30:41 +09:00
EricFromCanada
fa6404e0f5 grammar fixes 2019-04-13 21:29:32 -04:00
Mike McQuaid
59d680a626
dev-cmd: only one integration test per command.
Integration tests are useful in detecting breakages but much slower so
let's only use one per command and install formula outside the
integration test framework (which is also slow).
2019-03-27 09:45:48 +00:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Misty De Meo
ea9977f3c3 formula_installer: handle attempts to load invalid casks
Certain casks in the main cask repository may be invalid, for whatever
reason. Without handling this exception, the user will get a cask-related
exception while the formula of the same name is installed, and their
installation will abort half-completed.

Fixes #5709.
2019-02-11 15:11:19 -08:00
Mike McQuaid
618f75c071
Merge pull request #5619 from GauthamGoli/install-args
install: Use CLI::Parser to parse args
2019-01-29 14:11:22 +00:00
Mike McQuaid
24eb8e8e54
Remove (now) unused invalid_option_names.
This is handled by `OptionParser` now instead in `cmd/install`.
2019-01-29 08:31:45 +00:00
Mike McQuaid
9b5ab7fbb7
Merge pull request #5598 from MikeMcQuaid/odeprecated-odisabled
Update deprecations and cleanup
2019-01-27 12:13:26 +00:00
Mike McQuaid
6f184ea0dd
formula_installer: skip linking formulae with already installed casks.
If you have the `emacs` or `docker` formulae and casks both
installed the formula will fail to link. Skip trying to link the formula
if the cask is already installed.

Fixes https://github.com/Homebrew/homebrew-core/issues/36310.
2019-01-25 20:10:02 +00:00
Mike McQuaid
eed1444d61
Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade.
2019-01-23 21:57:40 +00:00
Mike McQuaid
589ed8e17c
Tweak diagnostic checks
- Make `gist-logs` perform more checks
- Don't complain about a non-/usr/local install at install time unless
  actually building from source.
- Show more checks output on a build error
- Improve naming of checks methods
2019-01-21 19:23:31 +00:00
Mike McQuaid
b278165dab
Add HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK variable
If set, Homebrew will fail if on the failure of installation from a
bottle rather than falling back to building from source.
2019-01-12 12:08:18 +00:00
Mike McQuaid
61fa59e95b
Remove Travis CI specific code
We’re no longer using this for our CI so this is no longer necessary.

Also, migrate `brew tap-new` to use Azure pipelines.
2018-12-30 21:13:24 +00:00
Mike McQuaid
b0f382c177
Merge pull request #5297 from MikeMcQuaid/postinstall-developer-failures
formula_installer: output postinstall failures for developers.
2018-11-11 10:40:19 +00:00
Mike McQuaid
dd22198b59
formula_installer: output postinstall failures for developers.
This message is pretty useless without a backtrace.
2018-11-11 10:01:16 +00:00
Mike McQuaid
50c9670605
formula_installer: don't automatically upgrade from another tap.
Rather than automatically upgrading a formula from one tap to a formula
from another when specified as a dependency require a manual
intervention to be clear that's the user's intention.
2018-11-10 12:04:26 +00:00
Shaun Jackman
605e61095a relocation_formulae: Poured bottles depend on gcc [Linux] 2018-10-23 09:03:20 -07:00
Markus Reiter
16618d0fc7 Use ActiveSupport’s #pluralize and #to_sentence. 2018-10-07 23:10:56 +02:00
Mike McQuaid
59c858a8e8
Cleanup Travis and CI configuration.
Use the environment variables set by `brew test-bot`. Eventually we'll
disable Travis CI running CodeCov so move `TRAVIS` references to
`HOMEBREW_TRAVIS_CI` so it doesn't need whitelisted.

Also, fix `azure-pipelines.yml` so it's testing the correct version of
Homebrew/brew (the one checked out in the `pwd`).
2018-09-19 15:01:33 +01:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Mike McQuaid
7615d3a812
Improve writable directory handling
Consolidate the handling of which directories need to exist and which
need to be writable. Additionally, add a fatal check for formula
installations to ensure that any directories that need to be writable
are so before attempting an installation.

Fixes #4626.
2018-09-06 18:38:43 +01:00
William Woodruff
367629d289
utils: Use JSON to marshal child errors
Replaces our serialization of child process
errors via Marshal with JSON, preventing
unintentional or malicious code execution outside
of the build sandbox.

Additionally, adds tests for the new behavior.
2018-09-04 11:03:32 -04:00
Mike McQuaid
bcb1ec5499
Improve Homebrew/brew line length.
Use 124 max line length everywhere. Also, reduce tap max line length to
189 as Homebrew/homebrew-core has that as a maximum now. In future
Homebrew/homebrew-core will also be reduced to 124 maximum line length.
2018-09-02 16:15:09 +01:00
Mike McQuaid
ca6c75d229
Check version conflicts using linkage.
Instead of refusing to install software preemptively by assuming
multiple linkage to differing versions of the same library we now make
`brew linkage --test` verify that we don't have two versions of the
same library linked at the same time.

This will be considerably more permissive whilst checking the actual
problem that we're worried about.
2018-08-27 10:12:02 +01:00
Mike McQuaid
7df5b7057e
Revert "Use JSON to marshal errors from children" 2018-08-18 08:20:13 +01:00
William Woodruff
5c90833f0a
Use JSON to marshal errors from children 2018-08-17 15:23:08 -04:00
Michka Popoff
dc527fccdc formula_installer: avoid cyclic dependency
Fixes:
==> Installing patchelf dependency: patchelf
==> Installing dependencies for patchelf: patchelf
==> Installing patchelf dependency: patchelf
==> Installing dependencies for patchelf: patchelf
==> Installing patchelf dependency: patchelf
==> Installing dependencies for patchelf: patchelf
...
2018-08-08 21:21:56 +02:00
Markus Reiter
5841b992ac Refactor $LOAD_PATH. 2018-07-17 23:38:57 +02:00
Mike McQuaid
375d401580 Handle missing formulae in runtime_dependencies
Hopefully put this to bed for once and for all. Add a new method
`runtime_formulae_dependencies` which returns the `runtime_dependencies`
which have only the `Formula` objects that exist. I've checked all the
`runtime_dependencies` callers and updated them accordingly.

Also, fix a few cases where runtime dependencies were being read from
the tab when this wasn't desirable.
2018-07-16 16:46:39 +01:00
Andrew Janke
0a2d8c3d4d Add --display-times option to install, reinstall, and upgrade 2018-07-14 11:06:03 -04:00
Andrew Janke
c644392a85 Display collected caveats at end of install or upgrade 2018-07-12 20:41:32 -04:00