Current warnings contain a mix of variable names with a '$' prefix and
without; most documentation omits the '$', so drop it.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
- Fix ENV.libxml2 to update CPPFLAGS rather than CFLAGS
- Methods ENV.{gcc*,llvm,clang} now reset CPU-specific optimization
flags on every call.
ClosesHomebrew/homebrew#8105.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
We make the assumption that the first non-option word is the command
being invoked.
Originally I was trying to allow command completion for non-standard
command lines like
$ brew --verbose inst<TAB>
but right now executing something like that doesn't actually work. Which
is interesting, because the man page implies that it should. Either the
man page is incorrect, or something was broken between then and now.
Anyway, it would probably be safe to just assume that COMP_WORDS[1] is
the command, and we do make that assumption in other places. But if we
ever do allow things like "brew --option command", this will be useful.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
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.
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 Homebrew/homebrew#9027.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
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 Homebrew/homebrew#8992.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
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>
Should help advert confusion surrounding the "could not find gcc 4.2.x" message
recieved by Lion users running the latest version of XCode.
FixesHomebrew/homebrew#8876.
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.
ClosesHomebrew/homebrew#8869.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
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?`.
FixesHomebrew/homebrew#8668.
ClosesHomebrew/homebrew#7724.