2915 Commits

Author SHA1 Message Date
Jack Nagel
36dc701cfb Remove extra newline
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-28 21:06:48 -05:00
Jack Nagel
ee485b16e7 Make VCS download strategies work without user paths
Closes Homebrew/homebrew#15139.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-28 21:05:08 -05:00
Max Howell
69ba010637 superenv: reset LD
Refs Homebrew/homebrew#15090.
2012-09-28 17:29:37 -04:00
Max Howell
f3b7b933fa Fix ENV.fortran info texts
They were being truncated.
2012-09-28 17:14:56 -04:00
Jack Nagel
0639364a82 _Really_ fix hg strategy
Fixes Homebrew/homebrew#15181.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-28 09:30:01 -05:00
Max Howell
cddc3649a7 Safer way to redirect puts to a file 2012-09-28 09:49:05 -04:00
Max Howell
7a75915345 Only handle build-errors when it's a build-error
Refs Homebrew/homebrew#15164.
2012-09-28 09:37:38 -04:00
Jack Nagel
cc932ca668 Fix hg strategy under stdenv
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 17:59:01 -05:00
Jack Nagel
7e6c274f81 test_bucket: don't try to clean a non-existent keg
It is a no-op under Ruby 1.8 but Pathname#find raises ENOENT if the
directory doesn't exist under 1.9. But we really shouldn't try to clean
a non-existent keg anyway, and FormulaInstaller will have bailed out
long before the clean step if the keg doesn't exist, so lets just not
even test this condition; the cleaner has its own tests anyway.

Alternatively we can adjust the cleaner to handle this case, but I don't
see much value in that.

n.b. with this, the tests now pass under 1.9.3 (for me), which is nice
because I often run them on that version inadvertently.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 17:50:13 -05:00
Jack Nagel
dd4302ae9b Improve text_executable heuristic
Previously we detected this by reading the first line of the file.
However, "first line" is meaningless when dealing with binary files, but
IO#readline will happily keep reading until it finds a newline
character, which can result in some unnecessarily large buffers.

Aside from the performance issue, this causes an additional problem
under Ruby 1.9: trying to match the binary string against a pattern will
raise ArgumentError (unless the binary string just happens to also be
valid UTF-8, heh).

Fix both issues: only read the first 1024 bytes, as no sane shebang will
ever be that long, and use a plain read(), which returns an ASCII
encoded string even on 1.9.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 17:26:26 -05:00
Jack Nagel
1b2e19d425 Adjust test expectation for 'LD'
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 16:24:04 -05:00
Jack Nagel
6ebcccdcc5 Make FileUtils extension available globally
Now that we are monkeypatching copy_metadata, we should load our
extension up front for consistency.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 16:22:01 -05:00
Jack Nagel
8d3ff5691d Fix conditional
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 16:21:39 -05:00
Misty De Meo
61ccf12e85 Don't set $VERBOSE when building nonverbosely
Setting $VERBOSE in the environment makes the haskell-platform build
fall down, which is surely one of the odder bugs I've run into.

See Homebrew/homebrew#15164.
2012-09-27 15:39:24 -05:00
Max Howell
5f8047e9a4 When builds fail verbosely, be verbose 2012-09-27 15:39:35 -04:00
Misty De Meo
38283eafb2 FileUtils: backport #copy_metadata fix
Entry_#copy_metadata has a nasty bug that makes copying symlinks
across filesystems fail. This lasted all the way through 1.9.3p194
before *finally* being fixed. This backports the official fix.

Fixes Homebrew/homebrew#14710.
2012-09-27 09:52:06 -05:00
Misty De Meo
3633995fc9 stdenv: stop setting LD
superenv stopped setting LD in
8e4c0a141171666270529da4be026d529d474467, seems sensible to follow
suit in stdenv too.

See Homebrew/homebrew#14943.

Fixes Homebrew/homebrew#15090.
2012-09-26 13:22:30 -05:00
Misty De Meo
b4e246e75d Update blacklist warnings
* MacRuby isn't in homebrew-alt anymore
* Removed the entire npm warning since it's installed with node.js
2012-09-25 14:35:05 -05:00
Max Howell
b94e220bc3 ENV.fortran adds back superenv removed PATHs
Fixes Homebrew/homebrew#15103.
2012-09-25 12:04:42 -04:00
Max Howell
382fa27520 Don't unset DEVELOPER_DIR if set 2012-09-25 11:31:56 -04:00
Max Howell
d0f707f893 Determine SUPERBIN correctly 2012-09-25 11:31:56 -04:00
Max Howell
d1be193cfe MercurialDownloadStrategy can find hg again
Was broken after superenv PATH modification.

Fixes Homebrew/homebrew#15078.
2012-09-25 11:31:56 -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
Max Howell
1100818100 Fix fixopt and fixopt error handling
The Keg constructor was throwing because we were returning a relative path, and the error-handler was just returning a string rather than raising a string.

Worrying because a lot of opts have not been fixed and I thought this was essential for depending on keg-only formula nowadays.

Refs Homebrew/homebrew#15077.
2012-09-24 11:41:21 -04:00
Max Howell
bda8bb08e3 Attempt to fix opt-paths for all deps
Since we changed superenv to set a PATH without /usr/local, all deps need to have opt paths.

