166 Commits

Author SHA1 Message Date
Jack Nagel
9a356fc609 Remove FormulaAlreadyInstalledError
install is the only command that can trigger this warning, so it should
be handled before instantiating the installer.
2014-10-31 18:33:39 -05:00
Jack Nagel
7266ecd4e3 Hide install receipt key names 2014-10-15 01:30:56 -05:00
Jack Nagel
10a1952d2c Only "extend self" once on the Homebrew module 2014-06-19 13:10:36 -05:00
Jack Nagel
ce1f598e98 Avoid realpath where it is not necessary
Symlinks in opt and LinkedKegs point directly at a keg in the cellar, so
only resolving one symlink should suffice, and make it clear what path
we are actually interested in.
2014-04-05 12:17:19 -05:00
Jack Nagel
eab90dcb56 Rewrite brew reinstall
Fixes Homebrew/homebrew#23928.
2014-03-15 10:53:03 -05:00
Jack Nagel
7966b29ac6 reinstall: re-raise original exception after cleaning up 2014-03-01 18:27:30 -06:00
Jack Nagel
cf4e7e5954 reinstall: fix incorrect use of Formula.canonical_name
Fixes Homebrew/homebrew#27117.
2014-03-01 18:22:35 -06:00
Samuel John
6ae2e872d3 reinstall cleanup 2013-09-05 14:59:33 +02:00
Xiyue Deng
8aae1dac7b Make reinstall transaction safe.
* Aborting during reinstall will now restore the originally installed
  keg.
  - Change install code to pass on CannotInstallFormulaError exception
    to caller so it can be reused in reinstall.
* Add "--force-new-install" flag to force installing a new formula.

Closes Homebrew/homebrew#22190.

Signed-off-by: Samuel John <github@SamuelJohn.de>
2013-09-05 14:02:29 +02:00
Mike McQuaid
0c5d928cad brew-reinstall: don't list --force in args. 2013-09-01 13:57:40 +01:00
Mike McQuaid
22da8eb633 brew-reinstall: don't try and rebuild bottles. 2013-09-01 13:57:40 +01:00
Samuel John
43fc7423d7 brew reinstall: Is able to work for all formulae
... and not just installed ones. Of course, strictly speaking,
reinstalling not-yet-installed formulae makes semantically little
sense, but the big win is that we can tell people (after we have
resolved an issue) to `brew reinstall <formula>` and even if a user
has removed that formula in the meantime, reinstall will do the right
thing. Basically adding --force to uninstall. I think this makes
reinstall more robust.
2013-08-21 20:18:55 +02:00
Samuel John
5a0bad6b42 Revert "brew reinstall: Is able to work for all formulae"
This reverts commit 865f763ae59fdf32f496ca416fd98117f3370f86.
2013-08-21 20:17:38 +02:00
Samuel John
4bb49a6439 brew reinstall: Is able to work for all formulae
... and not just installed ones. Of course, strictly speaking,
reinstalling not-yet-installed formulae makes semantically little
sense, but the big win is that we can tell people (after we have
resolved an issue) to `brew reinstall <formula>` and even if a user
has removed that formula in the meantime, reinstall will do the right
thing. Basically adding --force to uninstall. I think this makes
reinstall more robust.
2013-08-21 19:20:41 +02:00
Samuel John
cae03e3363 brew reinstall: Reuse options from last time
Now, we can finally stop stuggesting to
    `brew rm <foo>` and then `brew install <foo> <with-your-preferred options>

So `brew reinstall` will honor all options that have been recorded
into the INSTALL_RECEIPT.json plus if `--build-bottle` was used.
2013-08-14 22:25:03 +02:00
Mike McQuaid
ddaf891add Add 'brew reinstall' command. 2013-02-18 10:41:53 +00:00