aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/reinstall.rb
AgeCommit message (Collapse)Author
2017-07-30Tweak preserve link status on reinstall/upgrade.Mike McQuaid
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-30Preserve link status on reinstall/upgrade.Mike McQuaid
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-28formula_installer: simplify callers.Mike McQuaid
There's a bunch of duplication going on that's not really necessary.
2017-06-08reinstall: keg.rmtree isn't a method.Mike McQuaid
2017-06-07reinstall: remove partially installed keg.Mike McQuaid
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-05cmd/reinstall: Fix reinstallation of formulae without bottlesBob W. Hogg
Reinstallation of non-bottled formulae was failing because it used a deprecated method. Signed-off-by: Bob W. Hogg <rwhogg@linux.com>
2017-03-31reinstall: perform rename migrations when needed.Mike McQuaid
2017-02-04Pass invalid option names to formula installerThomas Maurer
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.
2016-12-10reinstall/upgrade/install: always output options.Mike McQuaid
This is both easier for debugging and to communicate with users what is being done.
2016-11-12Filter formula build options based on those that exist.Mike McQuaid
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-10-02Use `module_function` for commands.Markus Reiter
2016-09-23Fix Style/GuardClause.Markus Reiter
2016-09-07reinstall: fail if pinnedVlad Shablinsky
2016-08-17Fix minor issues in command help text formattingMartin Afanasjew
- Inconsistent or unneeded indentation - Missing or superfluous empty lines - Missing or wrongly formatted arguments in command summary - Missing punctuation
2016-07-29Add missing development_tools requires.Mike McQuaid
2016-07-18reinstall: handle new optionsXu Cheng
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-18remove unnecessary `Tab.for_formula`Xu Cheng
We already loaded tab in ARGV.resolved_formulae or Formulary.from_rack
2016-07-06development_tools: add installed? method. (#455)Mike McQuaid
2016-05-06brew install: make -s apply only to given formula, not deps (#205)Andrew Janke
2016-04-10Add all the top level commentsMax Nordlund
2016-01-09reinstall: add --interactive and --git optionsZhiming Wang
Closes Homebrew/homebrew#47622. Closes Homebrew/homebrew#47647. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-21Merge bottle install without Xcode branchMisty De Meo
Merge branch 'bottle_hooks'
2015-08-21Add guards to calls that would trigger Xcode install requestsWilliam Woodruff
add guard in Formula#file_modified? to prevent git popup add guard in Superenv.bin before calling MacOS::Xcode.version add guard against missing Xcode/CLT in Xcode.uncached_version return nil instread of 0 in uncached_version when Xcode/CLT are not present, to distinguish from linuxbrew behavior checks against pour_bottle? and needs_relocation?, add guard around keg.relocate_install_names to check pour_bottle?/needs_relocation? as well needs_relocation? becomes skip_relocation?, use cellar attr to indicate relocation instead of does_not_need_relocation MacOS.can_build? becomes MacOS.has_apple_developer_tools?
2015-08-21FormulaInstaller: add prevent_build_flags to eliminate code repetitionWilliam Woodruff
remove unneeded definition change variable in FormulaInstaller.check_build_flags from bf to build_flags
2015-08-21Install: add BuildToolsError and BuildFlagsErrorWilliam Woodruff
Add these new errors, and guards in formula installation and cmd/{,un,re}install to match, move can_build? to the MacOS module, flatten conditions, remove redundant can_build? check reinstate removed (doctor) check
2015-08-09put caveats in finish after post_install Homebrew/homebrew#42565Rafael Kitover
When running brew -v install, long post_install output from the formula, presumably from upstream, may hide the important instructions in the caveats and confuse the user. For example, postgresql runs initdb which prints its own instructions for running the database, making the caveats scroll off screen. Per xu-cheng's instructions in Homebrew/homebrew#42565 : Remove the explicit call to caveats from the install, reinstall, and upgrade commands, as well as the dependency installer code in FormulaInstaller#install_dependency , and call caveats right before the summary code in FormulaInstaller#finish . Closes Homebrew/homebrew#42565. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-05-29reinstall: use Formula#full_nameXu Cheng
2015-05-27reinstall: use ARGV.resolved_formulaeXu Cheng
2015-03-24reinstall, upgrade: tweak use of tab build_bottle.Mike McQuaid
In the case where a bottle wasn't around before and is now it probably doesn't make sense to use `build-bottle` to build something that will be identical to the binary bottle package anyway. After all, when you use the bottle you will end up with something that has been built with `build-bottle` anyway (just not by you).
2014-10-31More specific requireJack Nagel
2014-10-31Remove FormulaAlreadyInstalledErrorJack Nagel
install is the only command that can trigger this warning, so it should be handled before instantiating the installer.
2014-10-15Hide install receipt key namesJack Nagel
2014-06-19Only "extend self" once on the Homebrew moduleJack Nagel
2014-04-05Avoid realpath where it is not necessaryJack Nagel
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-03-15Rewrite `brew reinstall`Jack Nagel
Fixes Homebrew/homebrew#23928.
2014-03-01reinstall: re-raise original exception after cleaning upJack Nagel
2014-03-01reinstall: fix incorrect use of Formula.canonical_nameJack Nagel
Fixes Homebrew/homebrew#27117.
2013-09-05reinstall cleanupSamuel John
2013-09-05Make reinstall transaction safe.Xiyue Deng
* 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-01brew-reinstall: don't list --force in args.Mike McQuaid
2013-09-01brew-reinstall: don't try and rebuild bottles.Mike McQuaid
2013-08-21brew reinstall: Is able to work for all formulaeSamuel John
... 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-21Revert "brew reinstall: Is able to work for all formulae"Samuel John
This reverts commit 865f763ae59fdf32f496ca416fd98117f3370f86.
2013-08-21brew reinstall: Is able to work for all formulaeSamuel John
... 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-14brew reinstall: Reuse options from last timeSamuel John
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-02-18Add 'brew reinstall' command.Mike McQuaid