Taps: remove references to pinning.

Addresses https://github.com/Homebrew/brew/issues/6110
This commit is contained in:
Mike McQuaid 2019-05-09 12:43:51 +01:00 committed by GitHub
parent 37f4b92644
commit d666b8554d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,42 +53,28 @@ dunn/emacs
version: `brew tap username/homebrew-foobar`. `brew` will automatically add version: `brew tap username/homebrew-foobar`. `brew` will automatically add
back the 'homebrew-' prefix whenever it's necessary. back the 'homebrew-' prefix whenever it's necessary.
## Formula duplicate names ## Formula with duplicate names
If your tap contains a formula that is also present in If your tap contains a formula that is also present in
[homebrew/core](https://github.com/Homebrew/homebrew-core), that's fine, [homebrew/core](https://github.com/Homebrew/homebrew-core), that's fine,
but it means that you must install it explicitly by default. but it means that you must install it explicitly by default.
If you would like to prioritise a tap over `homebrew/core`, you can use
`brew tap-pin username/repo` to pin the tap,
and use `brew tap-unpin username/repo` to revert the pin.
Whenever a `brew install foo` command is issued, `brew` will find which formula Whenever a `brew install foo` command is issued, `brew` will find which formula
to use by searching in the following order: to use by searching in the following order:
* pinned taps
* core formulae * core formulae
* other taps * other taps
If you need a formula to be installed from a particular tap, you can use fully If you need a formula to be installed from a particular tap, you can use fully
qualified names to refer to them. qualified names to refer to them.
For example, you can create a tap for an alternative `vim` formula. Without You can create a tap for an alternative `vim` formula. The behaviour will be:
pinning it, the behaviour will be:
```sh ```sh
brew install vim # installs from homebrew/core brew install vim # installs from homebrew/core
brew install username/repo/vim # installs from your custom repository brew install username/repo/vim # installs from your custom repository
``` ```
However if you pin the tap with `brew tap-pin username/repo`, you will need to As a result, we recommend you give formulae a different name if you want to make
use `homebrew/core` to refer to the core formula. them easier to install. Note that there is (intentionally) no way of replacing
dependencies of core formulae with those from taps.
```sh
brew install vim # installs from your custom repository
brew install homebrew/core/vim # installs from homebrew/core
```
Note that pinned taps are prioritized only when the formula name is directly
given by you, i.e. it will not influence formulae automatically installed as
dependencies.