4075 Commits

Author SHA1 Message Date
Misty De Meo
15a3ae3d28 Fix CompilerSelector test for llvm
Update test to reflect that llvm-gcc should take precedence over
non-Apple GCC.
2013-09-10 13:08:03 -07:00
Misty De Meo
55004d81b6 Compiler priority: fix llvm-gcc priority
llvm-gcc should still get priority over non-Apple GCCs.

Fixes Homebrew/homebrew#22424.
2013-09-10 08:17:28 -07:00
Philip Puryear
42faf1a860 linkapps: overwrite broken app symlinks
Closes Homebrew/homebrew#22388.
Closes Homebrew/homebrew#22430.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-09-10 07:25:15 -07:00
Greg Sieranski
0b958ed607 Add audit to zsh tab completion
Closes Homebrew/homebrew#22339.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-09-09 22:16:52 -07: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
Mike McQuaid
4eb31ac676 audit: print warning and description. 2013-09-07 17:38:15 +01:00
Jack Nagel
4489a8684f Rewrite conditions in more natural way 2013-09-07 11:09:32 -05:00
Jack Nagel
771a28427c Use block-form of File.open and let Ruby do the cleanup 2013-09-07 10:22:58 -05:00
Jack Nagel
8b2a8d0595 ARGV.verbose? is always false here 2013-09-07 10:22:11 -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
Mike McQuaid
3e7da6b16e brew-test-bot: run brew uses. 2013-09-07 12:05:42 +01:00
Jack Nagel
a1f165c02d Fix file descriptor leak in Formula#system 2013-09-06 23:17:50 -05:00
Jack Nagel
77b5805fda Close the read end of the error pipe after the build 2013-09-06 22:49:31 -05:00
Xiyue Deng
45d5471a43 Enable verbose compile command in create template.
* Add "--disable-silent-rules" option to autotools-based configure
  options.
  - Also add comments to notify user removing unrecognized configure
    options.
* Add "-DCMAKE_VERBOSE_MAKEFILE=ON" to cmake-based configure options.
2013-09-06 17:59:58 -07:00
Jack Nagel
6d7cda77e9 ENV: remove trailing slash from OpenGL header path 2013-09-06 12:38:56 -05:00
Jack Nagel
a871baadf5 Fix breakage in option recognition
Fixes Homebrew/homebrew#22347.
2013-09-05 18:51:27 -05:00
Xiyue Deng
896173a999 Revert Library/Homebrew/cmd/install.rb to 4b320eec.
* Fix problem when install exception got swallow and reinstall thinks it
  succeeded.
2013-09-05 12:24:21 -07:00
Max Howell
fad1df9359 Suggest installing pip via easy_install 2013-09-05 12:03:54 -05:00
Samuel John
59a0c1e1b5 Improve python tests for brew bots
Allow `build.with?` and similar methods to be used during the test
phase. The BuildOptions (`build`) are initialized with the
`Tab.used_options` unless explicitly overwritten on the command line.

So basically `build.with?` works in `def install` and in `test do` as
one would naively expect. (For the test, gramatically it should be
`built.with?` but who cares)

If a formula was installed `--with-python`, now the tests are also
run `--with-python`. This enables us to use the `python do ... end` in
a meaningful manner.

Using `python do ... end` blocks for the tests, because the bot.brew.sh has
system python per default and we need to set the PYTHONPATH for the test.
Potentially to different values for Python 2.x and 3.x.
2013-09-05 15:26:57 +02:00
Samuel John
6ae2e872d3 reinstall cleanup 2013-09-05 14:59:33 +02:00
Xiyue Deng
8aae1dac7b Make reinstall transaction safe.
* Aborting during reinstall will now restore the originally installed
  keg.
  - Change install code to pass on CannotInstallFormulaError exception
    to caller so it can be reused in reinstall.
* Add "--force-new-install" flag to force installing a new formula.

Closes Homebrew/homebrew#22190.

Signed-off-by: Samuel John <github@SamuelJohn.de>
2013-09-05 14:02:29 +02:00
Stefan
b542b27d8f gist-logs cmd
Closes Homebrew/homebrew#21557.

Signed-off-by: Samuel John <github@SamuelJohn.de>
2013-09-03 17:59:31 +02:00
Jack Nagel
7e079fc37d ENV: convert values to strings in cc setters 2013-09-03 10:07:53 -05:00
Jack Nagel
ce48366ab1 ENV: use cc accessor 2013-09-03 10:06:55 -05:00
Samuel John
576f08a8eb pil: is now blacklisted.
PIL has been removed and users should use pillow either
by `pip install pillo` or `brew install samueljohn/python/pillow`.
2013-09-03 13:14:54 +02:00
Samuel John
9b755e5ad2 brew search <user>/<repo> [substring]
For example `brew search homebrew/science` to get a list of all formulae
from that tap, even if not yet tapped.

