14765 Commits

Author SHA1 Message Date
Jack Nagel
741a4168d0 SoftwareSpec: simplify conditional 2012-08-18 11:12:09 -05:00
Jack Nagel
e57122780e Add Version#detected_from_url? 2012-08-18 11:12:09 -05:00
Jack Nagel
329f0a8490 Replace version strings with Version objects 2012-08-18 11:12:08 -05:00
Jack Nagel
43dc54e8b9 Further version test refactoring 2012-08-18 11:12:08 -05:00
Jack Nagel
5fe7fdf153 Move version detection to Version class
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 11:12:07 -05:00
Jack Nagel
956c1d653a Initial version comparison implementation
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 11:12:07 -05:00
Jack Nagel
969ce2f67d Preliminary version test refactoring 2012-08-18 11:12:07 -05:00
Jack Nagel
104fc0e09b Add Version class 2012-08-18 11:12:07 -05:00
Jack Nagel
1a8d535721 Add Xcode 4.4.1 to standard compilers map
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-17 22:38:32 -05:00
Jack Nagel
b3724b2945 Remove executable bits from audit.rb and bottle.rb
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-17 21:09:12 -05:00
Max Howell
ad02ea74da Fix syntax error, sorry about that.
Didn't test properly, it was a side-fix. Bad mxcl.
2012-08-17 18:00:33 -04:00
Max Howell
6ffe27fa98 Stop warning about CLT w/o Xcode
Also made the latest_versions checks smarter. Hopefully correct too.
2012-08-17 17:18:17 -04:00
Max Howell
01bf892ef8 Forgot to remove install_homebrew.rb
It's now in the go branch.
2012-08-17 17:10:59 -04:00
Adam Vandenberg
4a948c4132 Add special :xcode dependency
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-17 15:35:54 -05:00
Jack Nagel
ac51c0ffbb Increment copyright year in LICENSE
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-17 13:38:26 -05:00
Jack Nagel
83cdc64b40 FormulaInstaller: filter ARGV when testing for installed deps
In FormulaInstaller#install, needed_deps is created without first
filtering ARGV for flags like --HEAD. In practice, this means that
sometimes needed_deps will contain dependencies that are actually
already installed; --HEAD causes Formula#installed_prefix to differ and
thus checking Formula#installed? will result in false negatives.

This can trigger weird bugs; for example, Homebrew/homebrew#10380, where the "Installing
foo" header is displayed even though no dependencies were previously
installed.

Fix this by filtering ARGV before testing for installed dependencies,
and do the same for requirements to maintain symmetry, and because some
requiremnts check Formula#installed? as well.

Fixes Homebrew/homebrew#10380.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-15 22:39:52 -05:00
Jack Nagel
140dc4c419 Don't print an empty line if all requirements are satisfied
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-14 23:30:15 -05:00
Jack Nagel
c38bc4fd67 Recursively expand requirements in FormulaInstaller
Currently FormulaInstaller "forgets" about the requirements of
dependencies, as dependencies are recursively expanded by the first
FormulaInstaller instance, and then ignored by subsequent instances to
prevent duplicate installation attempts. These requirements then have
their messages displayed, but the fatal check is skipped and thus no
exception is raised.

Now that we have Formula#recursive_requirements, we can mirror what we
are doing with dependencies and recursively expand requirements up
front.

While at it, fix a bug in determining Requirement equality that resulted
in unique requirements being eliminated from a formula's set of
recursive requirements.

Fixes Homebrew/homebrew#12290.
Fixes Homebrew/homebrew#14084.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-14 23:26:50 -05:00
Jack Nagel
53cf970312 build: expand requirements recursively when modifying ENV
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-14 22:35:28 -05:00
Jack Nagel
120ce10730 --config: remove confusing XQuartz annotation
Apple's X11 is XQuartz, but this can be confusing, and is ultimately
unnecessary for debugging purposes.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-14 15:04:55 -05:00
Max Howell
3dec84de8a Improve libiconv diagnostic and suggestion
This is coming up a lot at the moment, so here is an attempt to be more helpful.
2012-08-14 11:46:18 -04:00
Max Howell
fef6d5b8c0 brew doctor -D (diagnostic-dump)
-D is now the switch for diagnostic-dumps. Let it be so.

Shows how long each doctor method takes in a sorted table at end. I used this to move the two slowest methods to the end of the doctor run so that as much useful information can be shown as quickly as possible.

