ljdsaljkadslkj

This commit is contained in:
2025-06-12 15:45:26 +02:00
parent 61d94d4f33
commit 31dca40168

View File

@@ -268,17 +268,23 @@ let
prev.runCommandLocal "${finalAttrs.finalPackage.name}-ldd"
{
nativeBuildInputs = [
prev.glibc.bin
prev.fd
];
}
''
worker() (
local output
set +e
output="$(ldd "$1")"
if [[ $? -ne 0 ]] || grep <<<"$output" -q " not found"; then
echo "$1"
set -u +e
output="$(ldd "$1" 2>&1)"
retcode="$?"
if [[ "$retcode" -ne 0 && "$output" != $'$\tnot a dynamic executable' ]]; then
echo "error: ldd $1 (retcode=$retcode)"
cat <<<"$output"
touch any_error
elif grep <<<"$output" -q " not found"; then
# TODO: show executable permission errors too
echo "error: ldd $1 (log detection)"
grep <<<"$output" " not found"
touch any_error
fi
@@ -295,7 +301,7 @@ let
--hidden
--no-ignore
--follow # symlinks
-x bash -c "$(declare -f worker); worker \"\$@\""
-x bash -c "$(declare -f worker); worker \"\$@\"" --
)
fd "''${fd_args[@]}"