Simplify access to the different forms of a formula's build options by
making options into real objects rather than strings, and expose both
the 'name' and 'flag' form.
Usually, the "foo-version already installed" error is printed by
FormulaInstaller. However, if an up-to-date formula that has outdated
deps is passed on the command line, we proceed to upgrade the deps and
then print a message saying that the formulae given on the command line
is already installed.
Catch this earlier, when the outdated list is being populated, print an
appropriate message, and skip the up-to-date formula.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This serves the same purpose as similar code in FormulaInstaller, but we
duplicate it because we do the dependency expansion in an ad-hoc fashion
here.
FixesHomebrew/homebrew#11863.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The heuristic for determining whether something is installed changes
from "f.installed?" to "f.rack.exist? and f.rack.subdirs.length > 0" in
order to properly consider outdated formulae.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Apple's X11 is XQuartz, but this can be confusing, and is ultimately
unnecessary for debugging purposes.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-D is now the switch for diagnostic-dumps. Let it be so.
Shows how long each doctor method takes in a sorted table at end. I used this to move the two slowest methods to the end of the doctor run so that as much useful information can be shown as quickly as possible.
Also now possible to specify on command line which tests should be run.
When combining the set of old-style and new-style options, make sure
that the leading "--" is stripped.
Fixes displaying options in `brew options`, and the exotic case of
declaring options using the old syntax and then checking them with
`build.include?`
If you google for "Cowardly refusing to sudo brew" you get a lot of confused users who didn't read any of the Homebrew documentation and then had a hissy-fit.
This stuff sucks. I'd like to just replace the dash with a directory division or tilde character. But this makes the code even more complicated, unless we can figure out how to migrate the taps.
ClosesHomebrew/homebrew#13689.
Signed-off-by: Max Howell <mxcl@me.com>
There are subtle distinctions between writable? and writable_real? we don't
understand precisely why we need this, but it fixes the bugs :/
Currently, if brew doctor detects untracked changes in the local repo,
it suggests doing 'git reset --hard', but that doesn't remove untracked
files. This change adds an additional suggestion to run 'git clean -f'
to remove them.
ClosesHomebrew/homebrew#12814.
Signed-off-by: Max Howell <mxcl@me.com>
Changed the path to Library as we don't want to clean -f all over the whole /usr/local :P
If a formula is in Formula due to tapping or otherwise, don't prohibit installation.
Really we should make the blacklist *really* stuff that should be blacklisted and then if it is available still require a --force. But currently with okay stuff like vim in there, and libxml2 being both blacklisted *and* in mxcl/master, we are screwing ourselves.
TL;DR we should do some work on this component.
FixesHomebrew/homebrew#13234.
Now that X11 components are specified as dependencies, users will be
prompted to install these components when necessary, and this check is
no longer needed.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Tell user exactly what command to use rather than thinking they'll figure it out by applying some negation logic to the main verb in the sentence they just read.
ClosesHomebrew/homebrew#12790.