Fixes Homebrew/homebrew#15077.
2012-09-24 11:09:13 -04:00
Max Howell
c076a272ee Work even when RUBYLIB='-'
Apparently setting RUBYLIB to '-' causes the library path to be unset. So we need to set our own library path in our scripts.

Fixes Homebrew/homebrew-versions/#47.
2012-09-24 09:49:54 -04:00
Max Howell
ca14962ab9 Assign DEVELOPER_DIR before it is needed
On a broken set up, setting DEVELOPER_DIR can fix builds, provided it is set early enough to impact them.
2012-09-24 09:49:54 -04:00
Max Howell
1ae0e93d7e Abort if xcrun -find foo returns superbin/foo
Fixes Homebrew/homebrew#14691.

Rewrite in Ruby to facilitate checking PATHs properly.
2012-09-24 09:49:53 -04:00
Max Howell
82c58bb615 Fix doctor hanging if xcode-select is bad
Also fix typo in the superenv DEVELOPER_DIR set detection code.
2012-09-24 08:49:58 -04:00
Max Howell
bcf0d6f245 superenv: Remove HOMEBREW_PREFIX/bin from PATH
We add the bins from all deps instead. Rationale: formula find and use eg. GNU-coreutils versions of things and then break. Only allow formula to use tools that they depend on and expect.

I want to go further and only add include paths etc. for dependencies, I have done some work on this, but I fear it may be impossible. If an include path is eg. /usr/local/lib/foo/include, is it possible to know if this path is bad? Not always AFAICT.
2012-09-23 21:26:50 -04:00
Max Howell
a0df6180b7 Set DEVELOPER_DIR; Fixes bad xcode-select path
In cases where the xcode-select -print-path is '/' xcrun still hangs indefinitely, setting DEVELOPER_DIR to something (preferably the Xcode path) fixes that. So let's.
2012-09-23 20:57:41 -04:00
Max Howell
7aa38b5d03 Always unpack the source tarball, not the bottle 2012-09-23 20:38:16 -04:00
Max Howell
9ac477b07c brew unpack: support -gpf
-g sets up git repo. -f forces even if already there. I found these useful.
2012-09-23 18:31:10 -04:00
Max Howell
4973329a60 brew cleanup -n: less scary 2012-09-22 00:29:17 -04:00
Max Howell
6e4a01c70a brew --env: Use fetch rather than []
Because we mess with the return value from [] in superenv due to many formula assuming CFLAGS etc. would not be nil.
2012-09-21 23:30:34 -04:00
Max Howell
d147a4b989 superenv: don't set LD
Some compile issue will no doubt elapse, but we can address these on a case-by-case basis.

Refs Homebrew/homebrew#14943.
2012-09-21 23:22:35 -04:00
Jack Nagel
5ebf0416ce cleanup: look for "HEAD", not "sha" in receipt
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-20 16:47:00 -05:00
Jack Nagel
5adea8c1e1 Update Xcode.latest_version for 4.5
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-19 21:27:59 -05:00
Jack Nagel
4db4d90440 Update Xcode guess for 4.5
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-19 15:51:21 -05:00
Max Howell
24b4d445cf Provide more information about bad sf urls 2012-09-18 16:27:35 -04:00
Max Howell
12d17155cf If we delete stuff in the clean step, make fuss
/cc @jwheare
2012-09-18 16:27:34 -04:00
Mike McQuaid
55dc5466fb Fix building bottles from source. 2012-09-18 20:05:03 +01:00
Jack Nagel
bd4f69a718 Don't try to fix @rpath install names
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-18 13:07:00 -05:00
Misty De Meo
2f2645e962 info: Add JSON output
Output JSON with the --json=v1 option. Output is in an array, and
supports one or more formulae (or all, with the --all option).

Why 'v1'? The format is unstable, presumably we'll deprecate it
someday. It should be solid by Homebrew 1.0.

Closes Homebrew/homebrew#13299.
2012-09-17 20:01:37 -05:00
Misty De Meo
ee4c696380 ARGV: add .json
Used by brew info; may be used by other commands in the future.
2012-09-17 19:06:40 -05:00
Misty De Meo
3473bbc010 Make check for stray developer dir more specific
It looks like there can be harmless stuff leftover in
/Developer/Library, even after Xcode uninstalls older versions. The
existence of the uninstall-developer-folder script should be a better
indicator.

Fixes Homebrew/homebrew#14970.
2012-09-16 14:07:38 -05:00
Christian Höltje
d56957d2f8 Prevent linkapps from creating duplicate aliases
`brew linkapps` was creating `MacVim` on the first run, then
`MacVim alias` on the second run.

Closes Homebrew/homebrew#14955.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-09-15 12:56:18 -07:00
Misty De Meo
e8c372a315 Skip standard compilers check for unknown Xcode
Rescuing false on the StandardCompilers map meant that the doctor
check assumed that the compilers were incorrect, not merely
unknown.

Instead, skip the check and return nil for unknown Xcode; nil
should be interpreted as "dunno", instead of "true" or "false",
and the doctor check no longer prints on nil.
2012-09-14 17:11:51 -05:00
Misty De Meo
50efa98638 Add Xcode 4.5 to StandardCompilers map
We now have several reports of compiler versions for the GM,
e.g. Homebrew/homebrew#14944.
2012-09-14 17:03:35 -05:00
Jack Nagel
2761d3ee49 Restore X11 description to --config output
Oops.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-14 12:29:51 -05:00