2249 Commits

Author SHA1 Message Date
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
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
Jack Nagel
ee485b16e7 Make VCS download strategies work without user paths
Closes Homebrew/homebrew#15139.

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

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-28 09:30:01 -05:00
Max Howell
cddc3649a7 Safer way to redirect puts to a file 2012-09-28 09:49:05 -04:00
Max Howell
7a75915345 Only handle build-errors when it's a build-error
Refs Homebrew/homebrew#15164.
2012-09-28 09:37:38 -04:00
Jack Nagel
cc932ca668 Fix hg strategy under stdenv
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 17:59:01 -05:00
Jack Nagel
7e6c274f81 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
dd4302ae9b 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
1b2e19d425 Adjust test expectation for 'LD'
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 16:24:04 -05: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
8d3ff5691d Fix conditional
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 16:21:39 -05:00
Misty De Meo
61ccf12e85 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 Homebrew/homebrew#15164.
2012-09-27 15:39:24 -05:00
Max Howell
5f8047e9a4 When builds fail verbosely, be verbose 2012-09-27 15:39:35 -04:00
Misty De Meo
38283eafb2 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 Homebrew/homebrew#14710.
2012-09-27 09:52:06 -05:00
Misty De Meo
3633995fc9 stdenv: stop setting LD
superenv stopped setting LD in
8e4c0a141171666270529da4be026d529d474467, seems sensible to follow
suit in stdenv too.

See Homebrew/homebrew#14943.

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

Fixes Homebrew/homebrew#15078.
2012-09-25 11:31:56 -04:00
Max Howell
a217b03952 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
1100818100 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 Homebrew/homebrew#15077.
2012-09-24 11:41:21 -04:00
Max Howell
bda8bb08e3 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 Homebrew/homebrew#15077.
2012-09-24 11:09:13 -04:00
Max Howell
ca14962ab9 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
82c58bb615 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
Max Howell
bcf0d6f245 superenv: Remove HOMEBREW_PREFIX/bin from PATH
We add the bins from all deps instead. Rationale: formula find and use eg. GNU-coreutils versions of things and then break. Only allow formula to use tools that they depend on and expect.

I want to go further and only add include paths etc. for dependencies, I have done some work on this, but I fear it may be impossible. If an include path is eg. /usr/local/lib/foo/include, is it possible to know if this path is bad? Not always AFAICT.
2012-09-23 21:26:50 -04:00
Max Howell
a0df6180b7 Set DEVELOPER_DIR; Fixes bad xcode-select path
In cases where the xcode-select -print-path is '/' xcrun still hangs indefinitely, setting DEVELOPER_DIR to something (preferably the Xcode path) fixes that. So let's.
2012-09-23 20:57:41 -04:00
Max Howell
4973329a60 brew cleanup -n: less scary 2012-09-22 00:29:17 -04:00
Max Howell
6e4a01c70a brew --env: Use fetch rather than []
Because we mess with the return value from [] in superenv due to many formula assuming CFLAGS etc. would not be nil.
2012-09-21 23:30:34 -04:00
Max Howell
d147a4b989 superenv: don't set LD
Some compile issue will no doubt elapse, but we can address these on a case-by-case basis.

Refs Homebrew/homebrew#14943.
2012-09-21 23:22:35 -04:00