New comment by Duncaen on void-packages repository https://github.com/void-linux/void-packages/issues/30420#issuecomment-824737700 Comment: The only way to solve this in xbps would be to add another type of lock, which is held before `xbps-src` is doing `xbps-create` in the repository directory, then `xbps-src` calls `xbps-rindex` to add the newly created packages to the repodata, then unlocks the repo again. `xbps-rindex -c` would then have to check for both types of locks. Then we would avoid the race, but the obsolete packages would only cleaned up after another build runs on the `x86_64` builder. The way `-32bit` packages are created is weird and its the only way `xbps-src` is responsible for repositories for multiple architectures. IMHO the best way is to handle the cleanup correctly is to let the build pipeline that creates those packages clean up obsolete packages for the repository it writes to.