2563 Commits

Author SHA1 Message Date
Adam Vandenberg
1b991c5aae formula: shorten path helpers 2012-10-28 08:54:54 -07:00
Camillo Lugaresi
18dbe47f9f debrew: formula debugging for homebrew
A new feature for easing the pain of working with complex formulas, or
formulas for large packages. When running brew in debug mode (-d), if an
exception propagates outside the formula's install method, you now get a menu
which lets you return to the point where the exception was raised and perfom
several useful actions, such as:
- printing a backtrace
- entering IRB to examine the context and test ruby code
- entering the debugger (if ruby-debug is available)
- entering a shell
- ignoring the exception or proceeding with the raise as normal

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

* Fixed conflict in build.rb.
* Removed old debug handling in Formula.brew.

Closes Homebrew/homebrew#10435.
2012-10-28 11:39:02 -04:00
Max Howell
f6091b1c85 Specify where to get the CLT package 2012-10-28 10:52:07 -04: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
Max Howell
a967f5c82a Use cc -E, not cpp -E. Fixes Homebrew/homebrew#15402. 2012-10-28 10:52:06 -04:00
Adam Vandenberg
73b3977ab4 Pathname: add exec and jar helpers
Closes Homebrew/homebrew#13318.
2012-10-27 19:28:42 -07:00
Jack Nagel
267ffddbd3 tests: define assert_empty for Ruby <= 1.8
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25 22:09:23 -05:00
Jack Nagel
762c355b30 ComparableSet#merge returns self
Set#merge is supposed to return self, and Formula#recursive_requirements
depended on this being true.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25 15:54:55 -05:00
Jack Nagel
07d9adc295 test_cleaner: add missing require
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25 14:29:43 -05:00
Jack Nagel
d1f754c02e Allow requirements to record tags
To allow

  depends_on :x11 => :optional

and friends to work as expected, make requirements record any tags and
add special handling to the X11Dependency to record both a minimum
version and additional tags.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25 14:28:53 -05:00
Jack Nagel
a1af5a6cc3 Move requirement subclasses to a separate file
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25 12:51:36 -05:00
Jack Nagel
e1da727a4e FormulaInstaller: disambiguate show_header usage
show_header should default to false (we don't want to display it in the
case of installing a single formula without dependencies), but it only
worked this way by accident.

The assignment "show_header = true" creates a local variable named
show_header, and in the case where needed_deps is empty and this
assignment is not actually executed, the latter usage evaluates the
local variable instead of calling the method.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-24 22:59:24 -05:00
Jack Nagel
96844850b4 Return the block value in ARGV.filter_for_dependencies
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-24 17:54:16 -05:00
Adam Vandenberg
babf25af1a doctor: check that Xcode prefix actually exists
Closes Homebrew/homebrew#14373.
2012-10-24 11:16:57 -07:00
Adam Vandenberg
fd1fd78a94 Cleaner: add (commented-out) debugging information for permission changes
The cleaning step changes permissions on files. Added a commented-out block
that will show permission changes when doing verbose builds.