`brew search <user>/<repo>/<substr>` or
`brew search <user>/<repo> <substr>` to grep for `<substr>`
inside of the tap `<user>/<repo>`.
2013-09-03 11:52:34 +02:00
Samuel John
a260bb1906 doctor: be more helpful with suggestion about PATH
- Show a one liner that will append to
  the user's ~/.bash_profile. In 95% this will be
  ok and we assume zsh people are smart enough
  to know what they have to do.
2013-09-03 11:44:48 +02:00
Samuel John
5515fda59a PythonInstalled: Allow formulae to set/append PYTHONPATH
Improve robustness of `PYTHONPATH` by first unsetting it (during
`satisfy`) so that the `PythonInstalled` can get the `python.version`
and so forth and then, after that, setting the `PYTHONPATH` to our
`global_site_packages`.
In the `python_helper` we append to the `PYTHONPATH` so if that var has
been set in a formula, it is respected.
Brew audit does no longer complain about setting the
`ENV['PYTHONPATH']`.
2013-09-03 10:46:06 +02:00
Samuel John
dbaac79f17 PythonInstalled: Adding a private_site_packages
that live in the `libexec` dir of a `Cellar`.
2013-09-03 10:41:54 +02:00
Samuel John
0d75de42bb python_helper: Comment wording 2013-09-03 10:36:58 +02:00
Misty De Meo
922a4f1b77 Formula: record full path to non-core formula
If a formula is passed with a relative path, the build process might
try to expand it in the wrong directory, where it doesn't exist.

Fixes Homebrew/homebrew#22266.
2013-09-02 10:01:36 -07:00
Misty De Meo
e92fa147b3 Remove attr_rw for CompilerFailure version attribute
This reverts commit 7db9ef9650a44ef8155bf66efd88703e580057b0.
2013-09-01 22:37:03 -07:00
Misty De Meo
ca3ed1e5ff CompilerFailure: specify attr_rw for version 2013-09-01 21:26:30 -07:00
Misty De Meo
96b50e013e Remove HOMEBREW_CC warning from ENV.compiler
ENV.compiler is called outside setting up the build environment, where
values unsupported for user input might have been specified - for
example, GNU GCC executables.
2013-09-01 14:42:37 -07:00
Misty De Meo
0e06e9e4b9 Document --cc= for non-Apple compilers 2013-09-01 13:23:40 -07: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
b71682bdc7 Tab: track C++ stdlib in use
There are subtle incompatibilities between Apple's libstdc++ and the
libstdc++ used by the various GNU GCC formulae. In addition, we'll
likely also be supporting libc++ in the future, and that's also
incompatible with the other stdlibs.

Tracking it in the tab lets us make sure that dependencies are all
built against the same stdlib to avoid subtle breakage.
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
Misty De Meo
ef1d9c0cd0 Implement fails_with for non-Apple compilers
This adds support for non-Apple GCC compilers in the fails_with code.
A fails_with block for a non-Apple compiler looks like:

fails_with :gcc => '4.8.1' do
  cause 'Foo'
end

Non-Apple compilers don't have build numbers, so compiler failures are
based on version strings instead.

Internally non-Apple compilers can be distinguished because they are
passed around as strings instead of symbols.

In addition, this alters the priority list for compilers, with the
following changes:

* Apple GCC 4.2 and LLVM-GCC swap positions, with GCC now taking
  priority. (Maybe LLVM-GCC should just go away.)
* Non-Apple GCC compilers are ranked below GCC 4.2 but above LLVM-GCC
  and Apple GCC 4.0.
2013-09-01 13:19:13 -07:00
Misty De Meo
71268b7f16 Provide reusable GNU GCC constants in ENV 2013-09-01 13:19:13 -07:00
Misty De Meo
11f8b2f49c Experimental support for non-Apple GCCs 2013-09-01 13:19:12 -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
Mike McQuaid
626b56f9f6 brew-postinstall: add new command.
Runs post-install jobs in case they failed or need rerun for any reason.
2013-09-01 13:57:40 +01:00
Mike McQuaid
0c5d928cad brew-reinstall: don't list --force in args. 2013-09-01 13:57:40 +01:00
Mike McQuaid
22da8eb633 brew-reinstall: don't try and rebuild bottles. 2013-09-01 13:57:40 +01:00
Mike McQuaid
98eac4226b Allow forcing bottle installation. 2013-09-01 12:59:01 +01:00
Jack Nagel
dd94518a40 Add test for option description rules 2013-08-31 20:40:06 -05:00
Jack Nagel
0c75f2d280 Push dependency option generation into BuildOptions 2013-08-31 16:16:54 -05:00
Jack Nagel
6ed24d3877 Add test for dependency options 2013-08-31 16:09:49 -05:00