Installing a formula via `brew install` may trigger upgrades of its
dependencies if the dependencies are installed but outdated. However, we
never unlinked the existing keg in FormulaInstaller#install_dependency
which caused the link step to fail.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Instead of returning a full list of results after parsing, yield and
print each result as it's found for a snappier user experience.
ClosesHomebrew/homebrew#9576.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
The v3 API currently lacks a search feature. Use the v2 API instead for
much faster pull request filtering.
ClosesHomebrew/homebrew#9592.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Allow the use of a Homebrewed gcc-4.2 in order to support homebrew-alt's
apple-gcc42 formula.
This also removes the :force filtering for the gcc-4.2 check error.
ClosesHomebrew/homebrew#9384.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
When search can't find any local results, hit the GitHub API and search
the titles of pending pull requests. This will help people find the many
proposed formulae and prevent them from wasting time duplicating them.
ClosesHomebrew/homebrew#9018.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Let's choose the first \d{2,} as the build number, as it is the most
likely to indicate significant changes, and we need something to use for
comparison when selecting compilers.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This is silly, but I am no Rubyist and I don't have time to
figure out why Formula.factory(foo).url works as expected but
Formula.factory(foo).version does not.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This will be useful for shell tab completion when something like `brew
install <formula> --version <version>` is implemented.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Rather than regex the output of `git show <rev>:<path>`, we write the
output of `git cat-file blog <rev>:<path>` to a temporary file, and then
operate on it just as we would a normal formula.
I haven't observed any speed difference. `git cat-file blob` is faster
than `git show`, but the "slow part" is still the git-rev-list
invocation. But really it's pretty fast overall.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Passing Formula.factory the name of a keg that belongs to a non-core
formula will cause an error to be raised; we don't really care, so just
fake a totally empty install receipt in this case.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
When multiple kegs are installed, `brew info` marks a keg with an
asterisk if f.installed_prefix == keg, but this is only true if either
HEAD or the newest version of the formula is installed. This isn't
always useful, so let's mark the currently linked keg with an asterisk
regardless of the version.
Obviously, keg-only formula will never be marked, but this is probably a
feature. When multiple keg-only kegs exist, chances are that they are
each being utilized by something, so there isn't really a "used" and
"unused" version.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This will be useful in places where we need information about things
other than the currently linked keg, such as `brew info`.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
If the suggested modifications are already in place, just skip the
warning.
ClosesHomebrew/homebrew#8624.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Use `Formula.factory dep.path` instead of `Formula.factory dep.name` so that
non-standard dependencies specified as URLs or paths can be handled properly.
In later XCodes, gcc is a symlink to gcc-4.2 which is itself a symlink
to llvm-gcc, so it is necessary to resolve multiple symlinks.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Clang is vastly different than LLVM-GCC and is under active development. Using
Clang is a viable solution to formula that fail with LLVM and a suggested
recourse for users of XCode 4.2 or newer.
FixesHomebrew/homebrew#9242.
This version number is arbitrary, and only used to differentiate versions
in bug reports.
There have been enough changes to compiler detection since 0.8 that it makes
sense to bump the version here.
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>