Homebrew/homebrew — pull request #35058 by KevinSjoberg (2014-12-17 16:51:19+00:00)
Title: Convert dependencies to formulas for name matching

Hi. This is my first pull request so bear with me!

Today I noticed that the `brew uses` command failed to detect some formulas being used by the given argument. The formula `php54` makes use of `zlib` but `brew uses --installed zlib` returns nothing.

The reason this occurs is due to `zlib` being a tapped formula (homebrew/dupes). When the comparison is made `deps.name` is `homebrew/dupes/zlib` while the formula name itself is `zlib`.

I solved this for non-recursive calls by converting the dependency into a formula before doing the comparison. I'm not sure whether or not this is ideal but I hope you can point me in the right direction.

Some questions:

* Should this be applied for requirements?
* Should this be done for recursive calls as well?

I tried running the tests, by issuing `brew tests`, but nothing happened. I hope you can help me getting the tests running as well because I sure don't want to break something.

Cheers! :smile: