Commit Graph
1635 Commits
Author SHA1 Message Date
Adam Vandenberg 9983cb9c0e Add ARGV.build_stable? 2012-06-10 14:49:56 -07:00
Karsten Sperling e5192e3fa9 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
Adam Vandenberg ff96f4cd9f 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 71fd9b26d7 Handle EOF in Pathname#text_executable?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-03 22:34:28 -05:00
Charlie Sharpsteen 467fa7c921 std_cmake_args: Search for Frameworks last
Most Homebrew builds produce libraries, so CMake should give priority to
libraries when resolving dependencies.

Closes #12497.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-06-03 10:03:56 -07:00
Jack Nagel 084e761f6a 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 d727f8b7f3 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 #12009.

Closes #12333.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-06-01 09:24:25 -05:00
Jack Nagel 5fb5115f58 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 7ae740dc95 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 0dc6ed0677 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 586271e442 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 96fb03750e 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 9f68f25da4 Recurse into subdirectories when fixing install names 2012-05-30 22:32:48 -05:00
Will Ross 4bfbca31fc 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 3525e4b730 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 88ccd16ce5 create: update cmake calls in template
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-22 22:32:16 -05:00
Jack Nagel c0bbf60eaf 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 28fa55824e audit: fix broken deps check
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-15 17:45:26 -05:00
Max Howell ed6b352c2b 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 #11558.
2012-05-15 02:27:11 -04:00
Max Howell 76bab90959 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 #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 d2c417a02b 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 2fb94e4d9b Use 'which' helper method more
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 19:28:03 -05:00
Jack Nagel bfb295616a 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 b73b40fa1d 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 #12154
2012-05-11 09:48:51 -05:00
Adam Vandenberg c3eebfc7d2 Detect http://svn... as svn 2012-05-10 07:09:51 -07:00
Jack Nagel 76604c1cd5 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 #12115.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 21:05:47 -05:00
Jack Nagel 839d0ddad8 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 2d68a3f319 audit: check MacPorts patch URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 17:44:57 -05:00
Nicolas Despres 1c74a94276 Honor build options and bottles when upgrading
Fixes #11552.
Closes #11777.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-05 12:24:56 -05:00
Adam Vandenberg 0cc9a8fedc Don't unzip war files 2012-05-03 20:40:04 -07:00
Adam Vandenberg 19ed253b2d Detect uncompressed tars
From a patch by @RuiPereira

Closes #12011.
2012-05-03 20:31:00 -07:00
Adam Vandenberg b4872a2f02 Fix brew audit 2012-05-03 20:22:47 -07:00
Jack Nagel 8a1c2eccb6 GitDownloadStrategy: don't pass --depth to fetch
The --depth option is apparently more nuanced that I had originally
thought, and while it does not actually break repositories, repeatedly
using "--depth 1" can cause problems depending on the structure of the
history.

Luckily, we don't actually need it to prevent the entire repository from
being fetched as long as the fetch respec is set correctly, which we do
since 7718c939b0.

Fixes #12024.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-03 19:33:30 -05:00
Charlie Sharpsteen 8c76e64498 ENV.rb: Always return integers from make_jobs
When referencing `Hardware.processor_count`, `ENV.make_jobs` will return an
integer. If referencing the environment variable `HOMEBREW_MAKE_JOBS`, it
returned a string.

Now, the function always returns an integer.

Fixes #12033.
2012-05-03 15:49:27 -07:00
Charlie Sharpsteen 859db25522 Revert "ENV.rb: Always return integers from make_jobs"
This reverts commit ea1a9e603a.

Argh. Unrelated PySide changes slipped in.
2012-05-03 15:48:51 -07:00
Charlie Sharpsteen ea1a9e603a ENV.rb: Always return integers from make_jobs
When referencing `Hardware.processor_count`, `ENV.make_jobs` will return an
integer. If referencing the environment variable `HOMEBREW_MAKE_JOBS`, it
returned a string.

Now, the function always returns an integer.

Fixes #12033.
2012-05-03 15:45:31 -07:00
Christian Höltje 82547a2f8e zsh: support site specific files
This fixes the `site-scripts` and `site-functions` directories
so that zsh points to the HOMEBREW_PREFIX version of these files
instead of the Cellar version.

This means you can drop files in these directories and the files
will persist when you upgrade zsh. Otherwise they disappear when
you upgrade zsh.

Closes #11955.

[jn: mkpath everything under share/zsh]

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-02 23:43:30 -05:00
Adam Vandenberg 93f2244cf8 patches - support detection of compression types 2012-05-02 19:57:33 -07:00
Adam Vandenberg 52732da91b Extract detection of compression types
Separate out detecting compression types from uncompressing and staging.
2012-05-02 19:57:33 -07:00
Jack Nagel 41ba5a2409 GitDownloadStrategy: don't assume --single-branch is available
git-clone's --single-branch is too new, and Xcode 4.3's stock git
doesn't have it. Since we don't require git from Homebrew, don't use it.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-02 21:55:24 -05:00
Jack Nagel 7718c939b0 GitDownloadStrategy optimization
The current series of fetch invocations in GitDownloadStrategy has the
unfortunate behavior of fetching full history even in shallow clones
that only need the history between the clone point and the remote HEAD.
It should be possible to determine if it is actually necessary to fetch
the full history, including all tags, and if it is not to avoid this
overhead.

Fixes #11958, and several other recurring problems.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-01 21:46:42 -05:00
Jack Nagel b6002b2e52 Don't set GIT_DIR when staging git clones
GIT_DIR is convenient, but it does not work when both a formula and
subformula try to stage a git checkout, as git will use the main
formula's repository when staging the subformula.

Stop setting it, and restore the kludge to the git-multipush formula.

Fixes #10893.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-01 18:07:58 -05:00
Mike McQuaid 548d6a54ad Fix Ruby warnings.
Fixes #11966.
2012-05-01 20:45:17 +08:00
Misty De Meo 87fd6f3372 brew tap: allow dashes in GitHub usernames 2012-04-30 14:02:23 -05:00
Mike McQuaid 7e744df63d Improve Formula.resolve_alias warning. 2012-04-30 21:38:14 +08:00
Mike McQuaid 34c970b103 Add ofail command and fix bottle command output. 2012-04-30 21:38:08 +08:00
Mike McQuaid cd4f7c10cd Cleanup old bottles. 2012-04-30 21:37:58 +08:00
Mike McQuaid 14a4b3adf3 Fix native bottle regex. 2012-04-30 21:37:46 +08:00
Adam Vandenberg c84add7bea audit: reduce false-positives 2012-04-29 09:32:39 -07:00
Adam Vandenberg dfb171b173 doctor: add another path to the macgpg2 check 2012-04-28 14:08:05 -07:00