From 4f38ffe57aabb6ad3c9b0338eeb1d8cb02388cc1 Mon Sep 17 00:00:00 2001 From: Peter O'Connor Date: Sun, 3 Jun 2018 16:06:19 +1000 Subject: Exclude unwanted paths from libdirs for initrd creation libdirs is generated from generic libs (/lib[64] /usr/lib[64]) but uses ldconfig to detect further paths. In Solus, this means 3 extra directories that are unwanted can be detected: - lib32 paths can be installed outside of solbuild - /usr/lib[64]/fakeroot inside solbuild - /usr/lib[64]/haswell once avx2 libs are included in builds By adding usr/lib32, fakeroot and haswell to be removed from the search, these 3 directories will no longer be used to search for library paths in initrd creation excluding duplicate unused libraries, keeping the initrd as small and compatible as possible. Signed-off-by: Peter O'Connor --- dracut-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracut-functions.sh b/dracut-functions.sh index ccc4897..5020bb0 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -52,7 +52,7 @@ find_binary() { ldconfig_paths() { - ldconfig -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq + ldconfig -pN 2>/dev/null | grep -E -v '/(fakeroot|haswell|lib|lib32|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq } # Version comparision function. Assumes Linux style version scheme. -- 2.17.1