297 Commits

Author SHA1 Message Date
Mike McQuaid
077f09e4ea global: unify tap regex.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-10-21 18:53:24 +01:00
Jack Nagel
c511d7d2f4 Add OS.mac? and OS.linux? 2013-10-18 12:56:51 -05:00
Mike McQuaid
a6e2245732 git_etc: update based on bottle etc/var changes. 2013-10-10 16:46:47 +01:00
Adam Vandenberg
bda0a3102f Homebrew 0.9.5
Update version due to recent compiler selection fixes.
2013-09-19 23:10:09 -07:00
Mike McQuaid
ab20ed0bc2 Optionally use git to keep brew etc versioned.
Still in alpha state.
Handles defaults and merging changes with new versions.
Enable by setting the HOMEBREW_GIT_ETC environment variable.

Closes Homebrew/homebrew#15751.
Closes Homebrew/homebrew#17713.
2013-09-07 13:39:43 +01:00
Amos Wenger
52ace99f14 Use File::PATH_SEPARATOR globally instead of ':'
On Unix, the path separator is ':', whereas on Windows,
it is ';'. This is the first of a series of patch to bring
macbrew's and winbrew's codebases closer together.

The main places the magic constant ':' was being used were:
  - the $PATH environment variable
  - CMAKE-related environment variables
  - pkg-config related environment variables

Closes Homebrew/homebrew#21921.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-19 13:35:44 -05:00
Jack Nagel
325db99a3c RbConfig::CONFIG['bindir'] is already a string 2013-07-28 16:43:22 -05:00
Jack Nagel
9e771b0e34 Simplify setting MACOS_VERSION 2013-06-14 19:19:25 -05:00
Adam Vandenberg
4c9ac19e87 Consolidate sudo checks.
Closes Homebrew/homebrew#20318.
2013-06-08 20:44:56 -07:00
Jack Nagel
80745a97e2 Add Enumerable#group_by 2013-06-08 12:23:14 -05:00
Jack Nagel
b97b013fce Extract attr_rw from Formula for reuse
Closes Homebrew/homebrew#20239.
2013-06-04 11:06:18 -05:00
Mike McQuaid
bec7ff9807 Update pull request regex name to include commits. 2013-06-02 12:49:37 +01:00
Daniel Lee Harple
08388b149e Added support for a GitHub Personal API Access token
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-05-22 19:53:05 -05:00
Jack Nagel
3be67f7252 Reorganize compat 2013-05-10 23:27:28 -05:00
Jack Nagel
9013b3a0c9 Define RUBY_PATH for tests 2013-04-07 20:59:52 -05:00
Jack Nagel
d4a8813e86 mxcl.github.com/homebrew => brew.sh 2013-04-06 15:51:03 -05:00
Jack Nagel
1b0f0824fe Requirement: env DSL is evaluated in context of self, not ENV
This was meant to support:

  env do |req|
    append_path 'PATH', req.some_method
    ...
  end

i.e., the block was evaluated in the context of ENV. But it turned out
to be not so useful after all, so I'm ripping it out before something
actually depends on it.
2013-04-01 16:17:35 -05:00
Misty De Meo
29af53d451 Replace remaining shelled-out whiches 2013-03-21 08:37:51 -05:00
Mike McQuaid
d39280bdf7 Add current Ruby globals.
Allows access to the Ruby path. Needed for Linux
porting.
2013-03-11 18:26:25 +00:00
Eashwar Ranganathan
a79721e59d brew-pull: fix third-party taps
Closes Homebrew/homebrew#17588.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-02-05 20:14:10 -08:00
Adam Vandenberg
2ad5069bab 0.9.4: optional/recommended support 2013-01-29 11:57:07 -08:00
Jack Nagel
2503cedf2c Object#instance_exec for Ruby 1.8.6
Not thread safe! But I don't think we care.

We want to evaluate the env DSL block in the context of ENV for asthetic
reasons, but we also want access to methods on the requirement instance.
We can use #instance_exec to pass the requirement itself into the block:

  class Foo < Requirement
    env do |req|
      append 'PATH', req.some_path
    end

    def some_path
      which 'something'
    end
  end

Also add a simplified version of Object#instance_exec for Ruby 1.8.6.
2013-01-21 17:24:11 -06:00
Jack Nagel
0949d952dc Define Symbol#to_proc for Ruby 1.8.6
Ruby 1.8.6 doesn't have Symbol#to_proc, which allows things like
map(&:to_s) rather than map { |o| o.to_s }. 1.8.7 does, though, and
since it is used in a bunch of the superenv code we should attempt to
keep it compatible with 1.8.6.

