mxcl/homebrew — Issue #10708: Optional dependencies are not tracked
Author: polrop
Created: 2012-03-05 23:26:51+00:00
State: open

Hi,

Some formula have optional dependency like this `depends_on 'qt' if qt?`. They are not reported by `brew info`. Here an example with `poppler`:

```
$ brew install --with-qt4 poppler
[...successful installation...]
$ brew info poppler
poppler 0.18.4
http://poppler.freedesktop.org
Depends on: pkg-config
/usr/local/Cellar/poppler/0.18.4 (458 files, 22M)
Installed with: --with-qt4
http://github.com/mxcl/homebrew/commits/master/Library/Formula/poppler.rb
```
The installa options are tracked in the install receipt. I guess that's why `brew info` is able to list them. Maybe we can do something to fix this. I have tried:

```
$ brew info --with-qt4 poppler
poppler 0.18.4
http://poppler.freedesktop.org
Depends on: pkg-config, qt
/usr/local/Cellar/poppler/0.18.4 (458 files, 22M)
Installed with: --with-qt4
http://github.com/mxcl/homebrew/commits/master/Library/Formula/poppler.rb
```
and in this case it works. So, I will try to find a way to teach `brew info` to automatically add the install options listed in the receipt after it has loaded the formula.

What do you think?

Regards,
-Nico