How to install a local rpm package file in dom0?

I have found a hack to make the local rpm package file install work in dom0.

If the rpm file is located at the same file path in both dom0 and the updatevm, qubes-dom0-update will install the rpm file. It will also resolve correctly the dependencies.