aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/upgrade.rb
AgeCommit message (Collapse)Author
2015-04-26upgrade: announce usage of --all.HEADmasterMike McQuaid
Tell users that we will soon be migrating `--all` so it is required if you wish to upgrade all formulae. Closes #38572.
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).
2015-01-04Checkout outdatedness in `brew upgrade <formula>`Jack Nagel
Fixes #35523.
2015-01-04Explicitly pass formulae to outdated_brewsJack Nagel
2014-11-03Make quieter an installer modeJack Nagel
2014-10-15Hide install receipt key namesJack Nagel
2014-09-14Consistently call name on formula instead of relying on to_sJack Nagel
2014-08-17Upgrade honors build_bottle? and built_as_bottle optionsLarry Shaffer
Closes #31628. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-06-19Only "extend self" once on the Homebrew moduleJack Nagel
2014-05-26pluralize formulae in tap/untapAdam Vandenberg
Closes #28560.
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-24Check existence of target keg instead of hiding exceptionsJack Nagel
2014-03-13Make FormulaInstaller setup more readableJack Nagel
2014-03-13Make debug an installer modeJack Nagel
2014-03-13Make verbose an installer modeJack Nagel
2014-03-13Don't set installer options to their defaultJack Nagel
ignore_deps and show_header default to false.
2014-03-10Make build_from_source an explicit installer modeJack Nagel
2014-03-05Teach commands to work with revisionsJack Nagel
2014-03-04Let commands decide what mode the installer should useJack Nagel
2014-03-04Extract installer setup to prelude methodJack Nagel
2014-03-02Stop mutating build options in upgradeJack Nagel
2014-03-02Revert "Let commands decide what mode the installer should use"Jack Nagel
I'd still like to make this change, but at least for now the initializer requires ignore_deps to be set correctly. This reverts commit 881a8855b944fa9bd7dfd598bb9197f79f7a13f0.
2014-03-02Fix typoJack Nagel
2014-03-02Let commands decide what mode the installer should useJack Nagel
2014-03-02Reduce the number of ways options can be passed to the installerJack Nagel
2014-02-18Add DownloadError to catch a broader range of resource download errors.Drew Rodman
Adding a broader exception class allows for errors raised in Resource.fetch to be caught in upgrade and prevent the process from being killed when a download fails. This should resolve issue 18364. Fixes #18364. Closes #26618. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-01-26upgrade: fix output when no packages to upgrade.Frizlab
When upgrading, if the only package to upgrade is a pinned package, the output looked like that: ==> Upgrading 0 packages, with result: ==> Not upgrading 1 pinned package: <<package_name & version>> The blank line is not beautiful. This commit fixes the output and replaces with: ==> No packages to upgrade ==> Not upgrading 1 pinned package: <<package_name & version>> Closes #26157. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-09-26upgrade.rb: Fix plural_s when number = 0Nikolaus Wittenstein
Currently Upgrade prints out: "Upgrading 0 outdated package, with result:" This change makes it print: "Upgrading 0 outdated packages, with result:" correctly pluralizing "packages". Closes #22854. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-07-18upgrade: put exit statements in both conditional branchesAdam Coffman
This check was only occurring in one branch of the conditional. As a result, if you ran `brew upgrade` with no args and there were no packages to upgrade, the nonsensical message "==> Upgrading 0 outdated package, with result:" would be printed. Closes #21316. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-07-15upgrade: don't rely on return value of 'onoe'Jack Nagel
2013-07-15upgrade: make condition clearerJack Nagel
2013-07-15upgrade: move require out of method bodyJack Nagel
2013-07-15upgrade: remove redundant conditionalJack Nagel
Since e1c62c35465eb6149688c745e4309438c08c410b, we exit early if the outdated array is empty, so we no longer need to check this before proceeding.
2013-06-08Consolidate sudo checks.Adam Vandenberg
Closes #20318.
2013-05-24upgrade: fix expansion of options for top-level formula objectsJack Nagel
Fixes #20045.
2013-05-18upgrade: fix typoJack Nagel
2013-05-18upgrade: use a method rather than a boolean flagJack Nagel
2013-05-18upgrade: tighten installed preconditionJack Nagel
2013-03-30brew-pin: prevent selected formulae from upgrade.Simon Sigurdhsson
* Added `pin` et. al. to manpage. * Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1` * Added `brew list --pinned` to `brew.1` * Added information about frozen formulae to `brew upgrade` in `brew.1` * Added `pin` et.al. to completion scripts. * Unpin formulae when uninstalling them * Unpin and re-pin formulae when upgrading (avoids stale symlink) References #18386. Closes #18515. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-01-26upgrade: use standard Tab accessorJack Nagel
Yes, the formula object does refer to a version that has not yet been installed, but we were not looking into Formula#prefix, but #linked_keg, which is version agnostic (since the original patch was committed, we Tab#for_formula learned to look into #opt_prefix as well). The rest of the logic is already embedded in the Tab accessors.
2013-01-26upgrade: offload dependency expansion to FormulaInstallerJack Nagel
Now that FormulaInstaller does dependency expansion the _right_ way, avoid duplicating the logic in upgrade. Instead, offload it to the installer, which will generate an exception in check_install_sanity that we can safely ignore when formulae in the outdated list are upgraded as part of the dependency tree of another outdated formula.
2013-01-26FormulaInstaller: don't install bottle if options were passedJack Nagel
2013-01-26FormulaInstaller: make tab an attr, but never a parameterJack Nagel
2013-01-21brew upgrade: improve exit codes.Matt Di Pasquale
exit 1 if formulae given but none outdated Closes #17199. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-01-10Don't attempt installation multiple timesJack Nagel
When a dependency of a formula specified on the command-line is also specified, *after* the dependent formula, installation proceeds as part of the dependent's dependency tree and then is attempted again because the user asked for it explicitly. This results in the installer raising a CannotInstallFormulaError because it has already been installed. For example: $ brew install graphviz pkg-config ==> Installing graphviz dependency: pkg-config ... ==> Installing graphviz ... Error: pkg-config-0.27.1 already installed We already have a mechanism for dealing with this, but it does not kick in early enough. Move the installation attempt check into FormulaInstaller#check_install_sanity and catch the exception in the appropriate places. Fixes #16957.
2012-12-18upgrade.rb: Generate Tab from Keg not FormulaCharlie Sharpsteen
Two issues were preventing `brew upgrade` from functioning properly: - `Tab.for_formula` was used to recover options from prior installs. The problem is that during an upgrade `for_formula` will be directed to a non-existant install of the newer version and thus returns a forged tab claiming no options were invoked. - The assignment to `installer.install_bottle` requires parenthesis in order to function properly.
2012-08-18Don't lie about upgrading up-to-date formulaeJack Nagel
Usually, the "foo-version already installed" error is printed by FormulaInstaller. However, if an up-to-date formula that has outdated deps is passed on the command line, we proceed to upgrade the deps and then print a message saying that the formulae given on the command line is already installed. Catch this earlier, when the outdated list is being populated, print an appropriate message, and skip the up-to-date formula. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18upgrade: filter ARGV when expanding depsJack Nagel
This serves the same purpose as similar code in FormulaInstaller, but we duplicate it because we do the dependency expansion in an ad-hoc fashion here. Fixes #11863. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Add ARGV.ignore_deps?Jack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18outdated: use new version comparison machineryJack Nagel