Draft: compile_pkgs: protect repository fetch from local mirror with lock
We have protection for local repository mirror update but we do not have it for reading. It can happen that while one instance is updating repository the second one is trying to read it. That leads to git failing about unexpected references. This adds read protection as well as write one for local mirror repositories.
Draft: You need to check if this is still required and if it should be merged.