ostbuild: Fix DB saving with /tmp and builddir in different volumes
ostbuild: Fix DB saving with /tmp and builddir in different volumes

This fixes the case where /tmp resides in one volume, and the build
directory in a different one: by storing the temporary file in the
same directory as the target one, we avoid the case in which os.rename()
would cross file system boundaries.

Reviewed-by: Colin Walters <694ce38231ed622bd1593ce4ec9aa85c9ddb0a78@verbum.org>

sujitfulse/ostree,resin-io/ostree,sujitfulse/ostree,GNOME/ostree,GNOME/ostree,sujitfulse/ostree,gatispaeglis/ostree,leandrosansilva/ostree,GNOME/ostree,gatispaeglis/ostree,GNOME/ostree,leandrosansilva/ostree,resin-io/ostree,GNOME/ostree,leandrosansilva/ostree,leandrosansilva/ostree,gatispaeglis/ostree,resin-io/ostree,gatispaeglis/ostree,sujitfulse/ostree,leandrosansilva/ostree,gatispaeglis/ostree,resin-io/ostree,gatispaeglis/ostree,sujitfulse/ostree,resin-io/ostree