212 Commits

Author SHA1 Message Date
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
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
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
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
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
de444ead0b New fails_with infrastructure
- Formulae can now declare failures on any compiler.
 - FailsWithLLVM and associated formula elements have been moved to
   compat.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-01 12:39:59 -05:00
Max Howell
f3d177a99b Set ACLOCAL_PATH so that things work
This should mean all those formula that pass options to aclocal don't need to anymore, but I'm not risking changing them.
2012-02-27 04:06:39 +00:00
Jack Nagel
4ee255134d Replace UI uses of 'folder' with 'directory'
There are still methods and variables with the word "folder" in the
name, but at least user-facing messages and warnings should use the
correct terminology.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-24 19:43:40 -06:00
Max Howell
a69ec7a22b Add dev_tools_path to PATH if not in PATH already
This prevents what are likely a whole slew of bugs.
2012-02-16 18:19:01 +00: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
b0c6970dec Recursively scan for keg-only deps before generating build ENV
Remove cairo dep from gtk formula as a consequence.
2011-08-24 22:30:44 +01:00
Max Howell
45ba18b4d5 Rename install.rb to build.rb for clarity and great justice
It was just confusing, and since the `brew upgrade` refactor this makes more sense too.

Shame it still downloads in there etc. but whatever. Homebrew 2 will fix!
2011-08-24 22:30:44 +01:00