Also now possible to specify on command line which tests should be run.
2012-08-14 11:46:18 -04:00
Max Howell
9fffbde987 brew irb fix
Broke when I removed `require 'formula'` from ARGV.rb.
2012-08-14 09:14:26 -04:00
Misty De Meo
a3ca4f0872 options: Print "--" in option name for --compact
This was a regression which caused the bash completion script to
fail to complete formula options.
2012-08-13 12:45:53 -05:00
Max Howell
88e79a9098 Uninstall keg if error during build & tab creation
Previously if error occurred in code around the logic you'd get a keg that is installed without a tab, which breaks brew.
2012-08-13 10:14:59 -04:00
Max Howell
28ee57aa3c Don't fail if ENOENT 2012-08-13 10:14:59 -04:00
Max Howell
ad80c616b8 brew cleanup removes .DS_Store files
Probably slow, but we hate these fuckers.
2012-08-13 10:14:59 -04:00
Max Howell
b0e50ba13d Formula.select and Formula.installed 2012-08-13 10:14:59 -04:00
Max Howell
3d657746bb Encourage clicks on issues link 2012-08-13 10:14:59 -04:00
Jack Nagel
a054dc5019 Add :when_xquartz_installed as a keg-only reason
Using :when_xquartz_installed will tell the keg-only machinery to activate
if XQuartz is installed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-12 17:28:15 -05:00
Jack Nagel
f970f9ec60 Refactor brew audit 2012-08-12 13:58:14 -05:00
Jack Nagel
8952bcf315 Fix writing build options to install receipt
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-12 13:37:40 -05:00
Max Howell
33ec48a394 Don't require the WHOLE of Homebrew from ARGV.rb
This was slowing down every instantiation of brew significantly.

Hopefully doesn't break anything that had become accustomed to not having to require 'formula' or 'keg'.

/cc @mikemcquaid
2012-08-12 11:40:55 -04:00
Jack Nagel
8818e008e3 tests: require string extension before exceptions
exceptions.rb now needs String#undent when it is loaded.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-12 01:02:37 -05:00
Jack Nagel
0549a9ab05 BuildOptions: store option tuples in a Set
As options are stored in an object owned by the eigenclass of a formula,
options defined in the Formula#options method can be added multiple
times if the formula is instantiated multiple times.

Store them in a set to prevent duplicates.

Fixes Homebrew/homebrew#14133.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-12 00:58:48 -05:00
Jack Nagel
c9f824b54a Make Set available globally
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-12 00:58:31 -05:00
Misty De Meo
d1c0d4c879 Fix normalization of old- and new-style options
When combining the set of old-style and new-style options, make sure
that the leading "--" is stripped.

Fixes displaying options in `brew options`, and the exotic case of
declaring options using the old syntax and then checking them with
`build.include?`
2012-08-11 16:54:03 -05:00
Misty De Meo
5882ae901f options: Don't add "--" to options that have it 2012-08-11 14:13:40 -05:00
Mike McQuaid
5c79d5884a Don't warn uses on :fails_with compiler blocks.
Fixes Homebrew/homebrew#14121.
2012-08-11 17:19:43 +01:00
Jack Nagel
c5eb0b880a options: fix missing leading "--" in output
Closes Homebrew/homebrew#14124.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-11 10:29:21 -05:00
Adam Vandenberg
bd1a7e2690 remove trailing whitespace 2012-08-10 07:23:48 -07:00
Max Howell
45b84df1bd Be more verbose when users insist on being sudoers
If you google for "Cowardly refusing to sudo brew" you get a lot of confused users who didn't read any of the Homebrew documentation and then had a hissy-fit.
2012-08-10 09:33:44 -04:00
Jack Nagel
f5eaef0aee Deprecate ancient formula syntax
Closes Homebrew/homebrew#13444.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-09 23:56:54 -05:00
Adam Vandenberg
2104510b63 New style is for option descriptions to not end with periods 2012-08-09 21:35:56 -07:00
Adam Vandenberg
928734c0bd Document dependencies.rb 2012-08-09 20:32:57 -07:00
Misty De Meo
d58fc0c2e4 dev_tools_path: Don't trust exit status of xcrun
A user on IRC was getting strange results from MacOS.dev_tools_path.
It turns out that xcrun's exit status is not always reliable - if
xcrun is a shim and not able to locate the real xcrun, it will exit
0 despite not actually doing what it was asked. Instead check to see
if the stout is empty.
2012-08-09 16:33:49 -05:00
Misty De Meo
ab80dfc5b7 create: Fix indentation for :x11 dep 2012-08-09 16:33:49 -05:00
Adam Vandenberg
ac9bc89bb3 Remove options audit check 2012-08-09 12:52:05 -07:00
Adam Vandenberg
e196c845bf Fix info/options for new options dsl 2012-08-09 09:24:27 -07:00
hazz
60bdb16a7c Run each search_tap in a separate thread to speed things up.
Closes Homebrew/homebrew#14066.

Signed-off-by: Max Howell <mxcl@me.com>
2012-08-09 11:58:58 -04:00