Commit Graph
2104 Commits
Author SHA1 Message Date
Mike McQuaid 20851b9c01 Add Jenkins version matching (and test). 2012-10-16 10:31:35 +01:00
Jack Nagel 9ca734097e 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 6ccd4a9a45 Flatten share_mkpaths
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-15 18:03:07 -05:00
Jack Nagel 761acc47a7 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 c9d54c1724 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 4100fc549d 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 b75e31e0c8 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 71ef411c22 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 #15240.
2012-10-15 09:46:29 -05:00
samueljohn 88f2347dfa wxwidgets: A more common name for wxmac.
- Change the blacklist to hint that we include wxpython with wxwidgets.

Closes #15407.

Signed-off-by: Max Howell <mxcl@me.com>
2012-10-11 09:25:59 -04:00
Jack Nagel 943bff10d4 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 #15374.

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

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-10-05 20:16:06 -07:00
Misty De Meo f899878220 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 2834ccc8dc 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 b11de18053 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 119f8fac51 Add Xcode 4.5.1 to compiler map
Closes #15282.

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

Closes #15242.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-10-02 08:29:21 -07:00
Max Howell 50417c1246 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 a32ecf4cb3 Don't use bottles for HEAD, devel or universal. 2012-09-30 22:26:33 +01:00
Jason A. Donenfeld 76d5ba32a9 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 #14993.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-09-30 10:54:29 -07:00
Jack Nagel eeac119622 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
samueljohn 8f0c5f7958 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 #15064.

Signed-off-by: Max Howell <mxcl@me.com>
2012-09-29 09:43:39 -04:00
Jack Nagel f899ab1e21 Remove extra newline
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-28 21:06:48 -05:00
Jack Nagel cac62ddf4b Make VCS download strategies work without user paths
Closes #15139.

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

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-28 09:30:01 -05:00
Max Howell c61daa969c Safer way to redirect puts to a file 2012-09-28 09:49:05 -04:00
Max Howell 29ea04e12b Only handle build-errors when it's a build-error
Refs #15164.
2012-09-28 09:37:38 -04:00
Jack Nagel fd5be35f1e Fix hg strategy under stdenv
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 17:59:01 -05:00
Jack Nagel 4b79622dd2 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 71dbaaae1b 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 3d97092ab3 Adjust test expectation for 'LD'
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 16:24:04 -05:00
Jack Nagel d02c001f96 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 1c6caaff83 Fix conditional
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 16:21:39 -05:00
Misty De Meo 07e202ab79 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 #15164.
2012-09-27 15:39:24 -05:00
Max Howell 1ed0eb1dc3 When builds fail verbosely, be verbose 2012-09-27 15:39:35 -04:00
Misty De Meo f94f56239a 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 #14710.
2012-09-27 09:52:06 -05:00
Misty De Meo 7d15eda4a4 stdenv: stop setting LD
superenv stopped setting LD in
8e4c0a1411, seems sensible to follow
suit in stdenv too.

See #14943.

Fixes #15090.
2012-09-26 13:22:30 -05:00
Misty De Meo e62d3ae5a7 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 4a554dd5b2 ENV.fortran adds back superenv removed PATHs
Fixes #15103.
2012-09-25 12:04:42 -04:00
Max Howell 074d426886 Don't unset DEVELOPER_DIR if set 2012-09-25 11:31:56 -04:00
Max Howell b05e9c18f9 MercurialDownloadStrategy can find hg again
Was broken after superenv PATH modification.

Fixes #15078.
2012-09-25 11:31:56 -04:00
Max Howell 1fc68c62d8 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 023f2bd85b 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 #15077.
2012-09-24 11:41:21 -04:00
Max Howell 9de4b5f030 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 #15077.
2012-09-24 11:09:13 -04:00
Max Howell 7b717655f4 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 00e0b35631 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