File Notes.txt of Package mlocate
There are problems when this package is updated or removed
as /var/lib/mlocate/mlocate.db is created after the package
has been installed.
Then the installer fails miserably.
The current solution is %post moving the package from /tmp/*.db
to its default location /var/lib/mlocate. Correcting permissions.
This, should happen just in case it was moved from default to /tmp
by %pre so that the updates doesn't fail either.
(I don't know if it is possible saving a shasum in memory,
meanwhile the update process takes place, for avoiding a
malicious replacement of the /tmp file... Before it is returned
to its original state)
_______________________________________________
If you have a better solution please contact me.
You should see this from OpenSUSE Build Service,
Get my email from home:code933k. Thank you.