574 Commits

Author SHA1 Message Date
Jack Nagel
be5f9545dd Move dependency expansion logic up one level 2013-12-09 14:36:10 -06:00
Jack Nagel
0b9c29a667 Use separate collection for requirement deps 2013-12-09 14:36:10 -06:00
Jack Nagel
961e5a4e13 Run post_install after linking and relocation
Closes Homebrew/homebrew#24962.
2013-12-05 12:48:56 -06:00
Jack Nagel
0daa33668b Run relocation machinery on local bottles
Since we now use placeholders for the prefix and cellar, we need to run
the relocation machinery on all bottles.
2013-12-04 22:37:58 -06:00
Jack Nagel
f2aaa5f0ac Teach installer about prefix and cellar placeholders 2013-12-04 22:37:57 -06:00
Jack Nagel
690474dd3b Extract compute_and_install_dependencies 2013-12-02 12:49:58 -06:00
Jack Nagel
b5f83e60f9 Re-check requirements if a bottle installation fails 2013-12-02 12:49:58 -06:00
Jack Nagel
69dcc2592c Don't mutate deps collection when expanding requirements
Fixes Homebrew/homebrew-science#213.
2013-12-02 12:47:50 -06:00
Jack Nagel
bcfafca56b Always clear unsatisfied_deps after installation 2013-12-02 12:44:28 -06:00
Jack Nagel
24a853ebe5 unsatisfied_deps cannot be nil 2013-12-02 12:44:28 -06:00
Jack Nagel
2b23c163af Rename effective_deps to unsatisfied_deps 2013-12-02 12:44:28 -06:00
Jack Nagel
ae1d00e31f Revert "FormulaInstaller: flush before closing writes."
This reverts commit 5ce8f7a3a494e1d8e812369301fd4c4a05a7d9b7.
2013-11-29 21:05:27 -06:00
Mike McQuaid
3c3bd76528 FormulaInstaller: flush before closing writes.
This seems to help the problem with `brew install -v` sometimes truncating output.

Closes Homebrew/homebrew#24666.
2013-11-26 16:28:27 +00:00
Alexis Hildebrandt
76b69a8eb4 Add HOMEBREW_INSTALL_BADGE environment variable
with which the beer emoji displayed upon successful build
can be changed.

Closes Homebrew/homebrew#23194.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-11-15 07:50:23 -08:00
Todd Persen
8c6c4185b7 Ensure build-time deps are installed when bottle installation fails
Fixes Homebrew/homebrew#22245.
Closes Homebrew/homebrew#24324.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-11-15 09:36:01 -06:00
Adam Vandenberg
fbb7d80a32 grammar 2013-11-14 06:23:05 -08:00
Adam Vandenberg
81bf8a168a audit generic binary names
Binaries with names like 'run' or 'service' are likely to conflict.
Warn about these and suggest a libexec-style install instead.
2013-11-12 07:10:13 -08:00
Mike McQuaid
a28b57d3fb git-etc: remove all code.
I've given up on this; too many edge cases.
If someone else wants to pick it up then send me a message and I'll walk
you through the approach.
2013-10-30 16:15:31 -07:00
Misty De Meo
2775a4b12c Move bottle stdlib tracking post-pour
This allows us to track the actual stdlib in use, and prevents warnings
for bottles with no C++ code.
2013-10-26 21:54:29 -07:00
Misty De Meo
3657393017 Move stdlib tracking postinstall
This moves stdlib tracking after the install completes, which allows
the tracking to have access to the actual stdlib in use.

This unfortunately means that builds can error out *after* a build,
resulting in wasted time; however, it reduces false positives, and the
overall user experience is still likely to be better this way.
2013-10-26 21:54:29 -07:00
Mike McQuaid
3fb38ea69e formula_installer: further fix tab file handling.
Closes Homebrew/homebrew#23477.
2013-10-23 14:02:51 +01:00
Mike McQuaid
71218a29d2 installer: don't try and unlink nil tabfile.
Closes Homebrew/homebrew#23472.
2013-10-23 12:42:20 +01:00
Jack Nagel
c511d7d2f4 Add OS.mac? and OS.linux? 2013-10-18 12:56:51 -05:00
Jack Nagel
ba06e2504c Don't print multiple deps messages when only installing one dep 2013-10-16 15:34:43 -05:00
Mike McQuaid
cf2a8913c5 git_etc: create etc if it doesn't exist. 2013-10-12 10:54:16 +01:00
Misty De Meo
4a9cf0dd14 CxxStdlib: use f.recursive_dependencies in stdlib check 2013-10-10 09:09:53 -07:00
Misty De Meo
9c84b3799a formula_installer: pass effective_deps to CxxStdlib 2013-10-10 08:51:38 -07:00
Mike McQuaid
a6e2245732 git_etc: update based on bottle etc/var changes. 2013-10-10 16:46:47 +01:00
Mike McQuaid
a9764503b2 formula_installer: handle etc/var in bottles.
Copy these files/folders to a .bottle directory under the Cellar for installation
elsewhere at pouring time.

