Write .installed.cfg only once, in safe way and only if there's any change
Previous attempt to fix possible corruption was reverted because it had severe performance issues (both CPU & storage). Also, updating a part does not put it anymore at the end of the list of installed parts. It was breaking uninstall dependencies.
Showing with 51 additions and 86 deletions