Merge pull request #9322 from MikeMcQuaid/linkage-fixes

linkage: correctly detect missing kegs.
This commit is contained in:
Mike McQuaid 2020-11-27 13:50:23 +00:00 committed by GitHub
commit d7f03bc2dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 11 deletions

View File

@ -193,7 +193,9 @@ class Keg
# @param path if this is a file in a keg, returns the containing {Keg} object.
def self.for(path)
original_path = path
if original_path.exist? && (path = original_path.realpath)
raise Errno::ENOENT, original_path.to_s unless original_path.exist?
if (path = original_path.realpath)
until path.root?
return Keg.new(path) if path.parent.parent == HOMEBREW_CELLAR.realpath

View File

@ -68,16 +68,6 @@ class LinkageChecker
display_items "Broken dependencies", @broken_deps, puts_output: puts_output
display_items "Unwanted system libraries", @unwanted_system_dylibs, puts_output: puts_output
display_items "Conflicting libraries", @version_conflict_deps, puts_output: puts_output
if @broken_dylibs.empty?
puts "No broken library linkage detected"
elsif unexpected_broken_dylibs.empty?
puts "No unexpected broken library linkage detected."
else
puts "Unexpected missing library linkage detected"
end
puts "Unexpected non-missing linkage detected" if unexpected_present_dylibs.present?
end
sig { returns(T::Boolean) }