76 Commits

Author SHA1 Message Date
Gautham Goli
959b88266d
ARGV: Replace usages of ARGV.resolved_formulae with Homebrew.args 2020-01-02 13:56:19 +00:00
EricFromCanada
90e830c19e cmd: add raises for invalid input 2019-12-15 00:04:45 -05:00
EricFromCanada
8a8359cdd4 manpages: sentence rewording for readability
Use active voice when applicable, better verbs & adjectives, preposition usage, proper tense, etc.
2019-08-20 09:05:45 -04:00
EricFromCanada
6520785307 manpages: grammar fixes 2019-08-20 08:26:26 -04:00
EricFromCanada
a3e0647797 manpages: whitespace fixes 2019-08-20 08:24:20 -04:00
Mike McQuaid
9354081323
Add HOMEBREW_DISPLAY_INSTALL_TIMES
Fixes #6300
2019-07-28 11:12:32 +01:00
Mike McQuaid
c4f72312ce
Fixup brew style failures. 2019-04-30 09:19:18 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
e40b171127
Rename cli_parser to cli/parser. 2019-04-17 22:16:50 +09:00
Mike McQuaid
267d721988
Note HOMEBREW_NO_INSTALL_CLEANUP in the help/manual 2019-02-03 09:34:00 +01:00
Mike McQuaid
6cb7a00f2d
cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Mike McQuaid
867b155479
Add missing conflicts to command options. 2019-01-29 19:39:41 +00:00
Mike McQuaid
9eabcdad7d
Make install/reinstall/upgrade options more consistent. 2019-01-29 19:25:59 +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
8144667a71
Cleanup periodically if HOMEBREW_INSTALL_CLEANUP is set.
This will become the default in a later version of Homebrew but has an
opt-out through HOMEBREW_NO_INSTALL_CLEANUP.

Also, always cleanup files older than 120 days and set the general
default value for "old" logs, casks etc. to 30 days.
2019-01-03 16:23:44 +00:00
Mike McQuaid
069b7e89a9
reinstall: add build-from-source switch.
Fixes #5431.
2018-11-24 15:36:59 +00:00
Gautham Goli
75aae9c8a8
reinstall: Add verbose flag 2018-11-13 17:28:22 +05:30
Gautham Goli
2736aed1fd
reinstall: Use CLI::Parser to parse args 2018-11-07 22:33:32 +05:30
Jarek Wojciechowski
6c2f41b90c Update docs and manpage for HOMEBREW_INSTALL_CLEANUP 2018-10-30 10:19:45 -04:00
Jarek Wojciechowski
51ca60d6d5 add formula cleanup to install and reinstall 2018-10-29 11:23:32 -04:00
L. E. Segovia
d442905719
Upgrade: implement linkage repair
After upgrading existing kegs, we now search and upgrade their
dependents as well. If any are detected that have broken linkage, they
are reinstalled from source.

If there are any formulae in the dependents tree that are pinned, they
are only reinstalled if they're not outdated; in all cases, a suitable
message is printed detailing the kegs that will be acted upon.
2018-09-12 19:28:02 +00: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
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
Mike McQuaid
e03f07f302 Rubocop 0.53.0 automatic fixes. 2018-03-08 14:10:02 +00:00
Chayoung You
b05d69f600
Format identifiers in oh1 2018-02-09 18:00:29 +09:00
Mike McQuaid
838a3f1996 reinstall/upgrade: stop unlinked kegs being sticky
It's not possible to determine the difference between a non-keg-only
keg that failed to link and one that wasn't linked by us intentionally.

To avoid additional complexity of storing this logic in another place
let's back out this relatively new functionality; sticky keg-only links
is a better and more desirable behaviour anyway.
2018-01-10 16:43:21 +00:00
Mike McQuaid
7eb1fd6671 reinstall/upgrade: document use of options.
To avoid user confusion e.g. #3606.
2017-12-30 21:23:33 +00:00
Markus Reiter
175ca909ee Clean up code style and remove .rubocop_todo.yml. 2017-10-08 16:10:37 +02:00
Mike McQuaid
044f4d947b Tweak preserve link status on reinstall/upgrade.
Treat a `brew install` command as normal i.e. link by default unless
keg-only and only specify whether a keg should be linked when upgrading
or reinstalling. Also, adjust the naming accordingly so it's more
obvious that this is the case.
2017-07-30 21:44:43 +01:00
Mike McQuaid
7ec0505200 Preserve link status on reinstall/upgrade.
This means if a user has manually `brew unlink` or `brew link --force`d
something then that status will be preserved after they `brew upgrade`
or `brew reinstall` that formula.

