homebrew-graph icon indicating copy to clipboard operation
homebrew-graph copied to clipboard

Missing dependencies in output?

Open michaelblyons opened this issue 3 years ago • 3 comments

The output of my brew graph --installed showed several packages that appeared to be leaves. But when I went to uninstall some of them, they turned out to be dependencies.

It also happens on arbitrary packages. Compare brew graph pango to brew deps pango and search for gobject-introspection.

michaelblyons avatar Aug 09 '22 23:08 michaelblyons

Output ofbrew deps pango

Note gobject-introspection on line 9.

ca-certificates
cairo
fontconfig
freetype
fribidi
gdbm
gettext
glib
gobject-introspection
graphite2
harfbuzz
icu4c
libffi
libpng
libpthread-stubs
libx11
libxau
libxcb
libxdmcp
libxext
libxrender
lzo
mpdecimal
[email protected]
pcre
pixman
pkg-config
[email protected]
readline
sqlite
xorgproto
xz

Output of brew graph pango

I do not see gobject-introspection.

digraph G {
  "pango";
  "cairo";
  "fontconfig";
  "freetype";
  "libpng";
  "glib";
  "gettext";
  "libffi";
  "pcre";
  "libx11";
  "libxcb";
  "libpthread-stubs";
  "pkg-config";
  "libxau";
  "xorgproto";
  "libxdmcp";
  "libxext";
  "libxrender";
  "lzo";
  "pixman";
  "fribidi";
  "harfbuzz";
  "graphite2";
  "icu4c";
  "pango" -> "cairo";
  "pango" -> "fontconfig";
  "pango" -> "freetype";
  "pango" -> "fribidi";
  "pango" -> "glib";
  "pango" -> "harfbuzz";
  "cairo" -> "fontconfig";
  "cairo" -> "freetype";
  "cairo" -> "glib";
  "cairo" -> "libpng";
  "cairo" -> "libx11";
  "cairo" -> "libxcb";
  "cairo" -> "libxext";
  "cairo" -> "libxrender";
  "cairo" -> "lzo";
  "cairo" -> "pixman";
  "fontconfig" -> "freetype";
  "freetype" -> "libpng";
  "glib" -> "gettext";
  "glib" -> "libffi";
  "glib" -> "pcre";
  "libx11" -> "libxcb";
  "libx11" -> "xorgproto";
  "libxcb" -> "libpthread-stubs";
  "libxcb" -> "libxau";
  "libxcb" -> "libxdmcp";
  "libpthread-stubs" -> "pkg-config";
  "libxau" -> "xorgproto";
  "libxdmcp" -> "xorgproto";
  "libxext" -> "libx11";
  "libxext" -> "xorgproto";
  "libxrender" -> "libx11";
  "libxrender" -> "xorgproto";
  "harfbuzz" -> "cairo";
  "harfbuzz" -> "freetype";
  "harfbuzz" -> "glib";
  "harfbuzz" -> "graphite2";
  "harfbuzz" -> "icu4c";
}

Output of brew graph --reduce pango

I still do not see gobject-introspection.

digraph G {
  "pango";
  "cairo";
  "fontconfig";
  "freetype";
  "libpng";
  "glib";
  "gettext";
  "libffi";
  "pcre";
  "libx11";
  "libxcb";
  "libpthread-stubs";
  "pkg-config";
  "libxau";
  "xorgproto";
  "libxdmcp";
  "libxext";
  "libxrender";
  "lzo";
  "pixman";
  "fribidi";
  "harfbuzz";
  "graphite2";
  "icu4c";
  "pango" -> "fribidi";
  "pango" -> "harfbuzz";
  "cairo" -> "fontconfig";
  "cairo" -> "glib";
  "cairo" -> "libxext";
  "cairo" -> "libxrender";
  "cairo" -> "lzo";
  "cairo" -> "pixman";
  "fontconfig" -> "freetype";
  "freetype" -> "libpng";
  "glib" -> "gettext";
  "glib" -> "libffi";
  "glib" -> "pcre";
  "libx11" -> "libxcb";
  "libxcb" -> "libpthread-stubs";
  "libxcb" -> "libxau";
  "libxcb" -> "libxdmcp";
  "libpthread-stubs" -> "pkg-config";
  "libxau" -> "xorgproto";
  "libxdmcp" -> "xorgproto";
  "libxext" -> "libx11";
  "libxrender" -> "libx11";
  "harfbuzz" -> "cairo";
  "harfbuzz" -> "graphite2";
  "harfbuzz" -> "icu4c";
}

michaelblyons avatar Aug 12 '22 17:08 michaelblyons

Maybe a duplicate of #13, but I'm definitely up-to-date with brew upgrade.

michaelblyons avatar Aug 12 '22 17:08 michaelblyons

Hey @michaelblyons, this sure looks like the known issue, but if your Homebrew is up to date, it's strange. Let me check.

martido avatar Aug 12 '22 18:08 martido

@michaelblyons I'm sorry! It took me some time to look into this ..

With an updated Homebrew, I don't see any difference between the output of brew deps pango and brew graph pango. There's no gobject-introspection in both (tested today, Aug 30th). Can you confirm? The output of brew graph pango seems consistent with brew deps pango and also brew deps pango --tree.

cmd git:(master) ✗ brew deps pango
cairo
fontconfig
freetype
fribidi
gettext
glib
graphite2
harfbuzz
icu4c
libpng
libpthread-stubs
libx11
libxau
libxcb
libxdmcp
libxext
libxrender
lzo
pcre
pixman
pkg-config
xorgproto
digraph G {
  "pango";
  "cairo";
  "fontconfig";
  "freetype";
  "libpng";
  "glib";
  "gettext";
  "pcre";
  "libx11";
  "libxcb";
  "libpthread-stubs";
  "pkg-config";
  "libxau";
  "xorgproto";
  "libxdmcp";
  "libxext";
  "libxrender";
  "lzo";
  "pixman";
  "fribidi";
  "harfbuzz";
  "graphite2";
  "icu4c";
  "pango" -> "cairo";
  "pango" -> "fontconfig";
  "pango" -> "freetype";
  "pango" -> "fribidi";
  "pango" -> "glib";
  "pango" -> "harfbuzz";
  "cairo" -> "fontconfig";
  "cairo" -> "freetype";
  "cairo" -> "glib";
  "cairo" -> "libpng";
  "cairo" -> "libx11";
  "cairo" -> "libxcb";
  "cairo" -> "libxext";
  "cairo" -> "libxrender";
  "cairo" -> "lzo";
  "cairo" -> "pixman";
  "fontconfig" -> "freetype";
  "freetype" -> "libpng";
  "glib" -> "gettext";
  "glib" -> "pcre";
  "libx11" -> "libxcb";
  "libx11" -> "xorgproto";
  "libxcb" -> "libpthread-stubs";
  "libxcb" -> "libxau";
  "libxcb" -> "libxdmcp";
  "libpthread-stubs" -> "pkg-config";
  "libxau" -> "xorgproto";
  "libxdmcp" -> "xorgproto";
  "libxext" -> "libx11";
  "libxext" -> "xorgproto";
  "libxrender" -> "libx11";
  "libxrender" -> "xorgproto";
  "harfbuzz" -> "cairo";
  "harfbuzz" -> "freetype";
  "harfbuzz" -> "glib";
  "harfbuzz" -> "graphite2";
  "harfbuzz" -> "icu4c";
}

martido avatar Aug 30 '22 20:08 martido

Thanks for checking. This is super-weird to me. Now I get the same output as you!

$ brew deps pango
cairo
fontconfig
freetype
fribidi
gettext
glib
graphite2
harfbuzz
icu4c
libffi
libpng
libpthread-stubs
libx11
libxau
libxcb
libxdmcp
libxext
libxrender
lzo
pcre
pixman
pkg-config
xorgproto

I'm now a little suspicious that there was a bug in Homebrew wherein (I'm guessing here) optional packages that are installed were counted as dependencies. Closing as no longer reproducible.

michaelblyons avatar Aug 30 '22 23:08 michaelblyons

Homebrew definitely has a bug. Check this out:

[~]$ brew remove [email protected]
Error: Refusing to uninstall /usr/local/Cellar/[email protected]/3.9.13_4
because it is required by cairo and libpst, which are currently installed.
You can override this and force removal with:
  brew uninstall --ignore-dependencies [email protected]

[~]$ brew info libpst
==> libpst: stable 0.6.76 (bottled)
Utilities for the PST file format
https://www.five-ten-sg.com/libpst/
/usr/local/Cellar/libpst/0.6.76 (238 files, 3.0MB) *
  Poured from bottle on 2021-04-06 at 14:37:43
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libpst.rb
License: GPL-2.0-or-later
==> Dependencies
Build: pkg-config ✔
Required: boost ✔, gettext ✔, libgsf ✔
==> Analytics
install: 55 (30 days), 143 (90 days), 723 (365 days)
install-on-request: 55 (30 days), 143 (90 days), 722 (365 days)
build-error: 0 (30 days)

[~]$ brew deps libpst
boost
gdbm
gettext
glib
icu4c
libffi
libgsf
mpdecimal
[email protected]
pcre
[email protected]
readline
sqlite
xz

[~]$ brew deps --tree libpst
libpst
├── boost
│   ├── icu4c
│   ├── xz
│   └── zstd
│       ├── lz4
│       └── xz
├── gettext
└── libgsf
    ├── gettext
    └── glib
        ├── gettext
        └── pcre

michaelblyons avatar Aug 30 '22 23:08 michaelblyons

@michaelblyons This is the output that I get with brew deps libpst

boost
gettext
glib
icu4c
libgsf
lz4
pcre
xz
zstd

This is consistent with your tree output. I have absolutely no explanation why you get a different output than I do. I updated Homebrew last on Aug 30th.

martido avatar Sep 01 '22 20:09 martido

I might have stumbled into something here. Either force reinstalling, or uninstalling and reinstalling, a given python-related bottle (not homebrew itself) changed the output for me. I didn't take notes as I was just throwing things at the wall. This might be a worthwhile experiment for you to try.

jmkacz avatar Sep 13 '22 03:09 jmkacz

Either force reinstalling, or uninstalling and reinstalling, a given python-related bottle (not homebrew itself) changed the output for me.

This did indeed work.

michaelblyons avatar Sep 22 '22 21:09 michaelblyons