77 Commits

Author SHA1 Message Date
Mike McQuaid
54fc1946f9 exceptions: fix tap issue URL.
Closes Homebrew/homebrew#29043.
2014-05-08 11:43:11 +01:00
Adam Vandenberg
d4b0599a86 --config -> config 2014-04-30 19:09:29 -07:00
Mike McQuaid
165fdf4617 Use gcc instead of apple-gcc42 when needed. 2014-04-23 08:15:30 +01:00
Adam Vandenberg
b24ef38bc1 show formula version in failed build output 2014-04-06 12:00:34 -07:00
Jack Nagel
cfee535786 Remove now unnecessary realpath calls 2014-04-06 00:31:07 -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
Misty De Meo
ab4f9e57ae Don't check issues on Ruby 1.8.6
The system certs are too old to be able to read from Github, so
don't try to use the Github API on 1.8.6 either.
2014-03-17 11:52:11 -07:00
Jack Nagel
3872f78d66 Add custom exception for untapped formulae 2014-02-28 15:58:20 -06:00
Jack Nagel
793d6de6c3 Pass expansion-time build options to install_dependency 2014-02-27 14:22:43 -06:00
Jack Nagel
9b8cff1484 Tweak DownloadError message to include wrapped exception 2014-02-18 15:08:03 -05:00
Drew Rodman
d63ef14794 Add DownloadError to catch a broader range of resource download errors.
Adding a broader exception class allows for errors raised in Resource.fetch
to be caught in upgrade and prevent the process from being killed when
a download fails. This should resolve issue 18364.

Fixes Homebrew/homebrew#18364.
Closes Homebrew/homebrew#26618.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-02-18 15:08:03 -05:00
Jack Nagel
ca0eff67fa Inline static exception text to remove a rescue 2014-02-18 13:27:35 -05:00
Jack Nagel
0b0d171566 Don't let issue search kill install process 2014-02-08 16:04:53 -05:00
Misty De Meo
d885d98164 C++ stdlibs: issue warning, don't fail the build 2014-02-02 11:04:30 -08:00
Mike McQuaid
a65f649cf5 utils: improve issue searching.
* issues_matching now returns an array
* prints issues titles and URLs
* find_pull_requests shows closed PRs if no matching PRs are open

Closes Homebrew/homebrew#26032.
2014-01-20 17:58:50 -08:00
Mike McQuaid
5413ebca53 exceptions: remove unused AlreadyTappedError. 2014-01-03 21:57:07 +00:00
Mike McQuaid
d7c13f84b6 Update string references to mxcl/homebrew. 2013-12-14 18:18:35 +00:00
Jack Nagel
65a00e213b Make CompilerSelectionError an InstallationError
Fixes Homebrew/homebrew#19962.
2013-12-03 22:16:37 -06:00
Mike McQuaid
6af4ab44c6 exceptions: improve tap error message.
Point users to the tap's issue tracker URL.
2013-11-11 18:09:02 +00:00
Mike McQuaid
37e2005e79 Use HOMEBREW_LOGS more consistently. 2013-10-31 17:02:20 -07:00
Mike McQuaid
55947f84a5 exceptions: direct to correct tap on failure.
Closes Homebrew/homebrew#23757.
2013-10-30 11:20:20 -07:00
Stefan
0a1df377fb fix build log output
Closes Homebrew/homebrew#23669.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-10-27 09:48:15 -07:00
Mike McQuaid
98b28f5ac3 Different regex for user/tap/formula and user/tap.
Closes Homebrew/homebrew#23430.
2013-10-22 11:58:40 +01:00
Mike McQuaid
1cb7eca3a5 tap: use dedicated exception for already tapped. 2013-10-21 20:16:41 +01:00
Mike McQuaid
077f09e4ea global: unify tap regex.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-10-21 18:53:24 +01:00
Misty De Meo
29d204c697 Adjust CompilerSelectionError message 2013-09-27 20:33:15 -07:00
Adam Vandenberg
d4cf3ef212 Implement Resources
Closes Homebrew/homebrew#20212.
2013-09-11 22:05:26 -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
Adam Vandenberg
bb142f4e3b exception style 2013-08-08 11:17:16 -07:00
Adam Vandenberg
1a72c85a05 Use 'path or URL' as tap for non-tap, non-core formulae 2013-06-24 07:33:37 -07:00
Adam Vandenberg
b9b1dfb9a6 Show tap/path for non-core formulae on build failure
Closes Homebrew/homebrew#16373.
Closes Homebrew/homebrew#20725.
2013-06-24 07:33:29 -07:00
Jack Nagel
8b9a3a560f Separate formula conflicts from requirements
Closes Homebrew/homebrew#20357.
2013-06-09 13:45:25 -05:00
Adam Vandenberg
4c9ac19e87 Consolidate sudo checks.
Closes Homebrew/homebrew#20318.
2013-06-08 20:44:56 -07:00
Misty De Meo
ec2bc88987 InstallationError: don't search issues on < 1.8.6
open-uri on Ruby pre-1.8.6 simply will not open https URLs at all,
making it impossible to check the Github API using the same method
as Homebrew.

