From 2dbd11b81dae28a5c6291a56175c06665b615d66 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Thu, 1 Oct 2020 14:08:38 +0200 Subject: [PATCH] dracut-install: ignore bogus preload libs If there are any nonexistent libraries listed in /etc/ld.so.preload, ldd prints error messages like: ERROR: ld.so: object '/usr/lib64/libfoo.so.1' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. This causes resolve_deps() to return error, which leads to symlinks (like usr/bin/awk) not being copied into the initrd. (cherry picked from commit 4916dfc2b94dca0e84eb7dc58a9266d02c416b4a) Resolves: #1884149 --- install/dracut-install.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/dracut-install.c b/install/dracut-install.c index f8ec9a59..baf6dcff 100644 --- a/install/dracut-install.c +++ b/install/dracut-install.c @@ -481,6 +481,9 @@ static int resolve_deps(const char *src) if (strstr(buf, "cannot read header")) break; + if (strstr(buf, "cannot be preloaded")) + break; + if (strstr(buf, destrootdir)) break;