Since this output is not generally useful for even normal verbose builds,
added as commented-out code (I'm sorry) so that maintainers can uncomment
it when this functionality is needed for debugging.
2012-10-24 09:20:56 -07:00
Adam Vandenberg
ec24f6528d Make --ignore-dependencies work again 2012-10-23 16:05:01 -07:00
Misty De Meo
18f5bf1092 Fix Keg tests
* unreverse expected/actuals
* don't assume linked file order is guaranteed - it wasn't!
2012-10-23 17:10:12 -05:00
Adam Vandenberg
e99ca2d59f Add relinking instructions.
Closes Homebrew/homebrew#15488.
2012-10-22 12:27:17 -07:00
Adam Vandenberg
6283246691 Latest Xcode is 4.5.1 2012-10-22 10:01:24 -07:00
Adam Vandenberg
4cbf036c17 Allow varags to skip_clean 2012-10-21 13:24:02 -07:00
Adam Vandenberg
b25740d61c audit: loosen ARGV check 2012-10-21 13:24:00 -07:00
Misty De Meo
447f78c0d2 brew ln --force is now brew ln --overwrite
* Renames --force to --overwrite, freeing up brew ln --force for Homebrew/homebrew#13349
* Changes --dry-run to preview linking by default, rather than
  overwriting. An overwrite dry-run can be simulated via both
  --dry-run --overwrite
* Adds some basic Keg tests
2012-10-20 21:00:46 -05:00
Adam Vandenberg
7b08e5a05c Sanity check 2012-10-19 18:56:18 -07:00
Mike McQuaid
425440de3b Add Jenkins version matching (and test). 2012-10-16 10:31:35 +01:00
Jack Nagel
55fabe36e0 brew-unpack: don't attempt to mv the build directory
When the current working directory is the root of the build tree, copy
it instead of moving it, otherwise an exception will be raised when we
try to clean up the build tree later.

Noticed when unpacking the vim source tree from a mercurial checkout.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-16 00:56:55 -05:00
Jack Nagel
73b7c52673 Reduce code footprint of standard compilers map
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-15 18:17:22 -05:00
Jack Nagel
ca45225fad Flatten share_mkpaths
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-15 18:03:07 -05:00
Jack Nagel
39ec66614b Test coverage for DownloadStrategyDetector
While at it, make it use class methods instead; no reason to instantiate
an object for this.

Eventually there should be some functional tests for the individual
strategies as well.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-15 17:45:48 -05:00
Jack Nagel
bab29bab72 GitDownloadStrategy: avoid unnecessary checkout
By default, git checks out the fetched ref after cloning the repo, but
this is unnecessary as we explicitly check out the desired ref during
staging. This also silences some unnecessarily confusing output.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-15 15:29:23 -05:00
Jack Nagel
799c164cd9 GitDownloadStrategy: silence checkout actions in non-verbose mode
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-15 15:29:23 -05:00
Jack Nagel
a0e575e5b6 GitDownloadStrategy: silence status check
"git status -s" is used to detect if the repository was corrupted during
an interrupted clone, but it can leak output to the terminal, so use
quiet_system.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-15 15:29:23 -05:00
Misty De Meo
bbfb6400c7 Manage Requirements using ComparableSet
ComparableSet only allows a single object of a given class,
choosing the object with the greatest value. This was mainly created
for Requirements, so that, e.g., two X11Dependencies of differing
strictness don't both end up in the same requirement set.

Fixes Homebrew/homebrew#15240.
2012-10-15 09:46:29 -05:00
samueljohn
3fb5dfbd7b wxwidgets: A more common name for wxmac.
- Change the blacklist to hint that we include wxpython with wxwidgets.

Closes Homebrew/homebrew#15407.

Signed-off-by: Max Howell <mxcl@me.com>
2012-10-11 09:25:59 -04:00
Jack Nagel
35c47f81f2 Don't munge tapped formula names in Formula.factory
This started happening as a result of bbc167b, which avoids reloading
previously defined formulae. The exception alters its message if the
name parameter appears to be a tapped formula, but this is lost if we
only pass in the "stem" of the pathname.

Long-term this probably needs some restructuring, perhaps with a
separate exception for tapped formula, but for now this should re-enable
the more useful error message.

Fixes Homebrew/homebrew#15374.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-09 14:49:38 -05:00
Jack Nagel
f2b6ec0bfc Advise brew update before filing issues about compiler versions 2012-10-06 13:20:19 -05:00
Christian Schlensker
a6003d08f6 pluralize the word 'Formula' in reports
Closes Homebrew/homebrew#15321.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-10-05 20:16:06 -07:00
Misty De Meo
dbdf2c78c3 Don't count mkpath in ObserverPathnameExtension
mkpathed directories aren't really "linked" or "unlinked" per se,
and link/unlink handle directories differently. It's easier just to
ignore them, which finally synchronizes link/unlink counts.
2012-10-04 21:37:37 -05:00
Misty De Meo
0f2fe4a61b Keg#unlink: use ObserverPathnameExtension
#link was using the extension but #unlink wasn't, so the counting
criteria were potentially different and `brew unlink` was ignoring
--verbose.
2012-10-04 21:37:37 -05:00
Misty De Meo
a1f6f590d2 Keg#unlink: check file comes from the right keg
For real this time.

This makes sure that files won't be unlinked if they resolve into 
other kegs. For example: if fish and fishfish are both installed, 
with fishfish linked and fish unlinked, `brew unlink fish` would 
unlink some files that resolve into fishfish's keg.
2012-10-04 21:37:36 -05:00
Jack Nagel
736717cf24 Add Xcode 4.5.1 to compiler map
Closes Homebrew/homebrew#15282.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-03 22:14:03 -05:00
Adam Vandenberg
d88158b9fe doctor: fix iconv dylib name 2012-10-03 12:41:20 -07:00
Mike McQuaid
53b387987b Fix use of ISSUES_URL. 2012-10-03 00:04:24 +01:00
samueljohn
33b2a29e14 Replace mentions of easy_install by pip
Use this chance to correct minor typos.

Closes Homebrew/homebrew#15242.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-10-02 08:29:21 -07:00
Max Howell
3cb7a02beb superenv: Add brewed-python bin to PATH
A required special case since formula that use python can optionally use system python or Homebrew python. We'll probably need more of this sort of thing.
2012-10-01 09:40:40 -04:00
Mike McQuaid
b30454d3be Don't use bottles for HEAD, devel or universal. 2012-09-30 22:26:33 +01:00
Jason A. Donenfeld
9601b753fd Add .sh to list of valid library extenions.
As discussed with mistym, it's not only compiled code that goes in
/usr/lib, but any types of libraries. As such, .pm was added to the
valid extensions list a while back. Unfortunately, .sh was not added,
even though configuration includes and platform function library shell
files are often put in /usr/lib as shellscript libraries. This patch
adds .sh to the list of valid library extensions.

Closes Homebrew/homebrew#14993.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-09-30 10:54:29 -07:00
Jack Nagel
1027093eae tests: set newly-visible global constants
The changes to error ouput and logging require a few more things to be
visible during installation tests.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-29 12:14:57 -05:00
Max Howell
64927a45ef Restore HOMEBREW_LOG functionality 2012-09-29 09:57:37 -04:00
samueljohn
532c849b58 python goes superenv
- Install a sitecustomize.py that is only executed for brewed
  python to
  -  Fix the prefix, python thinks it is installed to.
     (Remember, Python thinks it lives in the Cellar)
  -  Remove "/System/..." stuff from sys.path which caused
     a lot of install trouble because setuptools has the
     habbit to inject itself upfront, overwriting our distribute.
- Allow --with-poll and don't say, we didn't warn you.
- Don't need depends_on :x11 any longer. Yeah, no XQuartz!
- Add --with-brewed-openssl
- pip 1.2.1
- pip, pip-2.7, easy_install and easy_install-2.7 are installed
  to prefix, such that they are directly available, even if
  people have not set their PATH to include
  $(brew --prefix)/share/python
- Caveats shorter and clear.
- For Xcode-only:
  - Patch the distutils buildsystem to use "xcrun cc" etc.
  - Teach distutils the MacOS.sdk_path (for incs and libs)
- superenv.rb add the right python include dir depending on
  whether a brewed python is installed or not.

Closes Homebrew/homebrew#15064.

Signed-off-by: Max Howell <mxcl@me.com>
2012-09-29 09:43:39 -04:00
Jack Nagel
36dc701cfb Remove extra newline
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-28 21:06:48 -05:00