378 Commits

Author SHA1 Message Date
Adam Vandenberg
b02d25bccd Add ruby lib to folders handled specially by keg.link 2011-03-13 12:19:27 -07:00
Max Howell
521f1ec959 A install name fix step during install
We currently only fix relative paths, but we should expand this more.
2011-03-12 11:55:04 -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
Michael Dippery
e0c23d670d More .DS_Store ignoring
* Don't link .DS_Store files
* Don't list .DS_Store files in `brew info`

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-11-05 19:44:56 -07:00
Adam Vandenberg
4e6d7a4de9 Man sections only run through 8 2010-08-21 11:25:14 -07:00
Adam Vandenberg
04c0342d96 comment link step 2010-08-21 10:51:43 -07:00
Adam Vandenberg
612af6b4fe Make "lib/node" a real folder.
Treat the "lib/node" folder like Python, Perl, etc.
Create it as a real folder in HOMEBREW_PREFIX, so that
package managers (npm) have a stable place to drop libs.
2010-08-07 21:10:41 -07:00
Patrick Walton
6fbf125970 Create explicit folders for more language libs. 2010-06-23 11:31:52 -07:00
Adam Vandenberg
48c7e2fb0b Don't symlink lib/python2.6
Like pkgconfig, perl5 & php, we don't want any one formula to "own" the
lib/python2.6 path.

Fixes Homebrew/homebrew#1218.
2010-06-01 18:09:44 -07:00
Adam Vandenberg
fb9f4bbccc Don't link_dir if the target doesn't exist.
Fixes Homebrew/homebrew#1115 for Ruby 1.9, thanks to assaf.
2010-04-04 13:46:41 -07:00
Adam Vandenberg
a9b19f0255 Move license block to separate LICENSE file. 2010-03-01 11:41:24 -08:00
Max Howell
1deb3a1fea Don't resolve conflcts for pre-existing symlinks in HOMEBREW_PREFIX
Eg /usr/local/lib/juice/foo points somewhere else where the user has modules that he wants juice to use.

Basically don't error out for stuff that isn't ours.
2009-12-17 19:17:50 +00:00
Adam Vandenberg
bc378d091b Compare against HOMEBREW_CELLAR using real paths.
The code in Keg.self.for path uses "path = path.parent.realpath" to walk
up subfolders looking for a Keg.

Because 'realpath' is in there, and the path is checked against
HOMEBREW_CELLAR, which  may be a symlink, we need to do realpath-to-realpath
comparisons in Keg. Otherwise, we will hit equivalent but symlinked folders,
not see that they are the same, and walk all the way up to / and then
error out.
2009-11-12 12:47:17 -08:00
Max Howell
3570214d20 Allow multiple formula to symlink the same directory
During the link step, if the destination symlink already exists, unlink it, and create a directory instead, then relink the original contents. Then continue linking the formula in question.

Fixes Homebrew/homebrew#62
2009-10-23 19:22:07 +01:00
Max Howell
a8d6a695bc mkpath for all directories under lib/perl5
Don't symlink, as multiple formula will install to this directory.
2009-09-17 22:01:27 +01:00
Max Howell
0543bbcccc Fixes Homebrew/homebrew#32 -- Create directory, don't symlink perl5/site_perl 2009-09-03 23:17:02 +01:00
Max Howell
4d63b87e0a Change license to BSD
I confirmed this change with all relevant contributors first.
2009-08-31 16:09:17 +01:00
Max Howell
65cb8ea09f brew unlink command
Closes Homebrew/homebrew#8
2009-08-29 21:07:26 +01:00
Max Howell
5b6deb8845 Don't symlink directories into bin 2009-08-24 01:04:54 +01:00
Adeel Ahmad Khan
1c55642645 Link binaries in sbin as well as bin.
Signed-off-by: Max Howell <max@methylblue.com>
2009-08-12 23:55:57 +08:00
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
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
e39f2ad229 FIX chmod correctly for *both* 32bit and 64bit binaries 2009-07-31 14:03:58 +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
Max Howell
90c7029144 Fix brew rm 2009-07-29 01:00:26 +01:00
Max Howell
fb5aefd4a0 Refactor--object orientate where sensible 2009-07-24 23:57:54 +01:00