Add undeclared dependencies to Tab when installing
An installed formula doesn't get optlinked until _after_ it's installed, meaning that we can't rely on `opt_prefix` to get the right keg. So, if not optlinked, fall back to the formula's prefix, which will be that of the current installation.
This commit is contained in:
parent
8386e6a8c1
commit
40ca03e975
@ -13,6 +13,7 @@ require "pkg_version"
|
||||
require "tap"
|
||||
require "keg"
|
||||
require "migrator"
|
||||
require "os/mac/linkage_checker"
|
||||
require "extend/ENV"
|
||||
require "language/python"
|
||||
|
||||
@ -1840,9 +1841,14 @@ class Formula
|
||||
end
|
||||
|
||||
def undeclared_runtime_dependencies
|
||||
return [] unless optlinked?
|
||||
|
||||
if optlinked?
|
||||
keg = Keg.new(opt_prefix)
|
||||
elsif prefix.directory?
|
||||
keg = Keg.new(prefix)
|
||||
else
|
||||
return []
|
||||
end
|
||||
|
||||
linkage_checker = LinkageChecker.new(keg, self)
|
||||
dylib_formula_names = linkage_checker.brewed_dylibs.keys
|
||||
linked_formulae_names = dylib_formula_names - [name]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user