Commit Graph
1162 Commits
Author SHA1 Message Date
Jack Nagel c729fb2d32 Add support for xz-compressed tarballs
Rationale: some software (e.g. GNU Coreutils, GnuTLS 3.x), have started
distributing _only_ xz-compressed tarballs. There is no system XZ
utility provided by OS X, but it is necessary so that we can continue to
provide formulae for this software.

If XZUtils isn't installed, we abort and prompt the user to `brew
install xz`.

The `xz` command itself doesn't do any untarring, so we write the
decompressed archive to stdout and pipe it to tar.
2011-12-09 16:16:46 -06:00
Adam Vandenberg 697d2ae39e Idioms 2011-12-08 21:32:58 -08:00
Jack Nagel 3dac87e62c audit: check for hard-coded compilers
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-08 23:08:42 -06:00
Jack Nagel 70bf920ac1 Ignore $HOME/.curlrc when invoking curl
Several issues have been caused by conflicts between the options
Homebrew passes to curl and those read from $HOME/.curlrc. Passing '-q'
will force curl to ignore settings in that file.

Suggested in #9027.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-08 21:05:19 -06:00
Jack Nagel 9b4c99292b Introduce HOMEBREW_CURL_VERBOSE
When investigating issues, one might want to see exactly what curl is
doing behind the scenes. Setting HOMEBREW_CURL_VERBOSE will cause the
'--verbose' flag to be passed to all invocations of curl.

Prompted by #8992.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-08 21:04:28 -06:00
Charlie Sharpsteen b40e9bc140 formula.rb: Fix use of xcode_version in LLVM check
Should be `MacOS.xcode_version`.

Fixes #8966.
2011-12-04 10:12:40 -08:00
Charlie Sharpsteen 9b6b9af73a formula.rb: Change fails_with_llvm for XCode 4.2
Suggest trying `--use-clang` instead of `--use-gcc` (which does nothing).

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-12-03 12:33:02 -08:00
Misty De Meo eb89df88dc Restore --force behaviour in brew-install
Fixes #8933.
Closes #8936.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-12-02 09:36:38 -08:00
Misty De Meo 5b1968fad9 ENV: fix llvm-gcc regexp
Fixes: #8890.
Closes #8893.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-12-01 13:16:00 -08:00
Jack Nagel cdfc600fae audit: only perform GNU URL check on primary URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-30 13:14:24 -06:00
Jack Nagel 014aadd20e audit: disable GNU url check
It needs to be reworked to only check the primary URLs, as we are now
using ftp.gnu.org as a mirror.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-30 12:57:29 -06:00
Adam Vandenberg 49de8f2eb3 audit: smake is also a build tool 2011-11-29 18:55:55 -08:00
Adam Vandenberg bb1cd3719c audit: check for DB deps too 2011-11-29 18:50:44 -08:00
Jack Nagel 28da63e4f3 audit: warn about more "forbidden" dependencies
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-29 19:57:26 -06:00
Jack Nagel ead6a69541 audit: check for build-time dependencies
This can be made more robust in the future when we stop throwing away
the ':build' type flag in Formula#depends_on.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-29 19:40:14 -06:00
Charlie Sharpsteen 4250018b8e brew doctor: Ignore config files in /usr/X11R6/bin
`/usr/X11R6` is an Apple-provided symlink to `/usr/X11`.

Fixes #8881.
2011-11-29 14:42:29 -08:00
Charlie Sharpsteen 294af55b24 brew doctor: Note there is no GCC in XCode 4.2+
Should help advert confusion surrounding the "could not find gcc 4.2.x" message
recieved by Lion users running the latest version of XCode.

Fixes #8876.
2011-11-29 14:31:53 -08:00
Misty De Meo 8a980d509b Correct cmake syntax in formula template
Closes #8879.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-11-29 14:20:38 -08:00
Colin Hebert 4d395412c2 download_strategy.ry: Improve Bazaar efficiency
Bazaar download strategy tried to re-download everything on "export" as a
checkout is used. See:

 https://answers.launchpad.net/bzr/+question/180269
 https://bugs.launchpad.net/bzr/+bug/897511

Related to issue #8774.

Closes #8863.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-11-29 10:06:58 -08:00
Misty De Meo 9bcebce008 Fix installation error from ARGV --HEAD filter
The ARGV filtering would strip `--HEAD` from dependency installations,
then proceed with trying to install the dependency from the latest
version in the formula. This causes an error if the latest version is
already installed, so check to see if formula is installed before
performing the installation.

Closes #8869.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-11-29 09:32:05 -08:00
Charlie Sharpsteen 22f7c7eda3 uses.rb: Pass a block to map instead of a Proc
Passing a `Proc` doesn't work in Ruby 1.8.6 which causes `brew uses` to fail on
Leopard.
2011-11-28 23:29:29 -08:00
Jack Nagel c5639788e2 Move brew-depstree into brew deps --tree
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-27 23:29:41 -06:00
Charlie Sharpsteen 5a6cef458c formula.rb: Initialize path to nil or a Pathname
For consistency, ensure that the `path` member of formula objects is always a
`Pathname`.
2011-11-27 16:44:42 -08:00
Charlie Sharpsteen 132bbc1bbb Fix array concatenation in ARGV.filter_for_dependencies
Gah. This was supposed to be in the last commit, but I forgot to `--amend` it.
2011-11-27 14:44:39 -08:00
Charlie Sharpsteen bdb1d7bd33 Don't suppress --verbose while installing deps
Unless the `--quieter` flag is passed.

Closes #8723.
2011-11-27 14:37:31 -08:00
Charlie Sharpsteen f67967a002 Suppress --devel while installing dependencies
Unless the dependency is explicitly passed to `brew install --devel`.
2011-11-27 14:37:31 -08:00
Charlie Sharpsteen 3edc9d212b Re-work ARGV filtering to properly handle --HEAD
Previously, stripping arguments like `--HEAD` for dependencies failed because
that flag affects the installation prefix encoded into formula objects. The
previous implementation of `ARGV` filtering tried to contain all changes to a
single method call before the `FormulaInstaller` forks. This update spreads
things out a bit:

  - The Homebrew `ARGV` extension adds a new method, `filter_for_dependencies`
    which strips flags like `--HEAD`, yields to a block, then restores the
    original contents of ARGV.

  - The `explicitly_requested?` test, which returns true or false depending on
    if a formula object is a member of `ARGV.formulae`, is now a method of
    `Formula` objects.

  - `FormulaInstaller` objects now execute the installation of dependencies
    inside an `ARGV.filter_for_dependencies` block if the dependency was
    `explicitly_requested?`.

Fixes #8668.
Closes #7724.
2011-11-27 14:37:31 -08:00
Adam Vandenberg 7e94a7d048 audit: remove --strict 2011-11-27 08:39:44 -08:00
Jack Nagel a523334aba doctor: remove terminal width check for curl
This ended up being noise for some users. We need a better set of steps
to trigger the bug in order to create a good doctor check; patches
welcome from users who are encountering this issue.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-26 12:10:10 -06:00
Jack Nagel 6a3691aa48 doctor: use newer gcc version methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-26 12:01:52 -06:00
Jack Nagel 83f28bc4c4 Reset to remote HEAD when updating git clones
Git checkouts that do not specify a branch should always reset to the
remote's HEAD, as some remotes have HEAD set to 'unstable' or some other
non-master branch.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-26 11:44:55 -06:00
Misty De Meo 7992c66560 Utils: update gcc version detection logic
Homebrew was attempting to check the version of gcc-4.0 and gcc-4.2 even
if they don't exist, causing `doctor` and `--config` to throw nasty
errors.

Also fixes the broken missing gcc-4.2 detection, which was confusing
Xcode 4.2 users.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-11-25 17:50:14 -08:00
Adam Vandenberg 335e2ce358 brew-config: remove recommended compiler versions
The recommended compiler versions printed from `brew-config` are out
of date and misleading. The recommendation is always "Run the latest
version of Xcode available for your platform".
2011-11-25 17:34:47 -08:00
Misty De Meo 7220c4f8a9 Detect 2-digit clang build versions
Xcode 3.2.6's build of clang is 77, which wasn't being matched by the
clang_build_version regexp.

Closes #8796.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 17:54:21 -06:00
Jack Nagel cb7f7f2467 Display clang version in --config output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:15:47 -06:00
Jack Nagel 8da6c36806 Add utility methods to determine clang version
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:14:46 -06:00
Jack Nagel fb809331a0 doctor: remove outdated XCode version reference
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:02:54 -06:00
Jack Nagel d078213501 Parse compiler --version instead of -v
For GCC and LLVM-GCC, '-v' is not a synonym for --version. When run
without any other options or arguments, it gives similar output, but it
is better to just parse the (terser) --version output.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:00:59 -06:00
Charlie Sharpsteen 52523c30e9 formula_installer.rb: Improve receipt check
Using `f.installed?` instead of `f.prefix.exist?` ensures something was created
by the installation step before the install receipt is written.
2011-11-23 12:25:00 -08:00
Jack Nagel 470b288f14 audit: check for MacPorts patches from trunk
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-23 13:38:38 -06:00
Charlie Sharpsteen 554b9afbb4 ENV.rb: Fix typo in Fortran environment variables
`FFFLAGS` should be `FFLAGS`.
2011-11-23 09:25:22 -08:00
Jack Nagel a446432fc0 options: treat outdated brews as installed
`brew options --installed` will now "do the right thing".

There is getting to be a small but noticeable amount of code duplication
among commands that take options like "--installed" or "--all"; it may
be worth factoring this out into a method that will return a collection
of formula objects based on the options that are passed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-22 19:29:10 -06:00
Jack Nagel 284ecf96db Define and use ARGV.build_devel?
Often it is useful to provide a development build in addition to the
stable release or HEAD download.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-11-21 20:04:33 -08:00
Charlie Sharpsteen 9407a0cbcb formula_installer.rb: Hotfix for head installs
For now, don't strip `--HEAD` from `ARGV` prior to forking for install.
Currently this doesn't work because the formula object the installer is acting
on has its `prefix` set while under the influence of `--HEAD`. So, the
installer bails out when it sees that nothing is installed to `f.prefix`.

This is a hotfix for issue #8668 to allow formulae to keep building. A proper
fix should ensure that formula installers are operating on objects with
appropriately set `prefix` values.
2011-11-21 11:26:05 -08:00
Charlie Sharpsteen db1c320a7c audit.rb: Check version strings by default
Tired of telling people that version numbers are redundant. Just check it by
default since the `--strict` flag to `brew audit` is not well advertised.
2011-11-21 09:00:34 -08:00
Jonathan Grochowski 5b9d402c44 Delete temp directory created during brew doctor
Running brew doctor creates a temporary directory in $HOMEBREW_TEMP or
/tmp but does not clean it up afterwards. This patch deletes the
directory created to prevent polluting $HOMEBREW_TEMP or /tmp with empty
directories.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-11-20 13:22:43 -08:00
Jack Nagel 7cf1b19aef audit: check for ARGV.flag? in formulae
We don't want single letter options like '-v' or '-d' to unintentionally
trigger formula-specific options.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-18 15:27:09 -06:00
Charlie Sharpsteen 769b33e3d7 Don't include receipt in brew list output
Fixes #8615.
2011-11-16 10:43:44 -08:00
Charlie Sharpsteen 66fb221446 Don't write receipt for empty installs
Fixes #8616.
2011-11-16 10:42:02 -08:00
Jack Nagel 0f5c0b729e audit: don't check duplicate URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-15 18:06:26 -06:00