Commit Graph
1273 Commits
Author SHA1 Message Date
Adam Vandenberg 3cd5c902ae Pathname.install_symlink 2012-02-12 20:08:56 -08:00
Jack Nagel b8fdd33a60 Add ENV.cxxflags
Useful when CXXFLAGS has diverged fom CFLAGS, e.g. via ENV.append, and
also it is nice for CXX to have symmetry with CC.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-12 17:29:02 -06:00
Adam Vandenberg 82618a4845 Recognize dist suffix 2012-02-11 15:33:30 -08:00
Jack Nagel b609f69839 Remove LinkedKegs entry if we're writing the same one
If a keg has been uninstalled via `rm -rf <keg>`, and a user tries to
reinstall it without `brew unlink`ing it first, it will fail to link as
the LinkedKegs entry still exists. This isn't desirable, and the user
should be able to reinstall the same formula on top of the old, dead
symlinks without problems, so let's just remove the LinkedKegs entry if
it matches the one we are installing anyway.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10 23:53:12 -06:00
Jack Nagel 17743d34a3 Don't return nil from Formula#linked_keg
Doing so was the result of a quick hack to fix the "deps installed as
upgrades don't get linked" bug, but it was a mistake. Instead, always
return the LinkedKegs entry as a Pathname object, and let callers be
responsible for checking that it exists.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10 23:52:01 -06:00
Jack Nagel 6cc8e95518 Be gentle when stdout is not a tty
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10 17:54:35 -06:00
Jack Nagel fde86b2aad Pathname: silence install-info output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10 13:02:47 -06:00
Jack Nagel a38ae664cc Revert "install: unlink old kegs"
This reverts commit 2eabe2cbc8.

When Keg#unlink looks for symlinks relative to the keg, it can hit false
positives that actually belong to a different keg and unlink them
anyway. This breaks our "force identical directory symlinks to be shared
real directory" case.

This may be a problem in general with the unlinking code and should be
investigated.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10 12:58:24 -06:00
Jack Nagel 2eabe2cbc8 install: unlink old kegs
If a formula makes it all the way to the actual install step, it is safe
to unlink the keg before linking; this will prune dead symlinks in the
case where a keg was removed with `rm -rf <keg>` but not unlinked with
`brew unlink`.

Fixes #10077.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10 08:57:11 +00:00
Adam Vandenberg 6b1437ca69 Allow multiple arguments to install 2012-02-09 19:16:49 -08:00
Mike McQuaid 8fd8e2d727 Split bottle logic.
Fixes #8805.
2012-02-09 21:05:17 +00:00
Adam Vandenberg c1c66b403e this was out of balance 2012-02-08 21:58:46 -08:00
Adam Vandenberg 53168df9d0 Pathname: support .tar.Z extension 2012-02-08 21:08:18 -08:00
samueljohn 1bf9a147e5 brew --config: properly handle empty which strings
Symptom: If no python/ruby/perl is in your path, then `which x`.chomp
returns an empty string and `unless ""` is still true.  So, N/A is never
displayed.  Instead, ruby's Pathname.new("").realpath returns the cwd.
(I consider this realpath behavior a ruby bug) Fix: use empty?

Closes #10027.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-08 14:41:55 -06:00
Jack Nagel 0d41d6d65d doctor: try to detect osx-gcc-installer
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-08 11:51:51 -06:00
Jack Nagel 173719ed07 create: homepage comes before url and checksum
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-06 17:19:54 -06:00
Adam Vandenberg bcf5ee2e39 Split some classes to formula_support
formula.rb is getting big, let's start splitting things out.
2012-02-04 18:45:08 -08:00
Jack Nagel c86610bbae Adjust ARGV tests
ARGV.kegs and ARGV.formulae no longer raise exceptions.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-04 00:34:22 -06:00
Jack Nagel bc14dcf976 Warn the user of required arguments
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-04 00:27:05 -06:00
Adam Vandenberg 3849793c4a uses: do nothing if no args 2012-02-03 21:40:15 -08:00
Adam Vandenberg 25aefdd95d don't complain if args are empty 2012-02-03 21:40:14 -08:00
Jack Nagel 49e2034c64 Move old ENV.use_foo? compiler methods to compat
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-03 23:01:28 -06:00
Adam Vandenberg 601d478587 Remove aka warning 2012-02-03 20:02:41 -08:00
Jack Nagel b5a5217ba3 Add and use plist helper methods
These will be used to unify the label namespaces in embedded plists,
i.e. 'homebrew.mxcl.<formula>'.

plist_path returns the full path to a plist file located at the top
level of the keg; plist_path.basename can be used if just the filename
is needed.

c.f. #9346.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-03 19:50:58 -06:00
Jaeho Shin c027d8464b Suppress output of which commands
Added missing -s option to which for hg, bzr, fossil.