This may only be disabled temporarily until the issue search is
rewritten, for example to use the curl helper.
2013-06-02 18:33:45 -05:00
Misty De Meo
4fdbb2d685 CompilerSelector: raise when no compatible compiler
This replaces the old behaviour of falling back to the original
compiler with no messaging.

Fixes Homebrew/homebrew#19170.
Fixes mistydemeo/tigerbrew#45.
2013-05-20 23:25:15 -05:00
Jack Nagel
9b5cb6cfb6 Allow brew versions to work with underspecified formulae 2013-04-27 14:44:48 -05:00
Jack Nagel
2e26afe556 Improved formula attribute validation
The initializer for Formula does a number of validations, but it does
them in a weird order, and some attributes aren't validated under
certain circumstances. This became even more of a mess when most
software package attributes were moved into the SoftwareSpec class.

This commit removes the last vestiges of storing these attributes as
instance variables. In particular, it eliminates #set_instance_variable
and #validate_variable, replacing them with methods that operate on
SoftwareSpec instances, and generate more useful errors.

Doing these validations unconditionally in the initializer means we bail
out much earlier if the formula has invalid attributes or is not fully
specified, and no longer need to validate in #prefix.

Technically we don't need to validate in #brew either, but we continue
to do so anyway as a safety measure, and because we cannot enforce calls
to super in subclasses.
2013-04-13 17:40:12 -05:00
Jack Nagel
12932a51b3 Don't error out when a package is already installed
Fixes Homebrew/homebrew#17010.
2013-04-03 18:27:28 -05:00
Jack Nagel
f172d3a6eb Don't use deprecated form of attr
The form "attr :name, true" is deprecated and causes Ruby to emit a
warning in verbose mode. Using attr_{reader,writer,accessor} is more
clear anyway, so do so.
2013-02-18 12:13:34 -06:00
Jack Nagel
baffb31aab Silence "* interpreted as argument prefix" warnings 2013-02-18 12:13:34 -06:00
Jack Nagel
5e83629119 Extract unsatisfied dependency logic from installer 2013-01-27 21:20:09 -06:00
Jack Nagel
37a56fa513 FormulaInstaller: implement installation locks
FormulaInstaller now attempts to take a lock on a "foo.brewing" file for
the formula and all of its dependencies before attempting installation.

The lock is an advisory lock implemented using flock(), and as such it
only locks out other processes that attempt to take the lock. It also
means that it is never necessary to manually remove the lock file,
because the lock is not enforced by I/O.

The uninstall, link, and unlink commands all learn to respect this lock
as well, so that the installation cannot be corrupted by a concurrent
Homebrew process, and keg operations cannot occur simultaneously.
2013-01-26 12:14:45 -06:00
Max Howell
394549dd3d Only show the troubleshooting link
This has to be a last resort right? If all we show is that link (plus preceding un-deletable output) and they don't click it then maybe we should just close the ticket and hope they'll use MacPorts instead.
2012-10-31 11:28:29 -04:00
Mike McQuaid
53b387987b Fix use of ISSUES_URL. 2012-10-03 00:04:24 +01:00
Max Howell
5f8047e9a4 When builds fail verbosely, be verbose 2012-09-27 15:39:35 -04:00
Max Howell
a217b03952 Clean up and improve build-error output and logs
All logs are now stored from each command executed in Formula.install.

Error output is truncated to five lines in an attempt to not overwhelm the user and to encourage users to read the error output and report the bug properly. Maybe we can get that figure up from 70% to 90%.
2012-09-25 11:31:56 -04:00
Adam Vandenberg
e0cff10be5 Update build failure message.
Have been seeing reports with only the config.log, so change this message.
2012-09-01 09:29:45 -07:00
Max Howell
3d657746bb Encourage clicks on issues link 2012-08-13 10:14:59 -04:00
Max Howell
45b84df1bd Be more verbose when users insist on being sudoers
If you google for "Cowardly refusing to sudo brew" you get a lot of confused users who didn't read any of the Homebrew documentation and then had a hissy-fit.
2012-08-10 09:33:44 -04:00
Adam Vandenberg
8c8701f268 Allow multiple unsatisfied fatal requirements
Closes Homebrew/homebrew#13335.
2012-08-07 10:49:45 -07:00