131 Commits

Author SHA1 Message Date
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
Xu Cheng
e8f888a23e install: use Formula#full_name 2015-05-29 17:02:22 +08:00
Xu Cheng
b136a0acdf install: refactoring blacklist check
Closes Homebrew/homebrew#37590.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-03-11 17:27:49 +08:00
Mike McQuaid
03d3f9d292 cmd/install: add force/debug/verbose to cask.
Closes Homebrew/homebrew#37217.
2015-03-05 15:36:40 +00:00
Jack Nagel
c6dee041eb install: fix --HEAD for formulae with head and devel but no stable 2015-01-16 00:00:21 -05:00
Dominyk Tiller
3f318b8ed4 install: handle devel-only correctly
See the discussion in
https://github.com/Homebrew/homebrew-devel-only/pull/6

Closes Homebrew/homebrew#35793.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2015-01-15 23:50:45 -05:00
Dominyk Tiller
e871a91958 install: fail on devel where devel doesn't exist
Just equalises a little how we treat HEAD and devel. The former already
fails if there isn’t a head defined, It seemed logical that devel
should fail in the same way.

Closes Homebrew/homebrew#35554.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2015-01-05 00:04:23 -05:00
Jack Nagel
dbfbe76ac1 Fix warning 2014-12-26 15:39:34 -05:00
Mike McQuaid
52cda8fd80 Allow searching/installing Homebrew Casks.
People want to install things like GIMP using Homebrew so let's make it
easier for them to find a decent installation method.

Closes Homebrew/homebrew#34496.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-11-30 17:59:02 +00:00
Jack Nagel
e1bfbad810 Make quieter an installer mode 2014-11-03 21:43:11 -06:00
Jack Nagel
3421308bd4 Make git an installer mode 2014-11-03 21:39:11 -06:00
Jack Nagel
3c9cc18c17 Add ARGV.git? 2014-11-03 21:39:11 -06:00
Jack Nagel
a01a3bd594 Check for MacPorts/Fink installation only after build failures 2014-10-31 20:54:09 -05:00
Jack Nagel
d8abdfa56d Revert "run macports check after failed build instead of before every build"
CannotInstallFormulaError is only raised when another version of the
formula is linked or any of its dependencies are unlinked, in which case
this warning is totally irrelevant. It should be checked after build
errors instead.

This reverts commit 466d0f718bc2241e830393b384294c21194995e0.
2014-10-31 20:54:09 -05:00
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
Jim Witschey
a56ddb9eda cmd/install: fallback to searching formula names.
Closes Homebrew/homebrew#33648.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-10-28 11:16:24 +00:00
Mike McQuaid
356e75487e Point to a tap when installing or fetching.
When installing or fetching and stuff goes wrong we can't always catch
the error and redirect to the tap. Instead, point to the tap before we
do anything failure-prone and hopefully that'll encourage people to
file issues in the right place. If not we can say that explicitly.

Closes Homebrew/homebrew#33220.
2014-10-21 23:04:55 +01:00
Jack Nagel
8c6efd8993 Drop pointless use of CannotInstallFormulaError
These are not caught anywhere, just raise the string. Missed in
1b3b61ff08a4ee5979838f7dbc171e9b38e83f7c.
2014-10-20 03:15:12 -05:00
Jack Nagel
f3b7c3236b Consistently call name on formula instead of relying on to_s 2014-09-14 11:19:30 -05:00
Jack Nagel
7bfb12aa45 Install dependencies before an interactive install
Closes Homebrew/homebrew#29121.
2014-08-30 15:02:47 -05:00
Mike McQuaid
4db0aa19c1 install: search when formula isn't found.
If you do `brew install blah` it currently doesn't search for it. This
seems to be unintentional looking at this code as the exception thrown
by ARGV.formulae.each is not caught and handled. Instead, let's handle
this case and provide a little more usability around our taps.

Closes Homebrew/homebrew#31761.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-08-25 09:24:30 +01:00