Managing dependencies correctly is probably the most important long-term problem to solve in programming ... and naming things
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?
[1]: Somehow, all my lines aligned perfectly in this comment box at its default size! https://www.dropbox.com/s/slq8x0rqkj7ydzn/aligned.png