Open staticfloat opened 12 years ago
I agree - this isn't generally a good solution. Where I think it is useful, is with core things - it seemed silly to pull in a custom version of xz when the system one is "good enough". You could add logic into the formulae to check if the package is system-installed, but this would probably massively overcomplicate things, and make things more fragile.
So, generally, using the brew versions should be preferred.
There is a possibility for a compromise which might make sense here; Formulae could be marked "system-fulfillable" (with the default as "homebrew-only") and the check to see if something is system-fulfilled would be that brew test <name>
passes, and which <name>
does not resolve to something in the Cellar. I think if those two conditions are met, we have decent assurance that things are okay.
Of course, versions are still a problem but as the homebrew core team hasn't fully tackled versioning either (at least, as far as I know), I don't think it's a high priority right now.
I think this is a tricky issue, that requires some consideration.
In the "cons" side, I don't think a "which" command is enough to determine that a requirement is satisfied, for a few reasons:
On the "pros" side:
Overall, I think it is easier to require homebrew to use only the bare minimum of external support, and to fulfill within itself as much as it possibly can. The other possibility is to use the "brew test" functionality of formulae to determine if a formula is satisfied or not, and to somehow beef up the testing such that we can have reasonable assurance that a dependence is satisfactorily fulfilled.