28944 Commits

Author SHA1 Message Date
Misty De Meo
c2b057fc70 doctor: skip Cellar test if Cellar doesn't exist
Fixes Homebrew/homebrew#5188 (again).
2012-06-19 09:24:59 -05:00
Jack Nagel
9ebb1a3d08 audit: prefer ARGV.build_head? to inspecting 'version'
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-17 18:01:22 -05:00
Jack Nagel
6a94df360a audit: prefer modifying ENV to using env or export
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-17 17:59:30 -05:00
Jack Nagel
38a28285a6 audit: catch unnecessary 'ENV.foo' interpolation
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-17 17:58:49 -05:00
Jack Nagel
58d4a95ea7 fix_install_names: try harder to find referenced dylibs
Keg#fix_install_names punts if bad install names reference dylibs that
aren't "nearby". Enable this machinery to fix more complex directory
hierarchies by searching everything under 'lib' for the bad name's
basename.

Additionally, teach it to correctly handle Mach-O bundle files.

Fixes Homebrew/homebrew#12810.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-17 16:22:08 -05:00
Misty De Meo
6229a20db7 doctor: Mono-specific warning for pkg-config
Mono installs its own pkg-config symlink into /usr/bin/pkg-config,
which breaks non-Mono builds. Provide a specific warning.

Closes Homebrew/homebrew#12859.
2012-06-17 12:17:11 -05:00
Jack Nagel
2cca8e1a4f Teach Mach-O machinery about bundles
c.f. Homebrew/homebrew#12810.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-16 11:43:43 -05:00
Jack Nagel
075a59e3f1 Fix indentation in MachO#mach_data
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-16 11:11:09 -05:00
Jack Nagel
7002359f7a Improve Pathname#text_executable? regexp
file(1) does not allow leading whitespace on shebang lines, and there
appears to be no restrictions on what characters follow '#!', either.

While at it, fix an erroneous shebang test.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-15 20:06:36 -05:00
Jack Nagel
1b6f23c8a9 Add comment about error pipe (mis)behavior
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-15 14:48:29 -05:00
samueljohn
f9b2761d77 warn if unrar is needed but not found.
You can `brew unrar`

Closes Homebrew/homebrew#12858.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-06-15 09:28:04 -05:00
Misty De Meo
ffe21a9cd1 blacklist: update Xcode message for 10.8 2012-06-15 09:25:23 -05:00
samueljohn
e22b0df7d6 Xcode from the App Store is no more an installer.
- Removed outdated message about running the installer.

Closes Homebrew/homebrew#12857.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-06-15 09:23:11 -05:00
Adam Vandenberg
34e51fb16b Allow --get for non-interactive builds.
This is useful for doing a --debug build, as the git repo will pick up any
changes that have been made up to that point in the build process.

--git is still most useful in conjunction with --interactive, though.
2012-06-13 23:01:41 -07:00
Jack Nagel
ec0a6ee251 Completion for "brew missing"
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-13 08:14:25 -05:00
Adam Vandenberg
ec4b34aa08 Fix doctor's use of missing.
`brew doctor` shelled to `brew missing` and parsed the results.
When VERBOSE was true, this caused an error as extra, unexpected
output is generated.

Make missing an internal command, and give it a programmatic interface.
2012-06-12 20:03:26 -07:00
Jack Nagel
644af3696b Use "legacy" search API when completing tap names
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-12 11:58:48 -05:00
Jack Nagel
de5f0a8e9b Switch to "legacy" GitHub search API
GitHub's v2 API entry point is gone, but search as been ported to API v3
as a "legacy" feature.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-12 11:51:05 -05:00
Jack Nagel
9e2fc82ad6 Use which method in doctor
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-12 00:17:36 -05:00
Adam Vandenberg
0c14036a9a Add ARGV.build_stable? 2012-06-10 14:49:56 -07:00
Karsten Sperling
9158f68561 Point AWS environment variables at LinkedKeg
(rather than the version being installed)

This avoids having to change the variable when a different version is linked.
Also ensure the private key / cert variables point to only 1 file.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-07 21:39:42 -07:00
Ranmocy
84ad9d322b brew-linkapps: note where symlinks are installed
Closes Homebrew/homebrew#12619.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-07 16:06:55 -05:00
Adam Vandenberg
73d047d3ac Use sha1 as the default checksum for new formulae
See: https://github.com/mxcl/homebrew/pull/12587
2012-06-06 07:04:51 -07:00
Jack Nagel
1cce85b1f1 Handle EOF in Pathname#text_executable?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-03 22:34:28 -05:00
Charlie Sharpsteen
d1a4806390 std_cmake_args: Search for Frameworks last
Most Homebrew builds produce libraries, so CMake should give priority to
libraries when resolving dependencies.

Closes Homebrew/homebrew#12497.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-06-03 10:03:56 -07:00
Jack Nagel
65bea86ae9 doctor: improve outdated Homebrew check
We now skip the outdated check if our local origin/master tracking
branch matches the origin remote's current master. This prevents false
positives when we are actually up-to-date but the latest commit is over
24 hours old.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-03 10:32:40 -05:00
Misty De Meo
7af4622b0f Replace /usr/bin/ruby with full Framework path
Rationale: some users insist on replacing the /usr/bin/ruby symlink
to point to another ruby on their system, which may break homebrew.
Use the full Framework path instead, which is less likely to be tampered with.

