4907 Commits

Author SHA1 Message Date
Max Howell
b98c4792d0 Doctor check for unlicensed Xcode
Checking the license text is probably the most future proofed method. Though for future reference other possible methods are listed in the below ticket.

Closes Homebrew/homebrew#14558.
2012-08-31 10:22:11 -04:00
Max Howell
d39b7b6b99 brew --env puts HOMEBREW_SDKROOT 2012-08-31 10:22:10 -04:00
Max Howell
113ed85e8d More brew irb examples 2012-08-31 10:22:10 -04:00
Max Howell
e7c05f558b String.f convenience function for brew irb
eg. "ack".f
2012-08-30 22:54:45 -04:00
Jack Nagel
20fdc5cd2f Simplify brew outdated even further
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-30 20:39:46 -05:00
Max Howell
bdd6193587 brew sh: a shell with superenv loaded
If you need to build software on OS X by hand, a brew shell is the way to do it.

Closes Homebrew/homebrew#14381.
2012-08-29 12:41:38 -04:00
Max Howell
b834027b17 Doctor suggest git clean -f if unstaged files
This is safe, I tested various scenarios, including Homebrew installed in ~. The only files that are removed are unexpected files in Homebrew's already managed directories.
2012-08-29 12:41:37 -04:00
Max Howell
672388d4f7 Always find git and svn without trying hard
Two wrapper scripts that find git and svn using the ENV variables we support and then searching through the PATH and looking inside Xcode.app if necessary.

Now just calling git or svn in Homebrew code will find and exec the right tool and we can stop fussing.

Apologies to @adamv who is probably unimpressed that the cmds directory has non-commands in it now. If it's consolation these are temporary pending some more work on superenv whereby some more directories are created under the superenv root.
2012-08-29 12:41:36 -04:00
Max Howell
fb8c7e0aaf Allow eg. brew --env libxml2
Example useful usage:

    eval $(brew --env gettext) && clang -Wl,-t -lssl 2>/dev/null
2012-08-29 12:41:35 -04:00
Max Howell
65d195dcaa superenv: build-environments that just work
1. A minimal build environment, we don't set CFLAGS, CPPFLAGS, LDFLAGS, etc. the rationale being, the less that is set, the less variables we are introducing that can break builds.
2. A set of scripts that replace cc, ld, etc. and inject the -I, -L, etc. flags we need into the args passed to the build-tools.

Because we now have complete control over compiler instantiations we do a variety of clean-up tasks, like removing bad flags, enforcing universal builds and ensuring makefiles don't try to change the order of library and include paths from ones that work to ones that don't.

The previous ENV-system is still available when --env=std is specified.

superenv applies to Xcode >= 4.3 only currently.
2012-08-29 12:41:34 -04:00
Max Howell
05b91e3d29 Figure out if we can cleanup keg-only kegs 2012-08-29 12:41:33 -04:00
Max Howell
f02d81ecbf Create active symlinks for installed formula
Similar to the LinkedKegs record, we write a symlink for installed kegs to PREFIX/opt.

Unlike the linked-keg record, unlinking doesn't remove the link, only uninstalling, and keg-only formula have a record too.

The reason for this addition is so that formula that depend on keg-only formula can build against the opt directory and not the cellar keg. Thus surviving upgrades.

To enforce this fix_install_names and built were adapted to use the opt path.

Standard kegs also create an opt symlink so that caveats can now refer to the opt directory and thus provide steps that survive upgrades too.

Thus the choice of /opt. It is short, neat and the right choice: POSIX dictates that opt is for stand-alone prefixes of software.
2012-08-29 12:41:33 -04:00
Adam Vandenberg
c1220975b9 Refactor brew list 2012-08-28 10:59:46 -07:00
Adam Vandenberg
516041dba8 brew list: check for Cellar
If the Cellar doesn't exist yet, don't print an error message or exit
with an error status.

Fixes Homebrew/homebrew#14503.
2012-08-28 10:52:51 -07:00
Jack Nagel
df45f8fd09 audit: Formula#deps returns Dependency objects
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-27 22:59:29 -05:00
Jack Nagel
b8a62d98e1 audit: fix redundant version check
The == comparison was comparing the versions rather than directly
comparing the strings, which lead to false positives.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-27 09:44:54 -05:00
Adam Vandenberg
4d7069ed6f create: allow --set-name and --set-version
Closes Homebrew/homebrew#10873.
Closes Homebrew/homebrew#14401.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-08-26 08:39:36 -07:00
Mike McQuaid
67f78074f9 Miscellaneous bottle code cleanup. 2012-08-25 13:08:46 -07:00
Mike McQuaid
3af3bc7dd5 Rename tab 'built_bottle' to 'build_as_bottle'. 2012-08-25 11:52:37 -07:00
Adam Vandenberg
9e8bf8413d audit checks for passing dashes to build.include? 2012-08-25 09:37:41 -07:00
Adam Vandenberg
7b66291cc6 audit: be a bit more lenient 2012-08-22 21:31:38 -07:00
Adam Vandenberg
0654753695 audit: allow certain ARGV usages 2012-08-22 21:10:26 -07:00
Adam Vandenberg
2566ec85cb audit: complain until we use option and build 2012-08-22 20:59:43 -07:00
Max Howell
ebb894073d brew irb uses correct Ruby
Conversation here: 0a45d96b21a5056e5131f136e94533a6a57bf808
2012-08-21 12:09:07 -04:00
Max Howell
9274f7cda1 Formula.Enumerable
Deprecated Formula.all, replaced usage with more appropriate enumerable options. Just check out how much nicer `brew audit` runs now.
2012-08-21 12:09:05 -04:00
Max Howell
c5266654ff In fact, there are 2 xcode-select files to delete 2012-08-21 12:09:04 -04:00
Jack Nagel
3f9e88ae69 Simplify build options API
Simplify access to the different forms of a formula's build options by
making options into real objects rather than strings, and expose both
the 'name' and 'flag' form.
2012-08-20 14:16:08 -05:00
Jack Nagel
c6b3cd7cf4 Don't lie about upgrading up-to-date formulae
Usually, the "foo-version already installed" error is printed by
FormulaInstaller. However, if an up-to-date formula that has outdated
deps is passed on the command line, we proceed to upgrade the deps and
then print a message saying that the formulae given on the command line
is already installed.

Catch this earlier, when the outdated list is being populated, print an
appropriate message, and skip the up-to-date formula.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 19:33:39 -05:00
Jack Nagel
93f7a0fa85 upgrade: filter ARGV when expanding deps
This serves the same purpose as similar code in FormulaInstaller, but we
duplicate it because we do the dependency expansion in an ad-hoc fashion
here.

Fixes Homebrew/homebrew#11863.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 19:33:39 -05:00
Jack Nagel
8a21bd52d5 Add ARGV.ignore_deps?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 19:33:39 -05:00
Jack Nagel
d95f467362 Refactor brew missing
The heuristic for determining whether something is installed changes
from "f.installed?" to "f.rack.exist? and f.rack.subdirs.length > 0" in
order to properly consider outdated formulae.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 11:25:59 -05:00
Jack Nagel
166a9ba0ed Deprecate MacOS.version? style methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 11:25:59 -05:00
Jack Nagel
93baea7e47 outdated: use new version comparison machinery 2012-08-18 11:12:10 -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
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
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
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
ad80c616b8 brew cleanup removes .DS_Store files
Probably slow, but we hate these fuckers.
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
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
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