This generally should make things that are keg-only by default easier
to swallow.
2017-07-30 16:20:32 +01:00
Mike McQuaid
b8611bd988 formula_installer: simplify callers.
There's a bunch of duplication going on that's not really necessary.
2017-07-28 15:27:47 +01:00
Mike McQuaid
18fb81906e reinstall: keg.rmtree isn't a method. 2017-06-08 16:24:55 +03:00
Mike McQuaid
838bb38b3e reinstall: remove partially installed keg.
Previously if a `brew reinstall` was Ctrl-Cd after some files had been
installed it wouldn't try to remove the partially installed keg and the
renaming of the backed-up keg would fail. Alternatively, remove the
partially installed keg as if it has been Ctrl-Cd or otherwise failed
then it's not desirable to keep it.
2017-06-07 15:58:13 +01:00
Bob W. Hogg
51e83cdf91 cmd/reinstall: Fix reinstallation of formulae without bottles
Reinstallation of non-bottled formulae was failing because it
used a deprecated method.

Signed-off-by: Bob W. Hogg <rwhogg@linux.com>
2017-06-05 18:35:43 -07:00
Mike McQuaid
61ebc128af reinstall: perform rename migrations when needed. 2017-03-31 10:01:46 +01:00
Thomas Maurer
6594650eb1
Pass invalid option names to formula installer
This is the same that happens in the command 'install'. By passing
the invalid option names, we enable the formula installer to output
warnings if necessary.
2017-02-04 18:10:37 +01:00
Mike McQuaid
e347f7ade3 reinstall/upgrade/install: always output options.
This is both easier for debugging and to communicate with users what is
being done.
2016-12-10 13:07:03 +00:00
Mike McQuaid
56124f5963 Filter formula build options based on those that exist.
If `--with-foo` is provided to a formula through a tab or through
another formula depending on it and this option does not exist it
should be filtered. If it is not (the prior behaviour) then this can
prevent bottles being used unnecessarily.

Fixes #1399.
2016-11-12 12:11:55 +00:00
Markus Reiter
0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Markus Reiter
a5b11a6a5c Fix Style/GuardClause. 2016-09-23 15:30:07 +02:00
Vlad Shablinsky
f8ea7a4a0c reinstall: fail if pinned 2016-09-07 20:58:13 +03:00
Martin Afanasjew
823505a058 Fix minor issues in command help text formatting
- Inconsistent or unneeded indentation
- Missing or superfluous empty lines
- Missing or wrongly formatted arguments in command summary
- Missing punctuation
2016-08-17 01:25:51 +02:00
Mike McQuaid
164e46a729 Add missing development_tools requires. 2016-07-29 21:21:02 -06:00
Xu Cheng
d7ee541293
reinstall: handle new options
Since we are loading options as Formula#build from tab, we will have to explicitly read
options from ARGV as well.

Fixes #3066.

Closes #537.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-07-18 18:11:54 +08:00
Xu Cheng
820b6347b8
remove unnecessary Tab.for_formula
We already loaded tab in ARGV.resolved_formulae or Formulary.from_rack
2016-07-18 18:11:53 +08:00
Mike McQuaid
3a127e405e development_tools: add installed? method. (#455) 2016-07-06 11:07:24 +01:00
Andrew Janke
d887dd39ec brew install: make -s apply only to given formula, not deps (#205) 2016-05-06 12:02:13 -07:00
Max Nordlund
fa1fd70a37 Add all the top level comments 2016-04-10 22:59:25 +02:00
Zhiming Wang
81dc194ebf reinstall: add --interactive and --git options
Closes Homebrew/homebrew#47622.

Closes Homebrew/homebrew#47647.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-09 10:33:19 +00:00