rpm -qf directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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)?

Thanks,
Maxim
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux