165 Commits

Author SHA1 Message Date
Max Howell
f724f5ed52 Ensure ENV is pristine for each installation
Because we modified the ENV global each install this propagated to consecutive
formulae. So exec a new brew process each install. This is the safest way
although Ruby exceptions don't propagate to the parent process so I worry
about it somewhat.
2009-08-10 18:11:23 +01:00
Max Howell
69c076e741 ohai takes multiple parameters
Will not show any of the block if the 1st additional parameter is nil
2009-08-10 18:11:23 +01:00
Max Howell
a6577e5117 When safe, correct common install issues
Eg. man can be moved into share without consequences
2009-08-10 18:11:23 +01:00
Max Howell
a84bf77515 Delete installed documentation after install
Documentation is all online nowadays, and is more current there.

Documentation often takes up more space than the rest of the package.

Package listings are now more relevent.

We'll make it optional as soon as one person complains.
2009-08-10 18:11:23 +01:00
Max Howell
6dbdc9ab0c Remove duplicates from ARGV.named
Includes test
2009-08-10 18:11:23 +01:00
Max Howell
dccc2b1923 Apply new ENV capabilities to all existing Formulae 2009-08-10 18:11:22 +01:00
Max Howell
760c083c0c Refactor
Large refactor to Formula, mostly improving reliability and error handling but
also layout and readability.

General improvements so testing can be more complete.

Patches are automatically downloaded and applied for Formula that return a
list of urls from Formula::patches.

Split out the brew command logic to facilitate testing.

Facility from Adam Vandenberg to allow selective cleaning of files, added
because Python doesn't work when stripped.
2009-08-10 18:11:17 +01:00
Max Howell
5a396fd8b4 Extend ENV to make tweaking the build environment easier
eg. ENV.libpng or ENV.deparallelize
2009-08-10 16:48:21 +01:00
Max Howell
4355182529 Return the installed path(s) from install 2009-08-10 16:34:04 +01:00
Max Howell
3cf869385e FIX Pathname.rename
Rename relative to self.dirname
2009-08-10 16:33:15 +01:00
Max Howell
b32d2044c5 ARGV+yeast
Extensions to ARGV that are convenient or improve our robustness
2009-08-10 16:27:24 +01:00
Adam Vandenberg
cae0e78e60 Pull USERAGENT used by curl into constant 2009-08-10 16:15:24 +01:00
Adam Vandenberg
fea89daae6 Extract 'verify_download_integrity' method
In order to support more than just MD5 verification, extract 'verify_download'
into a separate method.
2009-08-10 16:14:43 +01:00
Max Howell
182ce1eff6 Formula::std_cmake_parameters
Because cmake syntax is batshit-insane, this stops people having to memorize
which parameters to supply, and thus prevents error.

I didn't do the same for Autotools deliberately as I have found that
which parameters are supported is somewhat inconsistent. Plenty don't even
support --disable-debug, thus I want the parameters getting used in the
contributors face so they can easily diagnose what is going on.
2009-08-06 20:25:59 +01:00
Max Howell
e9dbdadcac Remove all testing temporaries when done 2009-08-04 01:31:32 +01:00
Max Howell
a1d5450f0c The unittest now emulates a fresh install better
In future, this will hopefully prevent regressions like issue Homebrew/homebrew#7.
2009-08-04 01:07:36 +01:00
Max Howell
33b90794e1 HOMEBREW_CACHE is now a Pathname object
This is consistent with the other HOMEBREW_* path constants
2009-08-04 00:40:12 +01:00
Max Howell
8ce4e5923f FIX Github gist formulae 2009-08-04 00:36:48 +01:00
Max Howell
69d7e2a797 FIX brew install before Cache has yet been created
Closes Homebrew/homebrew#7

Cache directory is created when downloading tarballs, but the new
hw.model stuff compiles the hw.model.c file there.
2009-08-04 00:35:27 +01:00
Adam Vandenberg
58fe4cc2bf Use cleanpath instead of realpath to keep symlinks intact. 2009-08-02 01:25:01 +01:00
Max Howell
a5ca752658 Refactor and clean up code 2009-08-01 18:10:20 +01:00
Max Howell
e2bc3c510e FIX allow @version to be set in derived Formula 2009-08-01 17:54:18 +01:00
Max Howell
7cb9c31f3e Determine best optimization flags for host
We call sysctl to determine which exact Mac model we are running on and
optimize as well as possible.
2009-07-31 16:06:14 +01:00
Max Howell
055a694cd4 More tests for Formula and Keg 2009-07-31 14:21:27 +01:00
Max Howell
7e0d5bf165 Tests for Formula.* 2009-07-31 14:04:24 +01:00
Max Howell
e39f2ad229 FIX chmod correctly for *both* 32bit and 64bit binaries 2009-07-31 14:03:58 +01:00
Max Howell
d082abbbe8 FIX only claim that Formula doesn't exist if it was a loaderror 2009-07-31 14:03:22 +01:00
Max Howell
c4972e218f FIX typo in formula.rb 2009-07-31 13:13:52 +01:00
Max Howell
5fd7fd0578 A basis for full test coverage 2009-07-31 04:59:08 +01:00
Max Howell
a39e0d20c3 opoo function for warning messages 2009-07-31 04:59:08 +01:00
Max Howell
9b19f194cc Refactor $foo into HOMEBREW_FOO
CONSTANTS are the far saner choice for these important parameters.

Split env up so I can redefine the CONSTANTS in unittest.rb.
2009-07-31 04:59:02 +01:00
Max Howell
7f3e8bc36a Recognise 64 bit binaries too 2009-07-31 01:19:11 +01:00
Max Howell
6d64eb28d5 Don't allow Keg.new for empty kegs
Kegs have to exist to be created.
2009-07-31 01:18:03 +01:00
Adam Vandenberg
ec65bb4819 Allow brewing without an MD5 hash
You can either have none, in which case a warning is displayed, or
you can have one, but it *must* match.
2009-07-31 00:29:58 +01:00
Max Howell
fc6e9e5bab Fix Formula.installed? 2009-07-29 01:00:26 +01:00
Max Howell
90c7029144 Fix brew rm 2009-07-29 01:00:26 +01:00
Max Howell
11060f399b Don't allow build to be rescued if the untar fails 2009-07-27 16:35:04 +01:00
Max Howell
822a30e39d Fix inreplace when using ' or other RegExp symbols
Evidence that using perl from the cli for in-replace is stupid :P

Had to use $'' to allow escaping of ' in bash strings.

Wasn't escaping regexp symbols as well, so it was amazing this worked at all!
2009-07-27 16:20:48 +01:00
Max Howell
7ebe8084ec Enforce 10.5 as minimum OSX SDK framework to use 2009-07-27 16:18:17 +01:00
Max Howell
fb5aefd4a0 Refactor--object orientate where sensible 2009-07-24 23:57:54 +01:00
Max Howell
5eb9d6519d Fix ack formula 2009-07-23 04:12:25 +01:00
Max Howell
34955880d5 Fix issues with Pathname.install and arrays 2009-07-23 01:14:22 +01:00
Max Howell
32281b7a7f Fix hard link dissociation bug
strip unlinks the file first, breaking hard links, so we detect instances where we are about to strip a file with many linkages and prevent it.

This fixes the libexec non executable bug in the git package.

Took me a long time to figure out what was wrong! :P
2009-07-22 20:28:42 +01:00
Max Howell
17968f51c4 Support gloox version style 2009-07-10 03:11:05 +01:00
Max Howell
3f61cb19a4 Make scripts executable by default
Though maybe we should only do that if they were before?
2009-07-10 00:36:16 +01:00
Max Howell
dba2a53216 Use ~/Library/Caches not ~/Library/Application Support for http-cache 2009-06-28 17:35:04 +01:00
Max Howell
a648e46d8a Leave permissions of installed files in sensible state
No write permission for files, executable when required etc.
2009-06-26 13:05:48 +01:00
Max Howell
6e9a564021 foobar-1.2.1rc1 version pattern 2009-06-18 10:31:23 +01:00
Max Howell
b1a628cc99 mv share/doc/name-version to share/doc/name
Versioned docs don't make sense with our installation pattern
2009-06-18 10:31:15 +01:00
Max Howell
02e53d44cb Capture stdout during test_prefix 2009-06-15 01:28:44 +01:00