diff options
| author | Dominyk Tiller | 2015-01-24 04:21:21 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-27 12:27:42 +0000 |
| commit | a2cb0c2af525a59da836b1f9b6645ee72e0dd657 (patch) | |
| tree | d8a6319a73a81e107e41c7f78d7722022f37c937 | |
| parent | c2e0fb0c085c61474145d483999061dfadae1e8d (diff) | |
| download | brew-a2cb0c2af525a59da836b1f9b6645ee72e0dd657.tar.bz2 | |
formula-cookbook: document conflicts
Closes Homebrew/homebrew#36179.
Closes Homebrew/homebrew#36184.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -rw-r--r-- | share/doc/homebrew/Formula-Cookbook.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/share/doc/homebrew/Formula-Cookbook.md b/share/doc/homebrew/Formula-Cookbook.md index 927450c23..f792cb826 100644 --- a/share/doc/homebrew/Formula-Cookbook.md +++ b/share/doc/homebrew/Formula-Cookbook.md @@ -198,6 +198,25 @@ A Hash specifies a formula dependency with some additional information. Given a depends_on "foo" => [:optional, "with-bar"] ``` + +## Specifying other formulae as conflicts + +Sometimes there’s hard conflict between formulae, and it can’t be avoided or circumvented with `keg_only`. + +PolarSSL is a good [example](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/polarssl.rb#L36-L37) formula for minor conflict. + +PolarSSL ship GNU’s Hello, and compiles a `hello` binary. This is obviously non-essential to PolarSSL’s functionality, and conflict with the `hello` formula would be overkill, so we just remove it. + +However, also in the PolarSSL formulae is a [firm conflict](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/polarssl.rb#L19) with `md5sha1sum`, because both `md5sha1sum` and `polarssl` compile identically-named binaries that *are* important for core functionality. + +As a general rule, `conflicts_with` should be a last-resort option. It’s a fairly blunt instrument. + +The syntax for conflict that can’t be worked around is + +```ruby +conflicts_with "blueduck", :because => "yellowduck also ships a duck binary" +``` + ## Formulae Revisions In Homebrew we sometimes accept formulae updates that don’t include a version bump. These include homepage changes, resource updates, new patches or fixing a security issue with a formula. |
