Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.78k stars 12.45k forks source link

Oniguruma is in a different install state depending on who observes it #2387

Closed daenney closed 8 years ago

daenney commented 8 years ago

I just ran my usual brew update and noticed that it mentioned oniguruma as an installed formula that got updated:

12:53:19 ~ $ brew update
Updated 4 taps (caskroom/cask, homebrew/command-not-found, homebrew/core, homebrew/dupes).
==> Updated Formulae
aurora-cli              git-town                homebrew/dupes/nano     node-build              you-get
carthage                gosu                    ironcli                 oniguruma (installed)   youtube-dl
cjdns                   gx                      jq (installed)          passenger
convox                  h2o                     libfixposix             shpotify
gd                      heroku                  mvtools                 vert.x

I'd never heard of it before so figured it was someone's dependency.

12:53:34 ~ $ brew info oniguruma
oniguruma: stable 6.0.0
Regular expressions library
https://github.com/kkos/oniguruma/
/usr/local/Cellar/oniguruma/5.9.6 (13 files, 1M) *
  Poured from bottle on 2016-01-22 at 17:02:06
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/oniguruma.rb

No dice, so lets see if jq being updated at the same time is at all related:

12:53:45 ~ $ brew info jq
jq: stable 1.5, HEAD
Lightweight and flexible command-line JSON processor
https://stedolan.github.io/jq/
/usr/local/Cellar/jq/1.5 (18 files, 954.8K) *
  Poured from bottle on 2016-01-22 at 17:02:09
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/jq.rb
==> Dependencies
Required: oniguruma (uninstalled)

Turns out, it is, but now Homebrew believes it is not installed.

I'm not entirely sure how oniguruma can be installed and uninstalled at the same time. Have we reached quantum homebrew? What can I do to track this down?

DomT4 commented 8 years ago

I appreciate this has the potential to be confusing, but this behaviour is actually correct. A dependency isn't considered fulfilled unless it is up-to-date, and in this case there's a pending oniguruma upgrade waiting, so brew info is just reflecting that.

daenney commented 8 years ago

Ah I see. I had no idea that's how it worked. Thanks for the explanation.