Commit Graph
3331 Commits
Author SHA1 Message Date
Adam Vandenberg 91f22b7552 Allow resource fetching
Closes #20047.
2013-09-11 22:05:27 -07:00
Adam Vandenberg b37bbbfc31 Implement Resources
Closes #20212.
2013-09-11 22:05:26 -07:00
Mike McQuaid ba057f6b9a bottle: loosen prefix grep check.
/usr/local is in lots of things unrelated to Homebrew so be more specific and look for opt instead.
2013-09-10 21:56:39 +01:00
Jack Nagel 95020adf9d update: restore previous state when interrupted
Fixes #19460.
Closes #22375.
2013-09-10 15:12:39 -05:00
Misty De Meo 3483d68578 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 5863f8af89 Compiler priority: fix llvm-gcc priority
llvm-gcc should still get priority over non-Apple GCCs.

Fixes #22424.
2013-09-10 08:17:28 -07:00
Mike McQuaid a04b3a9c62 git-etc: add removed files too. 2013-09-09 16:15:33 +01:00
Jack Nagel 6fd425b45c Close read pipe immediately after reading and only when initialized
c.f. #22386.
2013-09-07 22:20:26 -05:00
Mike McQuaid c053779a98 audit: print warning and description. 2013-09-07 17:38:15 +01:00
Jack Nagel b448ab7601 Rewrite conditions in more natural way 2013-09-07 11:09:32 -05:00
Jack Nagel 9bb326dab3 Use block-form of File.open and let Ruby do the cleanup 2013-09-07 10:22:58 -05:00
Jack Nagel 340562a843 ARGV.verbose? is always false here 2013-09-07 10:22:11 -05:00
Mike McQuaid 698e5624be 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 #15751.
Closes #17713.
2013-09-07 13:39:43 +01:00
Jack Nagel 3f2736fd83 Fix file descriptor leak in Formula#system 2013-09-06 23:17:50 -05:00
Jack Nagel 2113ff16be Close the read end of the error pipe after the build 2013-09-06 22:49:31 -05:00
Xiyue Deng e8188c55d0 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 0ce0f36620 ENV: remove trailing slash from OpenGL header path 2013-09-06 12:38:56 -05:00
Jack Nagel a098f46e10 Fix breakage in option recognition
Fixes #22347.
2013-09-05 18:51:27 -05:00
Xiyue Deng b6e5c7ca3b 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 01442d4769 Suggest installing pip via easy_install 2013-09-05 12:03:54 -05:00
Samuel John fd03aa527d 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 c54f879fbf reinstall cleanup 2013-09-05 14:59:33 +02:00
Xiyue Deng 4b320eec6b 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 #22190.

Signed-off-by: Samuel John <github@SamuelJohn.de>
2013-09-05 14:02:29 +02:00
Jack Nagel aec24de852 ENV: convert values to strings in cc setters 2013-09-03 10:07:53 -05:00
Jack Nagel e505c33f11 ENV: use cc accessor 2013-09-03 10:06:55 -05:00
Samuel John c71dc7c149 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 cf8f4ccc76 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 040bb3e7d1 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 d2fea17e17 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 9f7c616c1c 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 36ff1191ae python_helper: Comment wording 2013-09-03 10:36:58 +02:00
Misty De Meo ebaf43dc69 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 #22266.
2013-09-02 10:01:36 -07:00
Misty De Meo acee7d04db Remove attr_rw for CompilerFailure version attribute
This reverts commit 7db9ef9650.
2013-09-01 22:37:03 -07:00
Misty De Meo 7db9ef9650 CompilerFailure: specify attr_rw for version 2013-09-01 21:26:30 -07:00
Misty De Meo 3bfccca97c 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 500d40db58 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 881d2295ea 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 4bbe6172c0 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 733076ec22 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 512801cd26 Provide reusable GNU GCC constants in ENV 2013-09-01 13:19:13 -07:00
Misty De Meo 5a5ed17dc5 Experimental support for non-Apple GCCs 2013-09-01 13:19:12 -07:00
Mike McQuaid 1e69e28835 formula_installer: handle post_install exceptions.
Warn users and point them to `brew postinstall` (which can provide a
backtrace).

Closes #21887.
2013-09-01 13:57:40 +01:00
Mike McQuaid 456b955c92 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 f1e4f3ab99 brew-reinstall: don't list --force in args. 2013-09-01 13:57:40 +01:00
Mike McQuaid 1fd941d99e brew-reinstall: don't try and rebuild bottles. 2013-09-01 13:57:40 +01:00
Mike McQuaid 20115155cf Allow forcing bottle installation. 2013-09-01 12:59:01 +01:00
Jack Nagel de55321663 Add test for option description rules 2013-08-31 20:40:06 -05:00
Jack Nagel ab49abcd0f Push dependency option generation into BuildOptions 2013-08-31 16:16:54 -05:00
Jack Nagel ca7205ea9c Add test for dependency options 2013-08-31 16:09:49 -05:00
Adam Vandenberg 1b82fc4e06 Workaround for debrew
See #21720.
2013-08-31 11:15:19 -07:00