It is interesting to think of this in terms of basic computer science problems. A package is a cache of the developers master version which need to be invalidated. It has to be named in such a way that you can decide if it is the correct version. And sometimes it needs to be handled in a transactional way so that you have a view of the data that is consistent.
Put like that the reliable solution would be a locally replicated SQL database. Perhaps the PostgreSQL or SQLite would be a better target for development than the underlying OS?
Put like that the reliable solution would be a locally replicated SQL database. Perhaps the PostgreSQL or SQLite would be a better target for development than the underlying OS?