Skip to content

Commit 43eaa33

Browse files
committed
uutils-findutils: use brew-provided function for checking binary linkage
Signed-off-by: Rui Chen <[email protected]>
1 parent efcfe59 commit 43eaa33

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Formula/u/uutils-findutils.rb

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,9 @@ def caveats
4949
EOS
5050
end
5151

52-
def check_binary_linkage(binary, library)
53-
binary.dynamically_linked_libraries.any? do |dll|
54-
next false unless dll.start_with?(HOMEBREW_PREFIX.to_s)
55-
56-
File.realpath(dll) == File.realpath(library)
57-
end
58-
end
59-
6052
test do
53+
require "utils/linkage"
54+
6155
touch "HOMEBREW"
6256
assert_match "HOMEBREW", shell_output("#{bin}/ufind .")
6357
assert_match "HOMEBREW", shell_output("#{opt_libexec}/uubin/find .")
@@ -73,7 +67,7 @@ def check_binary_linkage(binary, library)
7367
missing_linkage = []
7468
expected_linkage.each do |binary, dylibs|
7569
dylibs.each do |dylib|
76-
next if check_binary_linkage(binary, dylib)
70+
next if Utils.binary_linked_to_library?(binary, dylib)
7771

7872
missing_linkage << "#{binary} => #{dylib}"
7973
end

0 commit comments

Comments
 (0)