368 Commits

Author SHA1 Message Date
Jack Nagel
77a1c6f166 One less external call to #active_spec 2014-12-27 14:26:56 -05:00
Jack Nagel
dd90030213 Fix "possible reference to past scope" warnings on 2.2 2014-12-26 11:58:09 -05:00
Mike McQuaid
85f9883329 formula_installer: don't always post_install.
We don't want to do so when building bottles or we can end up with some weird stuff being bottled unintentionally (and it'll run twice; once before bottling, once afterwards).

Fixes Homebrew/homebrew#34349.

Closes Homebrew/homebrew#34397.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-11-23 21:24:00 +00:00
aereal
91ccd8435c Regard any installation of the formula as conflicts
Closes Homebrew/homebrew#34159.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-11-17 13:30:54 -06:00
Jack Nagel
5d1dc0a5db Revert "Revert "FormulaInstaller: make mode reader methods private""
This reverts commit c622f27e525de4a9cc9a209a6cc0e26be60b5919.
2014-11-03 21:43:11 -06: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
34c0b40abf Revert "FormulaInstaller: make mode reader methods private"
This reverts commit 44bff238434a48c4a8531bc2d1a29c81f18f8fab.

Conflicts:
	Library/Homebrew/formula_installer.rb

Fixes Homebrew/homebrew#33882.
2014-11-03 18:58:49 -06:00
Jack Nagel
bebfcfe2fd FormulaInstaller: make mode predicate methods private 2014-11-02 19:11:46 -06:00
Jack Nagel
4b2347ef60 FormulaInstaller: make mode reader methods private 2014-11-02 19:11:18 -06: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
Jack Nagel
1a487fa2b3 Add predicate methods for specs and stop testing internals 2014-10-29 23:32:38 -05:00
Jack Nagel
1195718d0e Rename "f" to "formula" in the installer 2014-10-29 22:41:03 -05:00
Jack Nagel
6545e6dad3 Remove unreachable branch
Requirements meeting this condition are skipped by the first branch
on the caller side:

6c54de812f/Library/Homebrew/formula_installer.rb
2014-10-29 00:52:23 -05:00
Jack Nagel
f90e303fb9 Test default formula requirements against correct dependent 2014-10-29 00:37:51 -05:00
Jack Nagel
27f2aa5f2c Reduce explicit branches in dependency expansion 2014-10-29 00:36:25 -05:00
Mike McQuaid
92e68049d1 formula_installer: set exit code to failed always.
If we say something failed we should communicate that through the exit
code for the bot and scripts.
2014-10-27 13:16:18 +00:00
Mike McQuaid
7b08f898a7 formula_installer: tweak argument migration warn.
Make it clear that we've done the right thing and this message is just
for informational purposes.
2014-10-19 14:09:47 +01:00
Mike McQuaid
fdc75115bd formula_installer: warn on deprecated options. 2014-10-19 13:58:52 +01:00
Jack Nagel
41cc28ca42 Pull conditional out of begin block 2014-10-17 22:41:26 -05:00
Jack Nagel
ca2680d77f Move some code to the pour method 2014-10-17 22:40:03 -05:00
Jack Nagel
b05351d0b2 Reorganize post-install checks so we can share more code 2014-10-13 23:13:01 -05:00
Jack Nagel
634d67690b Remove repeated conditional
The post-install audit methods are not run for keg-only installs, so we
don't need to repeat the conditional here.
2014-10-13 23:13:01 -05:00
Jack Nagel
b46ebf8a29 Simplify post-install audit output 2014-10-13 23:13:00 -05:00
Jack Nagel
c4818394cb Post-install audit for shadowed header files 2014-10-01 23:32:53 -05:00
Jack Nagel
209e7137e3 Rearrange build process cleanup to avoid spawning a reader thread
This is a follow-up to bbf9f7460fc8e6e4c63f5bbe8630b11ca53f3710.

