Commit Graph
1065 Commits
Author SHA1 Message Date
Adam Vandenberg d43e3516d8 doctor: restore some line breaks 2011-09-16 10:05:11 -07:00
Charlie Sharpsteen 5b4d59d143 brew-upgrade: Fix installation of dependencies
Fixes #7528.
Closes #7572.
2011-09-16 09:02:02 -07:00
Charlie Sharpsteen 00cd16f866 Return Formula objects from outdated_brews
Previously, `outdated_brews` returned a list of lists---each containing three
components of a Formula object:

  - f.rack
  - f.name
  - f.version

Frequently more information is required which necessitates back-casting from
`name` to a Formula object---simpy returning formula objects removes this step.
2011-09-16 08:55:38 -07:00
Charlie Sharpsteen 06fbecbeae Centralize definition of rack in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it
gets defined and used quite a bit. This patch makes `rack` an official method
of the `Formula` class.
2011-09-16 08:55:38 -07:00
Max Howell a0b940acb7 Check Cellar can be made before installing stuff
Refs #5188.
2011-09-15 10:57:22 +01:00
Jack Nagel 98d2d45852 audit: improve GNU url check
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 23:35:31 -05:00
Jack Nagel 6e03814549 audit: correctly match SourceForge https URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 23:35:31 -05:00
Jack Nagel be7db9a453 Reset to remote master when updating git clones
When installing with --HEAD, cached repo clones do "git fetch origin"
followed by "git reset --hard". This will only reset the working tree
and index to the state of the local HEAD, but Homebrew will think it's
updated and install anyway. "git reset --hard origin/master" will
achieve the desired result.

Should fix #7613.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 22:26:36 -05:00
Charlie Sharpsteen c3565c8d4c formula_installer.rb: Call link before check_PATH
Otherwise, for formula that making the very first install into `sbin`, the
following line will fail with a critical error:

    bin = (HOMEBREW_PREFIX/bin.basename).realpath.to_s

Because `sbin` will not exist until after `link` runs.

This isn't very clean as it moves `check_PATH` away from the other checks in
`caveats`, but I couldn't think of a better hotfix that did not require a bit
of code shuffling and re-writing.
2011-09-13 19:40:51 -07:00
Jack Nagel 2313a4d2af brew-options: add --installed flag
`brew options --installed` will print options for formulae that are
already installed.

Closes #7565.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-12 15:43:18 -05:00
Jack Nagel c9e91196b2 audit: check GNU urls
We now prefer "ftpmirror.gnu.org" over the main FTP site.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-12 15:43:02 -05:00
Jack Nagel 80bd4a5294 brew-options: actually skip formulae with no options
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-11 16:25:20 -05:00
Kevin Moore be468a22fb Python easy_install just needs the package
adding 'install' to the command line breaks things

Closes #7489.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-09-11 12:23:31 -07:00
Kevin Moore 31f317128a UnsatisfiedExternalDependencyError: init error
Pass message and formula to super so useful output occurs.

Closes #7507.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-09-11 09:44:49 -07:00
Jack Nagel 1cf80272fc doctor: be more robust about git status check
`git status -s` would spit out "fatal: not a git repository" when not in
HOMEBREW_PREFIX or a child directory of HOMEBREW_PREFIX. Specify a
git-dir and work-tree to fix this.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-11 11:12:08 -05:00
Jack Nagel c333ab5444 Use HTTPS during brew update
Closes #7527.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-10 16:24:51 -05:00
Max Howell c1e354647f With xcodebuild don't set CC, CXX, etc.
The compiler setting in the xcodeproj is overridden by the CC setting in the environment. This is a bit insane IMO since the xcodeproj itself has detailed decisions about what tools to use.

Fixes #6406.
2011-09-10 11:30:00 +01:00
Max Howell 22ff383f99 Tune optimisations for sandybridge 2011-09-09 09:26:59 +01:00
Max Howell 67bc01e53e The doctor notices modifications to Homebrew core
Refs #7525.
2011-09-09 09:24:16 +01:00
Chris Ledet 34c731f093 Add :sandybridge to hardware_family test
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-08 21:29:51 -05:00
Max Howell 8a5633c4f2 Check that /usr/bin/cc exists in brew doctor
Refs #7454.
2011-09-07 12:18:28 +01:00
Max Howell 9c77b52d6e If LLVM isn't installed then fails_with_llvm? is true
This makes sense, I assure you. Fixes #7458.
2011-09-06 17:51:23 +01:00
Max Howell 44196242fa MacOS.default_compiler should return something always
Even though we are just guessing if it doesn't correspond to any of the others…
2011-09-06 17:12:26 +01:00
Max Howell d6c7f5c83e Allow :force for ENV.gcc
This is used with fails_with_llvm so that if GCC cannot be found (and we suspect this is the case with Xcode 4.2) the build will fail.

Quite possibly it should be the default.
2011-09-06 11:22:22 +01:00
Max Howell a50d53d1ad Remember compiler setting when it is changed via eg. ENV.gcc
Thus it will be correct after the setting is changed.
2011-09-06 11:22:22 +01:00
Max Howell af9fa3534e Check even more carefully for xcode_version
Refs #7236, though honestly I just think @dsarch hasn't updated.
2011-09-05 18:54:07 +01:00
Max Howell c32315b566 Fix nil handling in brew versions
Fixes #7392.
2011-09-05 09:44:53 +01:00
Max Howell a3556cd31f Use proper issue URL 2011-09-05 09:44:53 +01:00
Max Howell 3545a8d302 Don't look for llvm-gcc in xcode_prefix
Look in /usr/bin because all versions of Xcode install it to /usr/bin now and this allows us to support Xcode-less installs of Apple's developer tools.
2011-09-04 12:09:41 +01:00
Jack Nagel b6c74818f3 tests: actually use bzip for test tarball
I inadvertently gzipped it last night. That in itself doesn't cause any
tests to fail because the download strategy code is robust, but it's
fixed here anyway to be consistent. Basically, I'm dumb.

I also took the opportunity to remove the other resource fork file, so
the tarball is clean.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 11:45:56 -05:00
Daemian Mack 57a4091f59 Fix typo in brew doctor
Fixes #7383.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 10:00:15 -05:00
Justin Hileman e0f2a274fa Allow 'brew link' to work with URL-based formulae
Closes #7373.

Signed-off-by: Max Howell <max@methylblue.com>

I added some comments.
2011-09-02 12:12:30 +01:00
Max Howell e02e7f853e Handle brew upgrade ARGV errors properly
Fixes #7304.
2011-09-02 12:12:30 +01:00
Max Howell dba935707c Guess Xcode version if xcodebuild doesn't exist 2011-09-02 12:12:30 +01:00
Max Howell 8e88b22fd1 Remove Xcode dependence from ENV.rb
Fixes #7329.
Fixes #7269.
Fixes #7236.

Also quite a lot of tidy. This should all work fine.

I think we only started referring into xcode_prefix because LLVM used to not
be linked into /usr/bin. But for sure this is no longer true. If someone out
there doesn't link cc etc. into /usr/bin then I guess we can revise this patch
but it's not something we officially supported before, it was just an
accident.

I added a test step in the init code so that a working compiler will always be
selected. This is mainly a fallback for old Xcodes. Though a comment in
another area of the code suggested Xcode 3 on 10.5 doesn't have LLVM so…
2011-09-02 12:12:20 +01:00
Jack Nagel 3f4ef7e275 tests: fix failing test_a_basic_install
The test_a_basic_install was failing because it expected
libexec.children.length to be 1, when in fact there were two files in
the untarred libexec: NOOP, and the Mac OS X resource fork file ._NOOP.

That file is now removed, and the test passes.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 01:20:56 -05:00
Jack Nagel 2d7926c307 update: bring tests up-to-date
The tests for update have been neglected during the last few rounds of
changes, so fix them up.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 00:55:20 -05:00
Jack Nagel 75a6e29d97 fetch: fix '--force' for pathnames
`brew fetch --force` was a no-op for formula pathnames when that formula
did not exist in Library/Formula, because `brew --cache #{f.name}`
results in an error for that case.

Fix it by always using f.cached_download.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-01 19:17:13 -05:00
Adam Vandenberg 88849ddce0 Edit port/fink warning 2011-09-01 10:14:26 -07:00
Adam Vandenberg 279a1dea3d Edit port/fink warning 2011-09-01 10:08:21 -07:00
Adam Vandenberg 639fb74127 Fix stripping of keg-only reasons during install 2011-09-01 10:06:28 -07:00
Adam Vandenberg b90f374da3 add brew doctor check for spaces in Xcode path 2011-09-01 09:39:31 -07:00
Max Howell ecbd8abac2 Use GCC if we tested against the latest LLVM
Latest is hardcoded, so we'll have to update as new Xcode's come along.
2011-09-01 14:33:54 +01:00
Max Howell 278c11fc9f Actually obey --use-gcc flag
Schoolboy error.
2011-09-01 14:17:29 +01:00
Dave Bayer 60e2fad5bb fix: svn update doesn't take url argument
`svn up` doesn't take url argument; compare `svn help up` to `svn help checkout`
Apparently `svn up` can ignore this argument (not documented), but providing this
argument could confuse code readers into believing that changing the url will
switch the branch. It doesn't; the argument is ignored.

This fix was relayed to me, but I've studied it further before posting.
It is related to the bug where --HEAD installs reuse the wrong cache.
Reading the former code, one might hope that providing a changed URL would
have `svn up` change branches. It doesn't; the url was ignored.

Closes #7159.

Signed-off-by: Max Howell <max@methylblue.com>
2011-09-01 14:03:01 +01:00
Dave Bayer 7fe2ee8382 Fixes #7114; Cache confuses --HEAD and non--HEAD svn installs
Signed-off-by: Max Howell <max@methylblue.com>
2011-09-01 14:01:41 +01:00
Max Howell d3aeae5359 Be future proof, output from file becomes more verbose
New versions of file return `script, ASCII text executable`. Apple may ship the newer version with 10.8 so we may as well be ready for it.
2011-09-01 12:53:46 +01:00
Max Howell 686f727f94 Use fullpaths to file and strip
Fixes #7353.
2011-09-01 12:08:30 +01:00
Max Howell fbb811b948 Allow fails_with_llvm {}
And fix node and ruby to use LLVM without complaint with Xcode 4.1 and Lion.
2011-09-01 10:29:31 +01:00
Max Howell aacd0bed58 cp CMakeCaches.txt not CMakeLists.txt
CMakeLists.txt is the build instructions not the build logs. The cache is not much better, but there is no equivalent of config.log, so…
2011-09-01 10:28:45 +01:00