Commit Graph
55 Commits
Author SHA1 Message Date
Mike McQuaid e6cf7be461 Different regex for user/tap/formula and user/tap.
Closes #23430.
2013-10-22 11:58:40 +01:00
Mike McQuaid b8103eb8fb tap: use dedicated exception for already tapped. 2013-10-21 20:16:41 +01:00
Mike McQuaid 32e42e064d global: unify tap regex.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-10-21 18:53:24 +01:00
Misty De Meo b05b36640d Adjust CompilerSelectionError message 2013-09-27 20:33:15 -07:00
Adam Vandenberg b37bbbfc31 Implement Resources
Closes #20212.
2013-09-11 22:05:26 -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
Adam Vandenberg 1ce1c9162a exception style 2013-08-08 11:17:16 -07:00
Adam Vandenberg c521b1afb1 Use 'path or URL' as tap for non-tap, non-core formulae 2013-06-24 07:33:37 -07:00
Adam Vandenberg 29847b54aa Show tap/path for non-core formulae on build failure
Closes #16373.
Closes #20725.
2013-06-24 07:33:29 -07:00
Jack Nagel 70069c5d75 Separate formula conflicts from requirements
Closes #20357.
2013-06-09 13:45:25 -05:00
Adam Vandenberg 4b014a4ed1 Consolidate sudo checks.
Closes #20318.
2013-06-08 20:44:56 -07:00
Misty De Meo 27ba000232 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 7780e13182 CompilerSelector: raise when no compatible compiler
This replaces the old behaviour of falling back to the original
compiler with no messaging.

Fixes #19170.
Fixes mistydemeo/tigerbrew#45.
2013-05-20 23:25:15 -05:00
Jack Nagel 03a4ecfbca Allow brew versions to work with underspecified formulae 2013-04-27 14:44:48 -05:00
Jack Nagel 563d8be6bd 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 591496ccbf Don't error out when a package is already installed
Fixes #17010.
2013-04-03 18:27:28 -05:00
Jack Nagel 5a34e80675 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 ee25d02d54 Silence "* interpreted as argument prefix" warnings 2013-02-18 12:13:34 -06:00
Jack Nagel 1ef497780a Extract unsatisfied dependency logic from installer 2013-01-27 21:20:09 -06:00
Jack Nagel f82ed2f33d 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 09f83c6273 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 6141d49ace Fix use of ISSUES_URL. 2012-10-03 00:04:24 +01:00
Max Howell 1ed0eb1dc3 When builds fail verbosely, be verbose 2012-09-27 15:39:35 -04:00
Max Howell 1fc68c62d8 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 72cdfe3551 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 eaef050ab9 Encourage clicks on issues link 2012-08-13 10:14:59 -04:00
Max Howell 2f8f17f133 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 d42d796653 Allow multiple unsatisfied fatal requirements
Closes #13335.
2012-08-07 10:49:45 -07:00
Mike McQuaid e3d6099035 Further improve brew doctor issue wiki text.
Following feedback from @mxcl on bcda0d.
2012-07-26 07:53:27 +01:00
Jack Nagel 9af20b7601 Fix typo in comment
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-17 11:31:53 -05:00
Jack Nagel e037e5f806 Coerce advice to a string in ChecksumMismatchError
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-17 11:30:28 -05:00
Jack Nagel 96f396c9d4 fetch: use new checksum verification
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel 0c18ffd7fa Refactor checksumming
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:33 -05:00
Mike McQuaid bcda0d22aa Improve bug report wiki page text.
Fixes #12674.
2012-06-25 19:49:44 -05:00
Max Howell f010a06208 Allow dashes in tap-formula names 2012-03-17 00:21:22 +00:00
Max Howell b52085b00f Tell the user to tap (if req.) for tapped deps
Also propagate dependency info through exception if possible so the error message is more useful.
2012-03-16 21:06:17 +00:00
Max Howell 126cc9fa15 Concise --config output for build errors
Rationale, lets only pay attention to the output when it matters. Speeding up diagnosis.
2012-03-16 21:06:16 +00:00
Max Howell 31188c7df3 Refer users to correct tracker for tapped brews 2012-03-16 21:06:16 +00:00
Adam Vandenberg d5f0cb3c07 Use new Requirements code in Homebrew 2012-03-10 09:24:10 -08:00
Max Howell 5bddaf2e35 Stop supporting `brew install --force'
Rationale: it breaks stuff. You should not be able to install over something already installed *and* linked. brew now prompts you to unlink the existing linked keg first.

I came to fix this because I discovered that `brew install foo` works without --force provided foo's formula version is different to that which is installed and linked. I'm not sure if this was intentionally broken, but it led to at least two tickets I found where people were getting crazy issues trying to install over the top of already installed previous versions.

So I also fixed a whole category of other issues, mostly by moving error handling into FormulaInstaller. Now error's can be caught in Homebrew.install and handled on a formula-by-formula basis. I will next port this behaviour to upgrade.
2012-03-07 12:33:47 +00:00
Max Howell 9b798ccb20 Move brew output for BuildError into BuildError
So upgrade can output errors but continue to upgrade the rest of the installation.
2012-03-07 12:33:47 +00:00
Adam Vandenberg 0c215884c6 Add support for Luarocks dependencies. 2012-02-29 20:52:20 -08:00
Adam Vandenberg 3e0027bf18 Remove some whitespace here 2012-02-27 21:19:25 -08:00
Second Planet c4027c4051 Add more external dep options
* Chicken Scheme
* Node.js
* Rubinius

Closes #8466.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-02-25 10:19:59 -08:00
Max Howell 06b554ac3f Only try mirrors for CurlDownloadStrategies
Also adjust output text slightly for prettiness.

A possibly useful side effect here is safe_system has a defined Exception (subclassing RuntimeError) now.
2011-09-19 23:30:10 +01:00
Charlie Sharpsteen 3b5869acb5 exceptions.rb: Add DownloadError
`DownloadError` is an exception that download stratigies can throw to indicate
that a fetch was incomplete due to a failure in communication.

The `curl` method in `utils.rb` has been upgraded to throw a `DownloadError` if
something bad happens to `curl` execution.
2011-09-19 09:21:36 -07:00
Kevin Moore be468a22fb Python easy_install just needs the package
adding 'install' to the command line breaks things

Closes #7489.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-09-11 12:23:31 -07:00
Kevin Moore 31f317128a UnsatisfiedExternalDependencyError: init error
Pass message and formula to super so useful output occurs.

Closes #7507.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-09-11 09:44:49 -07:00
Adam Vandenberg b31e430836 Remove reference to 'brew install pip' 2011-04-25 13:13:16 -07:00
Adam Vandenberg b792d98ad8 remove whitespace 2011-03-26 10:19:45 -07:00