102 Commits

Author SHA1 Message Date
Markus Reiter
c594ffefbc Add Formatter::pluralize. 2017-03-11 21:12:51 +01:00
Mike McQuaid
f0249643d4 formula_installer: use attr_accessor for installed_* 2017-01-18 16:10:28 +00:00
Mike McQuaid
5424db1263 upgrade: temporarily comment out for fix. 2017-01-18 15:25:17 +00:00
Mike McQuaid
89d8864b6b upgrade: tab installed_{as_dependency,on_request} 2017-01-18 11:23:22 +00: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
Mike McQuaid
f17a55b269 upgrade: tell people that --all is a no-op.
Apparently this is still run by people so let's tell them to save
some typing.
2016-10-01 15:11:52 +01:00
Mike McQuaid
c9d9e54de6 Fix brew style from #971. 2016-09-19 16:04:32 +01:00
Alyssa Ross
2a683f2569 upgrade, outdated: follow alias changes 2016-09-18 19:58:09 +01:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Mike McQuaid
2c5beb0eff cmd/upgrade: fix Rubocop warnings. 2016-09-11 17:59:01 +01:00
Vlad Shablinsky
7fa9c0e977 Update --fetch-HEAD documentation 2016-08-11 09:30:59 +02:00
Uladzislau Shablinski
b8ce1fe1b2 Update upgrade/outdated documentation (#650) 2016-08-06 22:08:35 +08:00
Vlad Shablinsky
9754dbada8
Update upgrade/outdated methods for head versions
Introduce `--fetch-HEAD` option. Without this option upgrade and
outdated never fetch latest upstream commit to detect if HEAD is
outdated -- tabs are used instead. However, if option is passed,
we fetch commit from upstream, which is more time consuming,
but we can be sure that version is up-to-date or outdated.
2016-08-06 21:25:56 +08:00
Xu Cheng
a8566c9848 various: eliminate the usage of any? (#638)
`any?` is not the opposite of `empty?`. Besides the case that
`[false, nil].any?` will return false, `any?`(O(n)) has much worse
performance than `empty?`(O(1)).
2016-08-05 22:01:32 +08:00
Mike McQuaid
164e46a729 Add missing development_tools requires. 2016-07-29 21:21:02 -06: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
Baptiste Fontaine
9bdd6619e2 cleanup: move code away from cmd/
Closes Homebrew/homebrew#47484.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-04 13:17:21 +01:00
Xu Cheng
863c83a0f5 upgrade: use installed_kegs 2015-11-29 20:24:30 +08:00
Mike McQuaid
6054666fa6 formula: refactor outdated handling, add to hash. 2015-11-27 16:52:54 +00:00
Rakesh
2d60187e1a brew upgrade: provides an option --cleanup
Closes Homebrew/homebrew#44305.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-07 14:05:11 +08:00
Misty De Meo
727239e12f Merge bottle install without Xcode branch
Merge branch 'bottle_hooks'
2015-08-21 11:04:22 -07:00
William Woodruff
1face808f5 Add guards to calls that would trigger Xcode install requests
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-21 11:02:33 -07:00
William Woodruff
f58506ea6f FormulaInstaller: add prevent_build_flags to eliminate code repetition
remove unneeded definition

change variable in FormulaInstaller.check_build_flags from bf to build_flags
2015-08-21 10:59:35 -07:00
William Woodruff
91e598cf3f Install: add BuildToolsError and BuildFlagsError
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-21 10:59:09 -07:00
Rafael Kitover
74b18bfe12 put caveats in finish after post_install Homebrew/homebrew#42565
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-09 20:08:42 +08:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Mike McQuaid
f4af833714 Revert "upgrade: announce usage of --all."
This reverts commit 9032f165bec3d0c7452169093fab32578816043b.

This seems to have been universally unpopular so let's revert it.

Closes Homebrew/homebrew#40372.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-06-05 14:20:21 +01:00
Xu Cheng
082ce482fc upgrade: use Formula#full_name 2015-05-29 17:02:23 +08:00
Xu Cheng
e744e8b0f9 upgrade: use ARGV.resolved_formulae 2015-05-27 13:53:42 +08:00
Mike McQuaid
c725059251 upgrade: announce usage of --all.
Tell users that we will soon be migrating `--all` so it is required if
you wish to upgrade all formulae.

Closes Homebrew/homebrew#38572.
2015-04-26 19:40:33 +01:00
Mike McQuaid
28f26e0c9f reinstall, upgrade: tweak use of tab build_bottle.
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-03-24 12:11:40 +00:00
Jack Nagel
4398660cdd Checkout outdatedness in brew upgrade <formula>
Fixes Homebrew/homebrew#35523.
2015-01-04 14:03:56 -05:00
Jack Nagel
9db8580414 Explicitly pass formulae to outdated_brews 2015-01-04 00:41:24 -05:00
Jack Nagel
e1bfbad810 Make quieter an installer mode 2014-11-03 21:43:11 -06:00
Jack Nagel
7266ecd4e3 Hide install receipt key names 2014-10-15 01:30:56 -05:00
Jack Nagel
f3b7c3236b Consistently call name on formula instead of relying on to_s 2014-09-14 11:19:30 -05:00
Larry Shaffer
b6cca78e05 Upgrade honors build_bottle? and built_as_bottle options
Closes Homebrew/homebrew#31628.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-08-17 15:36:24 -05:00
Jack Nagel
10a1952d2c Only "extend self" once on the Homebrew module 2014-06-19 13:10:36 -05:00
Adam Vandenberg
8d44db6b40 pluralize formulae in tap/untap
Closes Homebrew/homebrew#28560.
2014-05-26 18:33:31 -07: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
a72061c59a Check existence of target keg instead of hiding exceptions 2014-03-24 11:00:55 -05:00
Jack Nagel
3b68723fa8 Make FormulaInstaller setup more readable 2014-03-13 15:59:54 -05:00
Jack Nagel
ce5e2aa65c Make debug an installer mode 2014-03-13 15:59:54 -05:00
Jack Nagel
4d02849d43 Make verbose an installer mode 2014-03-13 15:59:54 -05:00
Jack Nagel
60caf14ce2 Don't set installer options to their default
ignore_deps and show_header default to false.
2014-03-13 15:59:53 -05:00