1931 Commits

Author SHA1 Message Date
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
Max Howell
50767c6077 Record HEAD SHA and date of installs in receipt 2012-08-29 12:41:33 -04:00
Max Howell
05991dd846 Produce good error messages for bad tarballs 2012-08-29 12:41:33 -04:00
Jack Nagel
d423519766 Don't download bottles when building from source
The recent fix that prevents "-v" from triggering source downloads
exposed a different bug that allowed the build script to download the
bottled package instead of the source package; fix the logic.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-28 18:00:27 -05: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
Max Howell
396ca3fc59 Add Version.slice to compat suite
Refs Homebrew/homebrew#14299.
2012-08-28 12:11:46 -04: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
Max Howell
dc68752d3d Prevent CLT.version being ""
Also cache the response if N/A as it is slow to keep repeating that. And only do one pkgutil call if possible.
2012-08-27 12:57:56 -04:00
Max Howell
0509406069 Use full paths to mdfind and pkgutil 2012-08-27 12:57:56 -04: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
dfd35db4d1 Formula factory: add comment 2012-08-26 17:08:09 -07:00
Adam Vandenberg
f1d0f7adbb Formula factory: re-raise certain NameErrors.
Some name errors, such as NoMethodError, represent programming errors.
Re-raise them to get a usable error message.

Closes Homebrew/homebrew#14467.
2012-08-26 17:06:38 -07:00
Jack Nagel
757b73e9a9 Ask the user for help if MacOS.compilers_standard? fails
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-26 13:57:23 -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
samueljohn
537de9c046 formula_installer: make "linking" more clear
When building software "linking step did not complete" sounds
like ld failed. Let's be clear about this.

Closes Homebrew/homebrew#14407.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-08-25 15:36:13 -07:00
Jack Nagel
c350fad07e tests: adjust test_bottle_spec_selection for new bottle code
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-25 16:03:35 -05:00
Mike McQuaid
bed2fa088b Don't fail to cleanup redacted formula. 2012-08-25 13:40:05 -07:00
Mike McQuaid
67f78074f9 Miscellaneous bottle code cleanup. 2012-08-25 13:08:46 -07:00
Mike McQuaid
82d1310800 Check formula options properly to rule out bottle.
Fixes Homebrew/homebrew#14148.
2012-08-25 11:52:37 -07:00
Mike McQuaid
d5b954ebd4 Fix ARGV and bottles circular dependency. 2012-08-25 11:52:37 -07:00
Mike McQuaid
3af3bc7dd5 Rename tab 'built_bottle' to 'build_as_bottle'. 2012-08-25 11:52:37 -07:00
Mike McQuaid
ebbc3438a1 Move used_options and unused_options to ARGV. 2012-08-25 11:52:37 -07:00
Mike McQuaid
90010f4602 Fix tests and NoMethodError with no X11 installed. 2012-08-25 10:21:48 -07:00
Mike McQuaid
d9a18d4c1e erlang: fix version detection and bottles. 2012-08-25 10:21:48 -07:00
Adam Vandenberg
9e8bf8413d audit checks for passing dashes to build.include? 2012-08-25 09:37:41 -07:00
Charlie Sharpsteen
e873411694 XCodeDependency: Clarify that Xcode.app is needed
Clarify the error message arising from XCodeDependency so that users know
XCode.app is needed and that just installing the CLT does not count as
"installing XCode".
2012-08-24 19:38:03 -07:00
Jack Nagel
a4fbae274f Compact whitespace when removing flags
This prevents multiple calls to flag-modifying ENV methods from
resulting in large amounts of consecutive spaces.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-23 22:29:56 -05:00
Jack Nagel
f069ebd0df Version: make MacOSVersion comparison more robust
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-23 18:16:08 -05:00
Jack Nagel
fd151f8999 factory: always check const_defined? before requiring
Specifying dependencies with a URL works, even if by accident, but
factory is called repeatedly on this URL and this results in multiple
downloads of the same file.

Fix this by checking const_defined? here too, and DRY up the code a bit.

Fixes Homebrew/homebrew#14285.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-23 18:13:54 -05:00
samueljohn
ad0dd3d3de Xcode-only: Clean up compiler flags. Use CPATH.
- When using CPATH, we only need -isysroot and not the other -I spam.
- LDFLAGS use -isysroot instead of -L
  Turns out that the linker also understands the
  -isysroot flag which behaves more natural (in the
  sense: "like the internal defaults `/usr/lib` etc.)
  than adding `-L$(SDKROOT).
  Especially for duplicates, the linker first searches
  through all `-L` dirs and then looks at the sysroot
  or internal defaults. This is what we want.
- Pkg-config needs CC with CFLAGS passed to configure.

Closes Homebrew/homebrew#14351.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-23 16:26:28 -05:00
Mike McQuaid
6400f41a77 Fix keg-only on pre-Mountain Lion formulae. 2012-08-23 09:49:08 -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
Mike McQuaid
1f8af42fee Don't use XQuartz for e.g. :libpng on 10.8.
XQuartz isn't added to the default library paths so if something is
linked against a Homebrew libpng then it doesn't work against the
XQuartz libpng. The CLT provides X11 on Lion so don't request users
install XQuartz if it isn't needed on Mountain Lion.

Fixes Homebrew/homebrew#14325.
2012-08-22 13:34:26 -07:00
Adam Vandenberg
97d1dc4f2b Cache found svn binary 2012-08-22 09:44:49 -07:00
Adam Vandenberg
b104623f43 Honor GIT env var 2012-08-22 09:43:30 -07:00
Jack Nagel
5e0cbdab9b factory: rescue NameError
Due to the new const_defined? checks, passing certain names (such as
those that start with a digit) that are illegal constant names will
raise NameError. Catch this and error out gracefully, as we would have
previously.

Fixes Homebrew/homebrew#14342.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-21 15:55:20 -05:00
Jack Nagel
98b6f24510 keg_fix_install_names doesn't need Find
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-21 14:23:25 -05:00
Jack Nagel
e2058ed362 mach-o: use any? instead of map and include?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-21 13:45:35 -05:00
Max Howell
abf55c2bcd Support ENV[VERBOSE] 2012-08-21 12:09:07 -04:00
Max Howell
ebb894073d brew irb uses correct Ruby
Conversation here: 0a45d96b21a5056e5131f136e94533a6a57bf808
2012-08-21 12:09:07 -04:00
Max Howell
ee11f32fb7 conflicts_with message: recommend unlink
Yes uninstall works, but lets not push people towards that, they can presumably guess that, in the rare case they'd prefer that option.
2012-08-21 12:09:06 -04:00
Max Howell
4e7bb6c637 Better message if multiple kegs need linking 2012-08-21 12:09:05 -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
8a9a1d5b00 Simplify MacOS.locate
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-20 15:00:32 -05:00
Jack Nagel
f471c3e99f MacOS.dev_tools_path: return nil if not found
This matches the semantics of other path methods, such as Xcode.prefix.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-20 15:00:32 -05:00