On 15 January 2018 at 12:42, Florian Weimer <fweimer@xxxxxxxxxx> wrote: > On 01/15/2018 05:40 AM, Tomasz Kłoczko wrote: >> Currently /sbin/ldconfig is part of the glibc package. >> Depends which one package was installed/updated firs and which one >> second system image end ups with 32 or 64 bits /sbin/ldconfig. >> Depends which one binary will be present ldconfig by default goes over >> /lib or /lib64 directories + any other directories specified in >> /etc/ld.so,conf.d/ files. > > > I believe this part at least is not technically accurate, see > sysdeps/unix/sysv/linux/x86_64/dl-cache.h in the glibc sources. x86-64 > ldconfig processes the lib and libx32 directories as well. Just double checked this and you are right. I've been doing my test when I had no installed any i686 package and in case like this such test result looks a bit misleading: [root@domek]# strace -e trace=file ldconfig 2>&1 | grep -v lib64 execve("/sbin/ldconfig", ["ldconfig"], 0x7ffe8c9d4260 /* 35 vars */) = 0 readlink("/proc/self/exe", "/usr/sbin/ldconfig", 4096) = 18 openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/etc/ld.so.conf", O_RDONLY) = 3 openat(AT_FDCWD, "/etc/ld.so.conf.d", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4 openat(AT_FDCWD, "/etc/ld.so.conf.d/atlas-x86_64.conf", O_RDONLY) = 4 openat(AT_FDCWD, "/etc/ld.so.conf.d/bind99-x86_64.conf", O_RDONLY) = 4 openat(AT_FDCWD, "/etc/ld.so.conf.d/community-mysql-x86_64.conf", O_RDONLY) = 4 openat(AT_FDCWD, "/etc/ld.so.conf.d/kernel-4.13.9-300.fc27.x86_64.conf", O_RDONLY) = 4 openat(AT_FDCWD, "/etc/ld.so.conf.d/kernel-4.14.11-300.fc27.x86_64.conf", O_RDONLY) = 4 openat(AT_FDCWD, "/etc/ld.so.conf.d/kernel-4.15.0-0.rc7.git0.1.fc28.x86_64.conf", O_RDONLY) = 4 openat(AT_FDCWD, "/etc/ld.so.conf.d/kernel-4.15.0-0.rc7.git2.1.fc28.x86_64.conf", O_RDONLY) = 4 openat(AT_FDCWD, "/etc/ld.so.conf.d/libiscsi-x86_64.conf", O_RDONLY) = 4 openat(AT_FDCWD, "/etc/ld.so.conf.d/wine-64.conf", O_RDONLY) = 4 stat("/lib", {st_mode=S_IFDIR|0555, st_size=804, ...}) = 0 stat("/libx32", 0x7ffd776af490) = -1 ENOENT (No such file or directory) stat("/usr/lib", {st_mode=S_IFDIR|0555, st_size=804, ...}) = 0 stat("/usr/libx32", 0x7ffd776af490) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/var/cache/ldconfig/aux-cache", O_RDONLY) = 3 openat(AT_FDCWD, "/lib", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3 lstat("/lib/sse2", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0 openat(AT_FDCWD, "/lib/sse2", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/etc/ld.so.cache~", O_WRONLY|O_CREAT|O_TRUNC|O_NOFOLLOW, 0600) = 3 chmod("/etc/ld.so.cache~", 0644) = 0 rename("/etc/ld.so.cache~", "/etc/ld.so.cache") = 0 stat("/var/cache/ldconfig", {st_mode=S_IFDIR|0700, st_size=18, ...}) = 0 openat(AT_FDCWD, "/var/cache/ldconfig/aux-cache~", O_WRONLY|O_CREAT|O_TRUNC|O_NOFOLLOW, 0600) = 3 rename("/var/cache/ldconfig/aux-cache~", "/var/cache/ldconfig/aux-cache") = 0 +++ exited with 0 +++ After install glibc.i686 after stat() for /lib of course in above output is new set of lines open()ing all libs in /lib. Original (small) issue with place separated file triggers for /lib, /ust/lib64 in 64 bit glibc and /lib, /usr/lib in 32 bit glibc packages still is real because in such case with installed two packages like glibc.{i686,x86_64} such separation will cause that those file triggers will be called two times doing *exactly* the same things in both cases. It is not a big deal because with remove all per package /sbin/ldconfig executions still it will save a lot of time .. however fact is fact. I've mentioned this duplicated execution only for the record and IMO this can be ignored. However still I think that the best solution would be drop use ld.so caches. kloczek -- Tomasz Kłoczko | LinkedIn: http://lnkd.in/FXPWxH _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx