574 Commits

Author SHA1 Message Date
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
Jack Nagel
a6bf5fa2ba Read from the error pipe in a separate thread
If the build process tries to write more bytes than will fit in the pipe
buffer, it will block until the parent process does a read. However, the
parent process will only do a read after the child process has exited or
died, leading to a deadlock. Fix this by doing the read in a separate
thread.
2014-08-08 17:31:13 -05:00
Jack Nagel
142beddd7a Use polymorphism to simplify stdlib compatibility check 2014-08-02 19:29:59 -05:00
Jack Nagel
f4ae1c9e1b Hide the options data structure better 2014-07-31 19:59:09 -05:00
Jack Nagel
9b6f83bdfa Use the library path constant to get the library path 2014-07-29 16:59:02 -05:00
Jack Nagel
3f12ddbccd Decouple DATA patches from the executing script 2014-07-29 16:22:06 -05:00
Jack Nagel
cd02d3d540 Stop rescuing Exception when making opt link 2014-07-24 19:39:09 -05:00
Jack Nagel
07bf57b8ea Push keg_only special-case into link 2014-07-24 19:39:09 -05:00
Jack Nagel
f1fc0b788f Pass the keg object into link and fix_install_names 2014-07-24 19:39:09 -05:00
Jack Nagel
d99379bc63 Hide the downloader implementation from the installer 2014-07-22 19:14:30 -05:00
Mike McQuaid
2404de68d4 formula_installer: bottle against Homebrew Python. 2014-07-09 16:50:23 -07:00
Jack Nagel
a3958c6d8b Use formula opt shortcuts 2014-06-30 20:31:14 -05:00
Jack Nagel
982a165e52 Use the keg object to manipulate the linked keg record 2014-06-27 16:20:17 -05:00
Jack Nagel
2de2d64907 Give more detailed information about link errors at install-time 2014-06-27 16:10:42 -05:00
Jack Nagel
3e35aacbbb Remove dead code 2014-06-26 17:20:00 -05:00
Jack Nagel
4d9d01893e Move deprecated Formula class methods to compat
These have all been moved to Formulary.
2014-06-22 15:03:17 -05:00
Jack Nagel
445dd80e44 Remove ARGV.filter_for_dependencies 2014-06-20 21:32:36 -05:00
Jack Nagel
10fda9e9b9 Decouple spec selection from ARGV 2014-06-20 21:32:36 -05:00
Mike McQuaid
9ccf965553 Revert "formula_installer: bottle against Homebrew Python."
This reverts commit dc53c331ebb3bf752655a6e2147ea90c38a22e2f.

Closes Homebrew/homebrew#30302.
Closes Homebrew/homebrew#30305.
2014-06-20 19:49:32 +01:00
Mike McQuaid
aa51c2f1d3 formula_installer: bottle against Homebrew Python.
When Python is required or recommended then always bottle against the
Homebrew provided Python rather than the system one. This will allow
bottling of packages that have a hard dependency on Python bindings
(which can’t be shared between system and Homebrew Pythons).

Closes Homebrew/homebrew#27112.
2014-06-20 13:03:00 +01:00
Jack Nagel
9b4bb3d9e4 Fix retry condition when auto-tapping deps
Fixes Homebrew/homebrew#30212.
2014-06-17 00:06:10 -05:00
Jack Nagel
c6d75bfcec Move head-only checks to cmd/install
Fixes Homebrew/homebrew#30084.
Closes Homebrew/homebrew#30203.
2014-06-16 18:39:59 -05:00
Jack Nagel
a023f10310 Use Pathname.glob when we want pathname objects 2014-05-31 23:53:51 -05:00
Jack Nagel
25e6c6f120 Don't try to lock the same formula more than once
Fixes Homebrew/homebrew#28765.
2014-05-20 22:50:21 -05:00
Jack Nagel
070bdc59b9 Explicitly pass key-value options to the build process
Fixes Homebrew/homebrew#28695.
2014-04-26 19:10:21 -05:00
Jack Nagel
4b4fc003df Adjust installer for updated link error handling 2014-04-21 12:43:06 -05:00
Mike McQuaid
e2fbfc8390 Add hooks for pouring bottles.
This should give us a bit of control over what e.g. Boxen are doing
whilst at the same time stopping us from accidentally breaking each
other's stuff every so often.

I'm aware this may be somewhat controversial so I'm open to other
approaches.
2014-04-10 15:25:30 +01:00
Jack Nagel
9b24903875 Guard against nil in inherited_options hash
Fixes Homebrew/homebrew#28188.
2014-04-05 20:02:07 -05: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
a44f725c8b Ignore interrupts while cleaning up 2014-04-05 10:48:54 -05:00
Jack Nagel
309171e4f4 Automatically reinstall up-to-date dependencies that are missing options
Closes Homebrew/homebrew#21223.
2014-04-05 10:48:54 -05:00
Jack Nagel
710db1fb72 Rename outdated_keg to linked_keg 2014-04-05 10:48:54 -05:00
Jack Nagel
e4f41b9b24 Load install receipt before performing any operations on existing kegs 2014-04-05 10:48:54 -05:00
Jack Nagel
1e20d9149b Ensure build deps are installed for deps with inherited options
Fixes Homebrew/homebrew#28144.
2014-04-05 10:44:54 -05:00
Jack Nagel
7c3c67d722 Need to still check formula build state for some reason 2014-04-04 10:31:27 -05:00
Jack Nagel
611f1a1b42 Fix universal option inheritance during upgrades 2014-04-04 10:14:24 -05:00
Mike McQuaid
363f2c116c formula_installer: check pour from requirements. 2014-04-03 19:47:15 +01:00
Jack Nagel
fcb9c4d5fb Future-proof the build process fork/wait 2014-03-29 10:23:43 -05:00
Jack Nagel
976bf3f60b Tab#write always overwrites, no need to unlink 2014-03-26 16:07:49 -05:00
Jack Nagel
b5e2996365 Failing to install plist shouldn't prevent linking 2014-03-25 23:47:37 -05:00
Jack Nagel
50f394032f Write plists atomically 2014-03-25 23:45:23 -05:00
Jack Nagel
25c7b49eee Don't load the full debugger when readline is the formula being installed
Fixes Homebrew/homebrew#27842.
2014-03-25 01:39:43 -05:00
Jack Nagel
a72061c59a Check existence of target keg instead of hiding exceptions 2014-03-24 11:00:55 -05:00
Jack Nagel
04f887dc18 Always build from source when given --interactive
Closes Homebrew/homebrew#27716.
2014-03-19 22:46:15 -05:00
Jack Nagel
f36e676bc9 Don't ignore dependencies when actually building a dependency
Since the primary FormulaInstaller instance handles the entire
dependency tree, we set ignore_deps to true when instantiated the class
for each dependency in over to avoid repeated work.

However, now that arguments for the build process are whitelisted
instead of blacklisted, we have begun adding "--ignore-dependencies" if
ignore_deps is true.

This isn't quite right when we are installing a dependency. We want to
skip the calculation and installation of *its* dependencies, since the
primary installer takes care of that, but we still want to consider them
in the build process, so that they are available in the build
environment.
2014-03-13 19:25:59 -05:00