Closes #9954.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-03 12:22:09 -06:00
Adam Vandenberg 590c0df6ca Show which Perl, Python and Ruby are in the path. 2012-02-02 19:10:56 -08:00
Misty De Meo aedddbba59 doctor: remove gcc-4.2 warning on Xcode 4.2+
Re: #9925, many others.
2012-02-02 14:08:49 -06:00
Misty De Meo 448fbc9afa devel: reset mirrors when building devel
Otherwise stable mirrors will be considered when the devel download
fails.

Fixes #9910.
2012-02-02 13:13:07 -06:00
Jack Nagel 3e273cd121 prune: remove info dir entries for pruned files
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01 22:52:15 -06:00
Jack Nagel 7f6908afb3 keg: make locale directory regexp a constant
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01 22:52:14 -06:00
Jack Nagel 7e6dd757e2 link: add missing newline in verbose mode
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01 22:52:14 -06:00
Nicolas Despres 9610ff2e9e keg: handle the info directory file properly
If HOMEBREW_KEEP_INFO environment variable is set:
 - Do not symlink the info directory file (aka 'share/info/dir')
   otherwise it gets overwritten by next installed brew.
 - Install an entry in the directory for each linked info file when the
   brew is linked.
 - Uninstall the entry when the brew is unlinked.

Closes #9700.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01 22:52:14 -06:00
Nicolas Despres b5633b56df Pathname: remove trailing spaces
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01 22:16:47 -06:00
Colin Hebert c28c3cb897 CVSDownloadStrategy: correctly stage all files
The FileUtils.cp_r function with a wildcard doesn't copy hidden files
(starting with a dot) Instead of copying everything selected by *,
select all the folder content.

See: http://www.ruby-doc.org/core-1.9.3/Dir.html#method-c-glob

Closes #8873.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01 21:18:39 -06:00
Jack Nagel c6a548cd2a keg: mkpath directories in share/locale
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01 14:17:33 -06:00
Jack Nagel dde7901b94 create: punt on bad URLs
When we can't detect a name from the URL, just ask the user.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-31 17:57:20 -06:00
Jack Nagel 172c05ed9f mkpath directories under lib/ocaml
Ocaml packages that need to install here will cause the site-lib
directory to be created, and the symlink in the ocaml keg will work as
intended. This is necessary for the ocaml bottle to work properly.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-30 00:04:33 -06:00
Jack Nagel be18671765 versions: ignore NameError and ArgumentError
Fixes #9856.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-29 16:00:27 -06:00
Mike McQuaid b96fac7278 Bottles should care about cellar and prefix 2012-01-29 20:08:08 +00:00
Mike McQuaid 3c2524ec27 Bottles should care about cellar path not prefix.
Closes #9844.
2012-01-29 13:03:35 +00:00
Adam Vandenberg 32a7da22a2 audit: make boost-jam a build-time dependency 2012-01-28 12:50:45 -08:00
Jack Nagel 8975242faa versions: fix up error handling
Now we handle some things more explicitly and in the process get rid of
the blanket rescue on the mktemp block, which is something of an
antipattern.

By unloading the class *after* determining the version, we avoid the
case where the class had previously been unloaded but Formula.factory
failed, and trying to unload the nonexistent class results in a
NameError. Doing it this way, we avoid having to rescue NameError and
thereby avoid hiding other cases where it may occur.

We also rescue TypeError which gets us past a few more bad formula in
the history in some instances.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-27 03:40:24 -06:00
Jack Nagel 1be8f8c6e2 versions: silence 'aka' warning and syntax errors
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-26 23:02:18 -06:00
Konstantin Shabanov b3c3fed1eb Strip escaping from query
Regexp#source retains escape sequences as is, so searching for formulae
like 'pure-ftpd' doesn't work.

Closes #9597.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-26 18:21:26 -06:00
Jack Nagel 37b785c3fd audit: reorganize some checks
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-25 22:41:53 -06:00
Jack Nagel 4df322af8d audit: make devel check more specific
There are a few false positives where the string 'devel' occurs in other
contexts.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-25 22:39:13 -06:00
Misty De Meo aedacdf209 Add devel to the DSL, + stable and bottle blocks
This commit adds a `devel` entry to the DSL, allowing formulae to
specify an unstable branch.

`devel` takes a block, which should contain standard `url` and `md5`
fields (and `version`, if necessary). This must come after the standard
DSL fields.

This commit also migrates over all formulae currently using `devel` to
the new syntax, as well as formulae which used `head` for non-VCS urls.

The new syntax is also available for `stable` and `bottle`. `stable` is
an option alongside the old syntax. `bottle` replaces the old syntax.

Note that the @stable ivar in Formula has been renamed to @standard,
and the @bottle ivar has been renamed to @bottle_url.

Closes #9735.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-01-25 21:45:19 -06:00
Jack Nagel 84a2e44db4 Fix failing ENV tests
We need the ARGV extension now that we call ARGV.build_bottle? in
set_cpu_cflags.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-25 21:20:13 -06:00
Jack Nagel 637b4fb34e doctor: reset should be done in HOMEBREW_REPOSITORY
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-24 19:59:24 -06:00
Mike McQuaid d8a552c8d0 Make brew doctor reset instructions clearer.
Fixes #9739.
2012-01-24 19:36:10 +00:00