Closes Homebrew/homebrew#16046.
2013-01-09 17:36:17 -06:00
Mike McQuaid
4c1b546d99 brew-test-bot: general cleanup. 2012-11-25 21:03:57 +00:00
Adam Vandenberg
4b72e44461 Use a class for FORMULA_META_FILES
* lets more text types get picked up
* better filter for `brew list`
2012-11-11 10:27:03 -08:00
Stephen Nelson
e7a9f6eb89 Homebrew should not ignore curlrc
Added doctor check for .curlrc rather than silently ignoring it (#13836).

Closes Homebrew/homebrew#15419.

Signed-off-by: Max Howell <mxcl@me.com>

Removed test in doctor where it actually curl'd a file. It's enough to warn if the curlrc exists. I understand people want to remove the warnings, but the point in the doctor is to help diagnose and not to be some ramification of your UNIX system.
2012-10-28 10:52:07 -04:00
Mike McQuaid
53b387987b Fix use of ISSUES_URL. 2012-10-03 00:04:24 +01: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
e909b54c96 Tighten post-install checks
- Avoid ENOTDIR by ensuring that the directories we are checking are
   actually directories.
 - DRY up the check_PATH method; paths are already available via the
   global ORIGINAL_PATHS.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 00:45:45 -05:00
Jack Nagel
f5d0fbcce6 Remove dead code
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-06 17:34:11 -05:00
Jack Nagel
c227792bc1 Don't raise when expanding ORIGINAL_PATHS
File.expand_path raises ArgumentError when it is passed a path with a
nonexistent username, e.g.:

  $ PATH=~foo/bin:$PATH brew
  /usr/local/Library/Homebrew/global.rb:97:in `expand_path': user foo
  doesn't exist (ArgumentError)

However, `brew doctor` does its own expansion of PATH entries and
outputs warnings if this happens, so let's just ignore it here and
continue on our way.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-06 10:40:55 -05:00
Adam Vandenberg
1eb808c109 Homebrew 0.9.3 for superenv 2012-08-29 10:08:46 -07:00
Max Howell
24bcc694e5 Speed up brew instantiation
Adding MacOS.dev_tools_path to our PATH was slow. We no longer need to do this because of the previous commit making a script wrapper for git and svn. It was slow because the function calls out to lots of slow utilities to determine this path.
2012-08-29 12:41:36 -04:00
Jack Nagel
f471c3e99f MacOS.dev_tools_path: return nil if not found
This matches the semantics of other path methods, such as Xcode.prefix.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-20 15:00:32 -05:00
Jack Nagel
9b1bb58214 HOMEBREW_CONTRIB
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-20 13:57:01 -05:00
Jack Nagel
c9f824b54a Make Set available globally
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-12 00:58:31 -05:00
Brandon Black
bcde6432f3 Fix issues with writable? detection in brew doctor
Closes Homebrew/homebrew#13689.

Signed-off-by: Max Howell <mxcl@me.com>

There are subtle distinctions between writable? and writable_real? we don't
understand precisely why we need this, but it fixes the bugs :/
2012-08-06 22:02:38 -04:00
Jack Nagel
1050261316 Homebrew 0.9.2
0.9.2 includes the formula specs refactoring.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:55:25 -05:00
Jack Nagel
60b518278b Refactor PATH setup
- Make ORIGINAL_PATHS an array of Pathnames instead of strings
 - Append the dev tools path once in global.rb instead of build.rb

Closes Homebrew/homebrew#13075.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-29 00:55:01 -05:00
Adam Vandenberg
dcc2765947 Homebrew 0.9.1
Bump the version number due to the Xcode/CLT change.
2012-06-27 10:28:24 -07:00
Mike McQuaid
ef65f3654f Improve bug report wiki page text.
Fixes Homebrew/homebrew#12674.
2012-06-25 19:49:44 -05:00
samueljohn
725feb3db1 Core change: XCode only install, with CLT or both
Allow XCode without the Command Line Tools to
work with homebrew, so it's not necessary
to register an Apple Dev ID and/or go to the
XCode prefs and download the CLT. Yay!

Further, this commit allows to use the CLT
solely (without the need for XCode).
Saves quite some megs.
(Some furmulae require xcodebuild)

Of course XCode together with the CLT is still
fine and has been tested on 10.7 and 10.6
with Xcode 4 and Xcode 3.

Only on Lion or above, tell the user about the options,
which are
- Xcode without CLT
- CLT without Xcode
- both (ok, it's not directly stated, but implicit)
So if no Xcode is found and we are on Lion or above,
we don't fail but check for the CLTs now.
For older Macs, the old message that Xcode is needed
and the installer should be run is still displayed.
If the CLT are not found but Xcode is, then we
print out about the experimental status of this setup.

Closes Homebrew/homebrew#10510.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-24 19:11:06 -07:00
Mike McQuaid
0cbdeeaa3c Exit with bad exit code on command failures. 2012-03-29 18:44:37 +11:00
Jack Nagel
fa837edcbb Update Xcode version checks
Closes Homebrew/homebrew#11044.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-20 19:06:59 -05:00
Jack Nagel
f00099a179 Update issues URL
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-20 18:48:42 -05:00
Mike McQuaid
23b84ef732 Set MACOS_VERSION as 0 on non-OSX platforms. 2012-03-18 15:43:39 +13:00
Max Howell
a2e84e5e57 Homebrew 0.9 2012-03-16 21:09:00 +00:00
Max Howell
0f02354073 HOMEBREW_LIBRARY
I got fed up writing HOMEBREW_REPOSITORY/"Library" and also correcting mistakes when I did HOMEBREW_PREFIX instead.
2012-03-16 21:06:18 +00:00
Max Howell
6ded0d0cbb Use /Library/Caches/Homebrew
We don't penalise existing users; if ~/Library/Caches/Homebrew already exists and is writable, we select that.

This is the correct choice, the cache should be the same directory whichever user is used and whatever instance of brew is invoked.

The Cache directory is set to 0777 this allows any user to write to it and fixes Homebrew/homebrew#10857.
2012-03-14 00:05:46 +00:00
Adam Vandenberg
aef580261b Tell the user when build logs are copied 2012-03-09 18:48:23 -08:00