Skip to content

Warn about formula being reinstalled from Homebrew-core instead of pinned tap #5796

@slhck

Description

@slhck
  • are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • ran a brew command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

I have ffmpeg installed from Homebrew core, and I have a new tap pinned:

brew tap varenc/ffmpeg
brew tap-pin varenc/ffmpeg

I want to re-install ffmpeg from this tap, using additional options, using brew reinstall ffmpeg [options].

What happened (include command output)

I run a reinstall command (since just running install tells me that the formula is already installed, obviously):

➜ brew reinstall ffmpeg --with-fdk-aac --with-openssl --with-srt
Warning: ffmpeg is provided by core, but is now shadowed by varenc/ffmpeg/ffmpeg.
To refer to the core formula, use Homebrew/core/ffmpeg instead.
==> Reinstalling ffmpeg
==> Downloading https://homebrew.bintray.com/bottles/ffmpeg-4.1.1.high_sierra.bottle.tar.gz
Already downloaded: /Users/werner/Library/Caches/Homebrew/downloads/7ad8da91a75907ea22f0a2a0188c694bb40208ed13dd75bbfb890989690e5423--ffmpeg-4.1.1.high_sierra.bottle.tar.gz
==> Pouring ffmpeg-4.1.1.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/ffmpeg/4.1.1: 282 files, 59MB

However, ffmpeg got installed by pouring the bottle from Homebrew core instead of building from the tap. Since brew warns me about the tap shadowing the main formula, this is very counterintuitive..

What you expected to happen

I expected brew to either:

  • install the correct formula from the pinned tap, with all the options, and not pour the bottle from Homebrew core, or
  • error out, saying that I still have the formula from Homebrew core installed, and that I first need to uninstall it

I can successfully build from the tap if I first uninstall the existing formula:

➜ brew uninstall --ignore-dependencies ffmpeg
Uninstalling /usr/local/Cellar/ffmpeg/4.1.1... (282 files, 59MB)
Taps/varenc/homebrew-ffmpeg on  master
➜ brew install ffmpeg --with-fdk-aac --with-openssl --with-srt
Warning: ffmpeg is provided by core, but is now shadowed by varenc/ffmpeg/ffmpeg.
To refer to the core formula, use Homebrew/core/ffmpeg instead.
Warning: ffmpeg is provided by core, but is now shadowed by varenc/ffmpeg/ffmpeg.
To refer to the core formula, use Homebrew/core/ffmpeg instead.
==> Installing ffmpeg from varenc/ffmpeg
...

Step-by-step reproduction instructions (by running brew commands)

brew install ffmpeg
brew tap varenc/ffmpeg
brew tap-pin varenc/ffmpeg
brew reinstall ffmpeg --with-fdk-aac

Brew config / doctor:

➜ brew config
HOMEBREW_VERSION: 2.0.2-72-g6c55fe1
ORIGIN: https://github.com/Homebrew/brew
HEAD: 6c55fe1c35606d783ce2a04eb1447ae9d4002e18
Last commit: 21 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 8ba60f79c153b611fefadb0f2f05633c13606c4e
Core tap last commit: 13 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_DISPLAY: :0.0
HOMEBREW_LOGS: /Users/werner/Library/Logs/Homebrew
CPU: octa-core 64-bit kabylake
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.20.1 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_144
macOS: 10.13.6-x86_64
CLT: 10.1.0.0.1.1539992718
Xcode: 10.1
XQuartz: 2.7.11 => /opt/X11

➜ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
  /Users/werner/.pyenv/shims/python3.6m-config
  /Users/werner/.pyenv/shims/python-config
  /Users/werner/.pyenv/shims/python3-config
  /Users/werner/.pyenv/shims/python3.6-config

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
  /usr/local/lib/pkgconfig/fuse-ext2.pc

Metadata

Metadata

Assignees

No one assigned

    Labels

    outdatedPR was locked due to age

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions