I'm seeing a problem with executing "rpm -qf <directory>" (rpm 4.11.3)
When I do strace on that command and watch stat() calls, it shows very 
different behavior depending on what I'm querying for.

If I do "rpm -qf /opt/pkg/mylib/1.100" it does exactly one stat() on the 
directory I requested.
If I do "rpm -qf /opt/pkg/mylib/1.100/lib" it calls stat() on ALL directories 
registered in the rpmdb, no matter if they exist or not. This is a huge problem 
when you have a lot of packages installed: when the former query takes 0.03s, 
the latter can take up to 2 seconds.
If I do "rpm -qf /opt/pkg/mylib/1.100/lib/libxxx.so" it calls stat() on all 
directories registered in the rpmdb matching the path 
/opt/pkg/mylib/*/lib/libxxx.so, which is of course better than stat()-ing 
everything installed, but still not ideal.

Is it a known issue?
If it's a known bug, is it fixed in later versions?
Are there any known workarounds for rpm 4.11.3 (as it's a system version so I'm 
stuck with it in the office)?
Maybe there is a patch that could be applied to 4.11.3 without a full upgrade 
(so I could convince our admins to apply it)?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1770
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to