This also reorganizes the brew --config checks to reflect the different path.

Fixes Homebrew/homebrew#12009.

Closes Homebrew/homebrew#12333.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-06-01 09:24:25 -05:00
Jack Nagel
1a47306467 fix_install_names: make failures verbose in debug mode
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30 22:32:49 -05:00
Jack Nagel
2a6575ad28 cleaner: use new Mach-O pathname methods in clean_file
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30 22:32:49 -05:00
Jack Nagel
53ce9dba53 archs_for_command: use new Mach-O Pathname methods
- Reimplement archs_for_command on top of the new Mach-O methods
 - Move ArchitectureListExtension to mach.rb
 - Add a test for the ArchitectureListExtension

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30 22:32:48 -05:00
Jack Nagel
7bb1894df5 fix_install_names: use Mach-O methods to find dylibs
Some libraries do not have the .dylib extension (e.g. Qt framework
libs), but need to have their install names rewritten to prevent other
packages from breaking due to upgrades. Use the new Pathname#dylib?
instead.
2012-05-30 22:32:48 -05:00
Jack Nagel
a786178382 Pathname: add Mach-O module
The MachO module contains methods for learning about Mach-O binaries,
and can be used where one might normally shell out to file(1).

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30 22:32:48 -05:00
Jack Nagel
b6e0dfed23 Recurse into subdirectories when fixing install names 2012-05-30 22:32:48 -05:00
Will Ross
beb85c0d90 Do not warn about JNI libraries in lib
JNI libraries in OS X are suffixed with jnilib. Additionally,
/usr/local/lib is a default search location for JNI libraries,
so Homebrew shouldn't complain when it installs .jnilibs into lib.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-05-26 21:10:04 -07:00
Jack Nagel
d9fe48cf54 Set close-on-exec on the error pipe
We use a pipe to marshal exceptions from the build script back to the
main Homebrew process; the associated file descriptor is stored in an
environment variable so that the script can figure out which descriptor
to use after being exec'd.

However, any child processes of the build script inherit this
descriptor (i.e. anything spawned via "system" by the formula during
installation). Normally this is not an issue, but if a formula executes
a long-running process such as a daemon, the main Homebrew process will
never see EOF on the error pipe because the daemon still has an open
descriptor.

We can fix this while preserving current behavior by setting the
close-on-exec flag on the build script's error pipe descriptor.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-23 17:43:14 -05:00
Jack Nagel
01bcf58e6a create: update cmake calls in template
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-22 22:32:16 -05:00
Jack Nagel
a13857b150 Introduce std_cmake_args method
This differs from the current std_cmake_parameters in that it returns an
array instead of a string. Doing so makes dealing with it in formulae
much more pleasant, and for new formula hackers, less surprising.

std_cmake_parameters is retained in compat to maintain compatibility
with external formulae.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-22 16:32:12 -05:00
Jack Nagel
4dfa2806b9 audit: fix broken deps check
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-15 17:45:26 -05:00
Max Howell
4a48a5f7a3 Don't fall into the no-extension OK trap
`require` is OK without an .rb extension, but the rest of our code will be confused and generate weird errors.

Fixes Homebrew/homebrew#11558.
2012-05-15 02:27:11 -04:00
Max Howell
1a63e93875 sudo -k before calling build scripts
Potentially build scripts would call sudo, if so we don't want that to automatically succeed just because the time-period in which sudo works is still active after a previous incantation.

Closes Homebrew/homebrew#10629.

In fact I don't see how this can have been the problem, but if this isn't the problem then I don't see what else can be the problem.
2012-05-15 01:56:33 -04:00
Jack Nagel
ec3615fec7 doctor: rework check_pkg_config_paths
pkg-config can give us this information a colon-separated list; use
that.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 19:28:03 -05:00
Jack Nagel
210c9ac205 Use 'which' helper method more
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 19:28:03 -05:00
Jack Nagel
28f89c59a2 FormulaInstaller: fold dirlist helper into check_m4
Having in_aclocal_dirlist? defined as a method on FormulaInstaller is a
little weird; since its just a return condition of check_m4, move the
code there.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 18:43:14 -05:00
Misty De Meo
71d34a86d6 doctor: report if a path element is invalid
Under certain circumstances, an invalid path element would cause
File.expand_path to bail out. Catch mistakes and report them, then
continue instead.

Fixes Homebrew/homebrew#12154
2012-05-11 09:48:51 -05:00
Adam Vandenberg
f8a6075af3 Detect http://svn... as svn 2012-05-10 07:09:51 -07:00
Jack Nagel
68124d481f Unify 'which' and which_s' utility methods
'which' only returns a Pathname or nil, and doesn't care about anything
sent to stderr, so just silence it by default and combine the two
methods.

Closes Homebrew/homebrew#12115.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 21:05:47 -05:00
Jack Nagel
fa1edd6846 audit: don't count printed URLs as problems
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 17:50:05 -05:00
Jack Nagel
4d027874b0 audit: check MacPorts patch URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 17:44:57 -05:00
Nicolas Despres
c2fdcf1a34 Honor build options and bottles when upgrading
Fixes Homebrew/homebrew#11552.
Closes Homebrew/homebrew#11777.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-05 12:24:56 -05:00
Adam Vandenberg
32ea2e3ad0 Don't unzip war files 2012-05-03 20:40:04 -07:00