From 2ee96b9e77485f4a84fdb7883d9eb116ff1054b7 Mon Sep 17 00:00:00 2001 From: Thomas Powell Date: Thu, 6 Oct 2022 13:56:02 -0400 Subject: [PATCH] Commenting why the change to xargs params Signed-off-by: Thomas Powell --- lib/omnibus/health_check.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/omnibus/health_check.rb b/lib/omnibus/health_check.rb index d36f35fc6..65d04ff1d 100644 --- a/lib/omnibus/health_check.rb +++ b/lib/omnibus/health_check.rb @@ -345,6 +345,12 @@ def health_check_solaris bad_libs = {} good_libs = {} + # The case/when below depends on the "current_library" being output with a : at the end + # and then the dependencies on subsequent lines in the form "library.so.1 => /lib/64/library.so.1" + # This output format only happens if ldd is passed multiple libraries (for Solaris, similar to Linux) + # FIXME if any of the `when` clauses in the `health_check_*` methods run before the `current_library` + # they probably should error out with an explicit callout of formatting with their environment's + # respective ldd parsing read_shared_libs("find #{project.install_dir}/ -type f | xargs file | grep \"ELF\" | awk -F: '{print $1}' | sed -e 's/:$//'", "xargs ldd") do |line| case line when /^(.+):$/