Maybe check the hash of both files? That would be a significant amount of code though... maybe we do that if we actually find any packages that already exist :).