38 Commits

Author SHA1 Message Date
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
Mike McQuaid
8d949520ec Further improve brew doctor issue wiki text.
Following feedback from @mxcl on bcda0d.
2012-07-26 07:53:27 +01:00
Jack Nagel
2488998a0f Fix typo in comment
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-17 11:31:53 -05:00
Jack Nagel
9f6a16eccd 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
af53f54b24 fetch: use new checksum verification
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel
76b2eee777 Refactor checksumming
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:33 -05:00
Mike McQuaid
ef65f3654f Improve bug report wiki page text.
Fixes Homebrew/homebrew#12674.
2012-06-25 19:49:44 -05:00
Max Howell
fe9e2be8fe Allow dashes in tap-formula names 2012-03-17 00:21:22 +00:00
Max Howell
3d5b4af523 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
2c84be96d8 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
b5de42bfef Refer users to correct tracker for tapped brews 2012-03-16 21:06:16 +00:00
Adam Vandenberg
cef5429f93 Use new Requirements code in Homebrew 2012-03-10 09:24:10 -08:00
Max Howell
76aa0a62f3 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
15a70c36d0 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
d22eed3f16 Add support for Luarocks dependencies. 2012-02-29 20:52:20 -08:00
Adam Vandenberg
6f762ea2a8 Remove some whitespace here 2012-02-27 21:19:25 -08:00
Second Planet
8a4cb8c0ac Add more external dep options
* Chicken Scheme
* Node.js
* Rubinius

Closes Homebrew/homebrew#8466.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-02-25 10:19:59 -08:00
Max Howell
6bd47cf0f9 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
ff7c886556 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
16f659451a Python easy_install just needs the package
adding 'install' to the command line breaks things

Closes Homebrew/homebrew#7489.

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

Closes Homebrew/homebrew#7507.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-09-11 09:44:49 -07:00
Adam Vandenberg
cfdca92630 Remove reference to 'brew install pip' 2011-04-25 13:13:16 -07:00
Adam Vandenberg
6d7f608d06 remove whitespace 2011-03-26 10:19:45 -07:00
Adam Vandenberg
9104fdba8c Fix reporting of build errors. 2011-03-14 15:48:35 -07:00
Adam Vandenberg
b7f093925e Fix inheritance in exceptions 2011-03-12 23:06:45 -08:00
Adam Vandenberg
bb58511b31 Fix 'brew install f' for already-installed brews. 2011-03-12 11:55:08 -08:00
Adam Vandenberg
0225f07eba Move some exceptions 2011-03-12 11:55:03 -08:00
Max Howell
768910283a Refactor the brew command into one file per command
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.

But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.

If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.

Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
2011-03-12 11:55:02 -08:00