This will be used by "rpm-ostree upgrade".
This moves some utility code from the ostree tool into the shared library, which will make it easier to consume by external tools.