If we read from the pipe before calling Process.wait, we can avoid
spawning a thread to do the read while continuing to avoid the deadlock
that the thread was introduced to solve.
2014-09-28 01:37:10 -05:00
Jack Nagel
3bbc9998a5 Rewrite debugger to remove monkeypatches and use of call/cc 2014-09-18 14:16:07 -05:00
Jack Nagel
72d74053a2 Fix variable shadowing bug in requirement expansion
Long term we should probably rename the installer's "f" attribute to
"formula".
2014-09-16 22:32:18 -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
081036c81c Remove InstallationError superclass
None of these subclasses share any behavior other than what is inherited
from RuntimeError, so we can just get rid of the superclass.
2014-09-14 01:10:20 -05:00
Jack Nagel
f5d18cceb6 Structure the build process so that we don't need an at_exit hook 2014-08-26 22:06:43 -05:00
Jack Nagel
11f880801c Avoid intermediate option objects 2014-08-26 15:48:16 -05:00
Jack Nagel
ccf37d5ac0 Revert "Use the dependency object as the key in the inherited_options hash"
This reverts commit c8d3b39165bb11799d7849ee13a3559ad0bd63f4.
2014-08-24 16:14:16 -05:00
Jack Nagel
1ef2819979 Use the dependency object as the key in the inherited_options hash 2014-08-24 16:11:51 -05:00
Jack Nagel
8aabba670f Consider on-disk state when computing dependencies
Fixes Homebrew/homebrew#28754.
Fixes Homebrew/homebrew#29846.
Fixes Homebrew/homebrew#30920.
2014-08-24 14:46:34 -05:00
Jack Nagel
3d26b75847 Pull common stdlib checking code into a method 2014-08-22 22:18:03 -05:00
Jack Nagel
e6498f4dfc Remove the universal accessor from BuildOptions
BuildOptions is now immutable (finally).
2014-08-16 01:39:33 -05:00
Jack Nagel
edbb219bbd More idiomatic way to combine arrays 2014-08-13 20:54:49 -05:00
Jack Nagel
0d6ceaf86e Simplify build_argv 2014-08-13 18:16:25 -05:00
Jack Nagel
268cd143be Replace Options.coerce with an alternate constructor 2014-08-13 11:09:57 -05:00
Mike McQuaid
a61c3615d2 Revert "Replace Options.coerce with an alternate constructor"
This reverts commit 8d2ef974a3a87bf4207f71ccb8a7b4776e16a016.
2014-08-13 08:45:06 +01:00
Jack Nagel
25395c6de6 Replace Options.coerce with an alternate constructor 2014-08-12 23:55:28 -05:00
Misty De Meo
a43f450544 Clarify keg-only caveats 2014-08-12 17:28:49 -07:00
Jack Nagel
b7b8b88cea Replace the build object rather than mutate it 2014-08-11 17:48:30 -05:00
Mike McQuaid
1455d83dd8 formula_installer: check for recommended/optional.
build.without? seemingly always returns true for requirements that are
neither recommended nor optional so check these before deciding not to
install a default formula.

Closes Homebrew/homebrew#31511.
2014-08-11 20:18:15 +01:00
Mike McQuaid
4790d4cba9 formula_installer: default_formula using build.
Use the build options instead of whether the requirement is optional to
work out if it is needed. This handles the case of an optional
requirement becoming needed because it's a dependency for another
formula.

Closes Homebrew/homebrew#31476.
2014-08-11 15:33:35 +01:00
Jack Nagel
8beb85a7fc options.each only yields one argument to the block 2014-08-10 22:24:56 -05:00
Jack Nagel
2f1d40a764 Disconnect defined options from the build object 2014-08-10 21:45:24 -05:00
Mike McQuaid
064aff2591 Revert "formula_installer: fix reqs default formulae."
This reverts commit 435092ae0521e79d8ea21c8d4708031e3b4b17a3.
2014-08-10 16:41:30 +01:00
Tomasz Pajor
03cf38c451 formula_installer: fix reqs default formulae.
(Commit message written by Mike McQuaid)

With the change in a0a93f1b3b7b2be9b8a319be91086ffe220f8e32
unfortunately requirements with default formulae no longer could be
resolved when the default formulae were not installed. This commit
fixes this problem.

Closes Homebrew/homebrew#31476.
Closes Homebrew/homebrew#31444.
Closes Homebrew/homebrew#30901.
Closes Homebrew/homebrew#31471.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-08-10 15:26:13 +01:00