201 Commits

Author SHA1 Message Date
Markus Reiter
a5b11a6a5c Fix Style/GuardClause. 2016-09-23 15:30:07 +02:00
Mike McQuaid
c45119de75 Merge pull request #971 from penman/follow_alias
Make `brew upgrade` and `brew outdated` follow alias changes
2016-09-19 15:22:24 +01:00
Alyssa Ross
c874b4e4c2 install: don't install alias if already installed 2016-09-18 19:58:11 +01:00
Mike McQuaid
3f9cce0a03 Use new "macOS" naming where appropriate.
Not quite a mass replacement as I've used OS X and Mac OS X where
describing specific older versions and added compatibility methods
for things in the DSL.
2016-09-18 19:57:19 +01:00
Mike McQuaid
5d761f651a cmd/install: fix Rubocop warnings. 2016-09-11 17:58:59 +01:00
Mike McQuaid
f1cc1265af Refactor MacOS check_development_tools usage.
Better use the abstraction layer so e.g. Linux could have similarly
fatal checks for these things.
2016-09-07 09:11:06 +01:00
Dominyk Tiller
921aa01576
install: die if Xcode/CLT not up-to-date on prereleases 2016-08-30 05:10:59 +01:00
Misty De Meo
fdf55e77e1 Improve formula not found handling (#96) 2016-08-10 10:37:35 +01: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
Mike McQuaid
2c792076dc cmd/install: port to generic OS. (#458) 2016-07-08 20:52:07 +01:00
Mike McQuaid
3a127e405e development_tools: add installed? method. (#455) 2016-07-06 11:07:24 +01:00
Mike McQuaid
59074e91d6 diagnostic: more porting to generic OS. (#449) 2016-07-04 18:35:03 +01:00
Mike McQuaid
468ebc5ed5 install: undocument --force-bottle. (#443)
This is a developer-only option I created for testing purposes. It
should not be used by end-users.
2016-07-04 14:03:03 +01:00
Vlad Shablinsky
da06e813c2
cmd/install: use migration_needed?
Closes #411.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-06-29 21:04:28 +08:00
Zhiming Wang
bc1d5ae4d4 install: fix documentation of --keep-tmp option (#258)
Obvious copy/paste failure in acc9a7ca8554bc2413dee2d6d0f407b3a59c628c.
2016-05-19 08:43:42 +02:00
Jam
a558629654 gist-logs: add proper documentation, improve error handling (#217) 2016-05-09 04:39:22 +02:00
Andrew Janke
d887dd39ec brew install: make -s apply only to given formula, not deps (#205) 2016-05-06 12:02:13 -07:00
Andrew Janke
acc9a7ca85 brew test, install, update-test: add --keep-tmp option
Also enables sandbox for --interactive and --debug use of install
and test, using automatic retention.

Closes #66.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-18 12:23:08 -04:00
Martin Afanasjew
94a627d7aa install: handle FormulaClassUnavailableError
Don't search for alternatives if formula was found, but has issues, as
this will create confusing output, particularly for contributors working
on a formula file.
2016-04-17 21:16:01 +02:00
Max Nordlund
fa1fd70a37 Add all the top level comments 2016-04-10 22:59:25 +02:00
Xu Cheng
28f3dae8cd rename CoreFormulaRepository to CoreTap
Core tap will be separated from core code in the near future.
It makes sense to rename it to CoreTap.
2016-03-07 19:43:46 +08:00
Baptiste Fontaine
9f1442db14 doctor: move code away from cmd/
Closes Homebrew/homebrew#47665.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-05 14:33:06 +01:00
Xu Cheng
0f84b976ba move CoreFormulaRepository into separate file
For users whose local brew is at around 2015-06-11 to 2015-08-06,
running `brew update` will emit following error:

  Error: uninitialized constant Formulary::CoreFormulaRepository

This is caused by the same bug described in Homebrew/homebrew#42553.

This commit workarounds this issue and restores `brew update` compatibility
for users mentioned above.

Also cleanup legacy `require "cmd/tap"`.
2015-12-19 22:05:30 +08:00
Josh Hagins
d5de719c2b Do not brew install brew-cask
Refs caskroom/homebrew-cask#15381

Closes Homebrew/homebrew#46845.
2015-12-10 09:32:53 +00:00
Xu Cheng
6e92609cf4 Formulary: use same logic to handle core fully-qualified name 2015-12-09 16:56:59 +08:00
Xu Cheng
48950f2cc0 centralize the logic of handling homebrew- in Tap.fetch
Closes Homebrew/homebrew#46537.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-12-03 13:46:59 +08:00
Alex Dunn
95bbd8ef02 cmd/install: check before tapping
Changes introduced in dfdc570abcd7c19a7b385c2fe8c6b26b12bca646 were
causing installations using fully-qualified formula names to fail.
2015-11-09 07:25:26 -08:00
Xu Cheng
82689d81f7 use Tap#install 2015-11-09 15:34:20 +08:00
Eric Andrew Lewis
5ec396ed38 install: make search output more intuitive.
Closes Homebrew/homebrew#42222.
Closes Homebrew/homebrew#44892.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-19 10:16:40 +01:00
Xu Cheng
1ae44d4429 use directory? to check rack existence 2015-10-09 19:06:08 +08:00
Vlad Shablinsky
b68562d941 install: fix if isn't migrated 2015-08-27 13:51:04 +01: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
56795ec1ed Call check_xcode check for CLT, too 2015-08-21 11:02:33 -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
William Woodruff
85187bf6d3 MacOS: update locate_cctool
This becomes MacOS.{install_name_tool,otool}, only do check_xcode if
xcode is installed, otherwise emit a warning
2015-08-21 10:58:13 -07:00
William Woodruff
b46d5de492 Requirements: add CctoolsRequirement
Install it as a dependency unless already satisfied by Xcode.

require cctools_requirement

cctools_requirement should be satisfied by cctools present in opt

add build_env => false to the satify block options in CctoolsRequirement
2015-08-21 10:57:20 -07:00
William Woodruff
4d65b817ec Install: remove check_for_bad_install_name_tool
Until it can be adapted to not call otool on systems w/o XCode/CLT
2015-08-21 10:56:46 -07:00
Xu Cheng
c518e50320 install: f.oldname can be nil 2015-08-15 15:56:57 +08:00
Mike McQuaid
02d8bfe10b install: mention if installed formula isn't migrated.
Closes Homebrew/homebrew#42940.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-14 15:18:45 +01: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
CNA-Bld
68a5b1fe46 add fully qualified name for core formulae 2015-08-06 22:28:44 +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
Alex Dunn
c7e986d65e use ohai headers at the top of search results
Closes Homebrew/homebrew#41832.
2015-07-17 18:33:34 -07:00
Mike McQuaid
7d0d232fb6 cmd/install: fix install warning timeout. 2015-07-11 21:16:00 +01:00
Mike McQuaid
83ab5f90bf install: cleanup outdated repository warning. 2015-07-11 14:36:06 +01:00
Alex Dunn
ac6ee12994 cmd/install: check time of last update if FormulaUnavailableError
Closes Homebrew/homebrew#40035.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-07-11 14:36:05 +01:00
Jack Nagel
72cb403a56 Move 10.11 warning to doctor, pre-install, and post-failure
Fixes Homebrew/homebrew#40778.
2015-06-16 20:02:10 -04:00