954 Commits

Author SHA1 Message Date
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
Adam Vandenberg
5437a480eb install plist before linking
If linking fails,  won't try to re-install the plist.

Closes Homebrew/homebrew#20843.
2013-06-30 11:16:53 -07:00
Adam Vandenberg
6d41707b2b Make non-exes in bin fatal to brew-bot
Closes Homebrew/homebrew#10817.
2013-06-28 08:57:49 -07:00
Adam Vandenberg
1cd3149677 Be explicit about passing formulae names or instances to Tab 2013-06-26 19:58:08 -07:00
Jack Nagel
915977889c Note which formula's requirements failed
Closes Homebrew/homebrew#20713.
2013-06-25 10:37:34 -05:00
Adam Vandenberg
4c26224a24 Misplaced manpages fail brewbot
Closes Homebrew/homebrew#20711.
2013-06-24 07:34:45 -07:00
Adam Vandenberg
1aabba7b9e Show conflicting files on install if linking fails
Closes Homebrew/homebrew#18303.
Closes Homebrew/homebrew#20726.
2013-06-24 07:31:44 -07:00
Adam Vandenberg
8777901cf0 Use unicode escape
Prevents this character from being changed when resaving this file
with TextMate (1) on Snow Leopard.

Closes Homebrew/homebrew#20715.
2013-06-23 16:43:32 -07:00
Adam Vandenberg
f85863cbd0 Clean the cleaner
* Fix a comment; we pass in formulae not names
* Don't pass the formula to factory; this is just a pass-through
* Move require to top-level
2013-06-23 12:54:28 -07:00
Jack Nagel
28b9790dbd FormulaInstaller: ensure locks are always released 2013-06-11 15:35:30 -05:00
Jack Nagel
8b9a3a560f Separate formula conflicts from requirements
Closes Homebrew/homebrew#20357.
2013-06-09 13:45:25 -05:00
Jack Nagel
f848a08344 FormulaInstaller: factor out readline workaround 2013-06-08 15:14:23 -05:00
Mike McQuaid
95f9c6227a Use new download strategy for local bottles.
Fixes installation of e.g. ScriptFileFormula/denominator bottles.
2013-06-08 16:41:23 +01:00
Mike McQuaid
ff65923531 Raise bottle exceptions for Homebrew developers. 2013-06-08 16:40:40 +01:00
Jack Nagel
b87bf885c4 FormulaInstaller: fix "optional build-time dep" edge case
An "optional build-time dep" is unlikely, but possible, and I happen to
notice this wasn't handled correctly while digging around in the deps
code over the last few days.
2013-06-03 22:55:28 -05:00
Jack Nagel
0b4316fbd4 FormulaInstaller: split up big method 2013-06-03 22:50:11 -05:00
Jack Nagel
873d9766ae Allow explicit conversion of requirements to deps
Fixes Homebrew/homebrew#19857.
2013-06-03 16:52:00 -05:00
Jack Nagel
daef74aa27 Adjust semantics of Formula#fetch
It doesn't really make logical sense that this method returns both the
fetched path (or sometimes nil!) and the downloader, so just return the
path (again, or nil!) and callers that want the downloader can ask for
it separately.
2013-05-16 14:06:26 -05:00
Jack Nagel
136aa4c6f4 Remove last use of deprecated Formula#recursive_deps
Fixes Homebrew/homebrew#19107.
2013-04-10 11:55:02 -05:00
Jack Nagel
05a8c1913c FormulaInstaller: this local is an ivar now 2013-04-05 22:07:02 -05:00
Jack Nagel
6eac9679c0 FormulaInstaller: initialize @tab 2013-04-05 22:00:36 -05:00