[Rpm-maint] [rpm-software-management/rpm] rpm query directory performance (#1770)

enerjazzer notifications at github.com
Sun Sep 5 11:55:02 UTC 2021


@ffesti Well, it doesn't do it for other queries... 
What if I have a symlink /opt/pkg/mylibxxx/1.100 -> /opt/pkg/mylib/1.100? But as I said before, RPM does exactly one stat() in this case, it doesn't try to find other possible symlinks.
Also, a symlink can have a different name, e.g. /opt/pkg/mylibxxx/1.100yyy -> /opt/pkg/mylib/1.100.
With this logic, it should scan the whole filesystem every time :)

Frankly, what's the point of having RPMDB if it's going to stat everything? I expected it to only check the RPMDB entries and, maybe, do one stat() if it's really needed (which I doubt, because even if the directory was deleted without proper rpm uninstall it's still registered in the RPMDB and it's enough to give the user the name of the rpm which provided this path, no matter if it exists or not - and this has a use case of restoring that accidentally deleted directory by reinstalling the said rpm).

-- 
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#issuecomment-913139937
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210905/96f888e6/attachment.html>


More information about the Rpm-maint mailing list