38364 Commits

Author SHA1 Message Date
Max Howell
28aef26a47 More docs for brew create generated formula tests
To assist those new to stuff.
2011-09-20 03:39:07 +01:00
Charlie Sharpsteen
d05478e85b formula.rb: Move cache dir creation to fetch
So that the cache directory will get created if the user runs `brew fetch`
instead of `brew install` as the first command.
2011-09-19 19:05:44 -07:00
Jack Nagel
ea30b66ced manpage: boldface --rebase option
This is consistent with how other options are displayed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 20:50:39 -05:00
Max Howell
e26797f471 Allow brew update --rebase 2011-09-20 02:30:31 +01:00
Jack Nagel
2be915db99 Remove brew-man documentation
It was extraneous, and useful only for maintainers and contributors. It
is currently documented on the External Commands page of the wiki.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 18:27:19 -05:00
Jack Nagel
783b71fa5a Improve external command documentation
In addition to a brief overview of what external commands are, add a
link to the wiki page where the real documentation resides.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 18:24:03 -05:00
Max Howell
6bd47cf0f9 Only try mirrors for CurlDownloadStrategies
Also adjust output text slightly for prettiness.

A possibly useful side effect here is safe_system has a defined Exception (subclassing RuntimeError) now.
2011-09-19 23:30:10 +01:00
Jack Nagel
1dc0775a15 Revert "Pretty-print the "Trying a mirror" message"
This reverts commit af8e3b5aeacdb10a412560e131d631ba733a8346.

Sorry for the noise.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 12:19:50 -05:00
Jack Nagel
9b3c22c7bd Pretty-print the "Trying a mirror" message
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 12:15:56 -05:00
Charlie Sharpsteen
aa6f96003b mirror support: External command for mirror tests
`brew mirror-check <formula...>` will process a list of Formulae and check
their mirrors to see if they are reachable and the MD5 sums are valid.
2011-09-19 09:25:02 -07:00
Charlie Sharpsteen
3ada407922 mirror support: Add test 2011-09-19 09:25:02 -07:00
Charlie Sharpsteen
9d19506ee9 mirror support: Add mirror method to Formula.rb
Mirrors can now be declared using the `mirror` method which works similar to
`depends_on` and takes the same arguments as `url`.

The formula class now has a public `fetch` method that cycles through the
mirror list if the downloader for the primary URL throws a `DownloadError`.
Other brew commands, like brew-fetch, also benefit from mirror support by using
this method.

Closes Homebrew/homebrew#7574.
2011-09-19 09:24:43 -07:00
Charlie Sharpsteen
ff7c886556 exceptions.rb: Add DownloadError
`DownloadError` is an exception that download stratigies can throw to indicate
that a fetch was incomplete due to a failure in communication.

The `curl` method in `utils.rb` has been upgraded to throw a `DownloadError` if
something bad happens to `curl` execution.
2011-09-19 09:21:36 -07:00
Jack Nagel
560fb2dbcb brew-missing: use name accessor on Formula objects
Commit 00cd16f changed oudated_brews to return a list of Formula
objects rather than a list of lists containing formula information.

Now we must access the formula name by using the 'name' accessor rather
than an array index.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-18 15:03:37 -05:00
Adam Vandenberg
3898010309 doctor: restore some line breaks 2011-09-16 10:05:11 -07:00
Charlie Sharpsteen
a404ceb29a brew-upgrade: Fix installation of dependencies
Fixes Homebrew/homebrew#7528.
Closes Homebrew/homebrew#7572.
2011-09-16 09:02:02 -07:00
Charlie Sharpsteen
2492c6564d 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
94dba21f7d 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
95ce00729c Check Cellar can be made before installing stuff
Refs Homebrew/homebrew#5188.
2011-09-15 10:57:22 +01:00
Jack Nagel
f4c301a827 audit: improve GNU url check
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 23:35:31 -05:00
Jack Nagel
ff9042f650 audit: correctly match SourceForge https URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 23:35:31 -05:00
Jack Nagel
d95e7079a2 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 Homebrew/homebrew#7613.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 22:26:36 -05:00
Charlie Sharpsteen
555b9d149f 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
Charlie Sharpsteen
5790935b12 brew-unpack: Apply patches and use formula options
`brew-unpack` now runs `Formula.brew` and copies the stage directory to the
unpack location. This provides two improvements:

  - Patches may be applied. The `patch` metho of the Formula class is
    overloaded such that patches are only applied if the `--patch` option is
    passed to `brew unpack`.

  - Formula can respond better to flags passed by `ARGV`.

Some trickery is pulled to ensure `DATA` is correctly set for each unpacked
formula.
2011-09-12 23:32:01 -07:00
Jack Nagel
b0f5566566 brew-options: add --installed flag
`brew options --installed` will print options for formulae that are
already installed.

Closes Homebrew/homebrew#7565.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-12 15:43:18 -05:00
Jack Nagel
346a973848 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
adb85c7f38 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
16f659451a Python easy_install just needs the package
adding 'install' to the command line breaks things

Closes Homebrew/homebrew#7489.

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

Closes Homebrew/homebrew#7507.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-09-11 09:44:49 -07:00
Jack Nagel
627a8463a6 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
536446b664 Use HTTPS during brew update
Closes Homebrew/homebrew#7527.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-10 16:24:51 -05:00
Max Howell
bf3433bde7 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 Homebrew/homebrew#6406.
2011-09-10 11:30:00 +01:00
Max Howell
0a0187feed Tune optimisations for sandybridge 2011-09-09 09:26:59 +01:00
Max Howell
c959b37227 The doctor notices modifications to Homebrew core
Refs Homebrew/homebrew#7525.
2011-09-09 09:24:16 +01:00
Chris Ledet
f1cd284f12 Add :sandybridge to hardware_family test
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-08 21:29:51 -05:00
Jack Nagel
2183372f65 Man page: clarify list command
Document the '--versions' option for `brew list`.
The two forms of the `list` command as previously documented clearly do
different things, but after documenting '--versions', their functions do
overlap a bit, so we combine them and clarify the different invocations.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-08 21:10:44 -05:00
Jack Nagel
16faf0684a Man page fixes
- Remove unnecessary linefeeds above "ENVIRONMENT"

 - Use the word "example" rather than "sample" to be more consistent
   throughout the documentation

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-08 20:53:07 -05:00
Filipe David Manana
fa43ec5b5e Fix default cache dir in man page
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-08 20:50:36 -05:00
Max Howell
b145d075c1 Check that /usr/bin/cc exists in brew doctor
Refs Homebrew/homebrew#7454.
2011-09-07 12:18:28 +01:00
Max Howell
d37918b20f If LLVM isn't installed then fails_with_llvm? is true
This makes sense, I assure you. Fixes Homebrew/homebrew#7458.
2011-09-06 17:51:23 +01:00
Max Howell
5dc302604f 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
06795b8953 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
65d4b2378a 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
6d075a3b17 Check even more carefully for xcode_version
Refs Homebrew/homebrew#7236, though honestly I just think @dsarch hasn't updated.
2011-09-05 18:54:07 +01:00
Max Howell
9cdfd2797f Fix nil handling in brew versions
Fixes Homebrew/homebrew#7392.
2011-09-05 09:44:53 +01:00
Max Howell
6283ca46b7 Use proper issue URL 2011-09-05 09:44:53 +01:00
Max Howell
0f3f0626d3 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
eb52b97a1e 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
74ee65466c Fix typo in brew doctor
Fixes Homebrew/homebrew#7383.

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

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

I added some comments.
2011-09-02 12:12:30 +01:00