Temporarily disable HOMEBREW_GIT_ETC methods until fixed.
2013-10-10 16:46:47 +01:00
Misty De Meo
8e7fcaab1e formula_installer: change default bottle CxxStdlib 2013-10-07 00:02:46 -07:00
Misty De Meo
74ab023422 Only track C++ stdlibs for C++ code
After a formula is built, scan all mach-o files for dynamic links
to see if any of them point to a C++ stdlib (libc++ or libstdc++).
If one of them is linked, record that information in the formula's tab.

This replaces the old behaviour where all files were assumed to be C++
code, and stdlibs were always tracked regardless of whether they were
actually linked against.

This also modifies the way that tabs are written - now tabs are written
with the stdlib field null, and values are only written if an stdlib
is detected.
2013-10-06 19:26:06 -07:00
Xiyue Deng
592b5d91a0 Fix install_name_tool path for keg_only formulae
* When a versioned keg_only formula installs the same set of executables
  or libraries as a unversioned formula that links to $HOMEBREW_PREFIX,
  install_name_tool will prefer to use the linked paths for files in
  keg_only formula.  This breaks software that should link to the
  keg_only formula but links to the unversioned one instead.
* Add an additional "options" parameter with keg_only field to specify
  the correct install path for keg_only formulae.
2013-10-04 02:03:03 -07:00
Jack Nagel
1fb9f85c5f Simplify setup for local bottle installation
Closes Homebrew/homebrew#22833.
2013-09-26 10:04:45 -05:00
Mike McQuaid
a7e1dbae63 Bottles: use options hash for install_bottle? 2013-09-18 12:36:43 +01:00
Mike McQuaid
1390d5cc12 formula_installer: don't duplicate bottle warning.
Closes Homebrew/homebrew#22569.
2013-09-18 12:26:32 +01:00
Mike McQuaid
3a0204dd0b git-etc: add removed files too. 2013-09-09 16:15:33 +01:00
Jack Nagel
20ed26c655 Close read pipe immediately after reading and only when initialized
c.f. Homebrew/homebrew#22386.
2013-09-07 22:20:26 -05:00
Jack Nagel
4489a8684f Rewrite conditions in more natural way 2013-09-07 11:09:32 -05:00
Mike McQuaid
ab20ed0bc2 Optionally use git to keep brew etc versioned.
Still in alpha state.
Handles defaults and merging changes with new versions.
Enable by setting the HOMEBREW_GIT_ETC environment variable.

Closes Homebrew/homebrew#15751.
Closes Homebrew/homebrew#17713.
2013-09-07 13:39:43 +01:00
Jack Nagel
77b5805fda Close the read end of the error pipe after the build 2013-09-06 22:49:31 -05:00
Misty De Meo
7c3d6ea81c Check dependencies for a compatible C++ stdlib
There are now a few possible C++ standard libraries a given build could
be using, with subtle incompatibilities and possibility of breakage
when mixed. This makes sure that the dependency chain was compiled in
a compatible manner.

Fortunately all of the Apple compilers use the same libstdc++, and we
don't yet support building with libc++, so this will primarily only
nag users trying to use GNU gcc who already have software installed
with Apple compilers.

Future TODOs:

* Add general support for building with libc++ (compatibility checking
  already handled here)
* Possibly track formulae which actually build C++ bindings, so that
  users aren't bothered by spurious nagging re: interpreted languages,
  pure-C software, etc.
2013-09-01 13:19:13 -07:00
Misty De Meo
3ac74331a8 Move Tab creation into build process
The parent process doesn't have access to the selected compiler, which
will be important in the next commit.

Fortunately the child process already has a filtered and massaged
ARGV, so it has enough information to build the tab itself.
2013-09-01 13:19:13 -07:00
Mike McQuaid
f870d605fa formula_installer: handle post_install exceptions.
Warn users and point them to `brew postinstall` (which can provide a
backtrace).

Closes Homebrew/homebrew#21887.
2013-09-01 13:57:40 +01:00
kaizoku
dbce25783c Show list of dependencies prior to installing them
Closes Homebrew/homebrew#22205.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-08-30 14:14:47 -07:00
Misty De Meo
1900b70bd6 Check for valid --bottle-arch= when building 2013-08-28 20:21:06 -07:00
Jack Nagel
613546a994 Fix expansion of deps with --build-bottle 2013-07-26 15:05:42 -05:00
Jack Nagel
fcfc53df33 Check deps of satisfied deps 2013-07-22 21:36:11 -05:00
Mike McQuaid
897607b3d7 audit: use FormulaCellarChecks module.
Perform post-installation checks if a formula is installed.
Added for brew test-bot to be able to fail on bad Cellar installation.
2013-07-16 13:29:37 -07:00
Mike McQuaid
91c5c15a48 FormulaInstaller: move Cellar checks to module. 2013-07-16 13:29:37 -07:00
Mike McQuaid
a3ea2b566b FormulaInstaller: cleanup check_/audit_ functions. 2013-07-16 13:29:37 -07:00